public RenderSystem(ICamera camera)
 {
     _camera = camera;
     _resourceAllocator = new ResourceAllocator(new OpenGlResourceFactory());
     _simpleMaterial = new SimpleMaterial();
     _simpleMaterial.Create();
     _normalDebugProgram = new NormalDebugProgram();
     _normalDebugProgram.Create();
 }
Exemplo n.º 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()));
 }
Exemplo n.º 3
0
        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();
        }