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