コード例 #1
0
 public RenderSystem(ICamera camera)
 {
     _camera = camera;
     _resourceAllocator = new ResourceAllocator(new OpenGlResourceFactory());
     _simpleMaterial = new SimpleMaterial();
     _simpleMaterial.Create();
     _normalDebugProgram = new NormalDebugProgram();
     _normalDebugProgram.Create();
 }
コード例 #2
0
 public Terrain()
 {
     _tree = CreateTree();
     _chunkedLod = new ChunkedLod();
     _simpleMaterial = new SimpleMaterial();
     _simpleMaterial.Create();
     _normalDebugProgram = new NormalDebugProgram();
     _normalDebugProgram.Create();
     _cache = new TerrainChunkCache(new TerrainChunkFactory(), new ResourceAllocator(new OpenGlResourceFactory()));
 }
コード例 #3
0
ファイル: Cube.cs プロジェクト: HaKDMoDz/ProceduralGeneration
        public Cube()
        {
            _simpleMaterial = new SimpleMaterial();
            var resourceAllocator = new ResourceAllocator(new OpenGlResourceFactory());
            _simpleMaterial.Create();

            var mesh = MeshCreator.CreateXZGrid(10, 10);
            _renderable = resourceAllocator.AllocateResourceFor(mesh);
            _renderable.CreateVAO();
        }