示例#1
0
        public void InitializeResources()
        {
            _gfx = Graphics.CreateContext(true);
            _renderTarget = _gfx.RenderTargetFactory.CreateWindow();
            _sceneDataConstantBuffers = _gfx.ConstantBufferManagerFactory.Create<SceneData>();
            _cubeInstanceBuffers = _gfx.MeshInstanceBufferManagerFactory.Create<CubeInstance>();

            InitializeWindow();

            CreateAndActivateMaterial();
            CreateAndActivateCubeMeshBuffer();
            CreateAndActivateCubeInstances();
            CreateAndActivateSceneDataConstantBuffer();

            _gfx.TextureResourceManager.CreateArray("rabbit");
        }
示例#2
0
        public void InitializeResources()
        {
            _gfx                      = Graphics.CreateContext(true);
            _renderTarget             = _gfx.RenderTargetFactory.CreateWindow();
            _sceneDataConstantBuffers = _gfx.ConstantBufferManagerFactory.Create <SceneData>();
            _cubeInstanceBuffers      = _gfx.MeshInstanceBufferManagerFactory.Create <CubeInstance>();

            InitializeWindow();

            CreateAndActivateMaterial();
            CreateAndActivateCubeMeshBuffer();
            CreateAndActivateCubeInstances();
            CreateAndActivateSceneDataConstantBuffer();

            _gfx.TextureResourceManager.CreateArray("rabbit");
        }