Пример #1
0
        public ColoredChunkRenderer(EngineConfiguration config, ContentLibrary contentLibrary, GraphicsDevice device, CameraManager cameraManager, IChunkManager chunkManager)
        {
            _config = config;

            _device = device;

            _terrainColorEffect = contentLibrary.TerrainColorEffect;

            _camManager = cameraManager;
            _chunks     = chunkManager;

            _debugOptions = ChunkRendererDebugOptions.NONE;

            basicEffect = contentLibrary.BasicEffect;

            _debugRasterizerState = new RasterizerState()
            {
                CullMode = Microsoft.Xna.Framework.Graphics.CullMode.None, FillMode = Microsoft.Xna.Framework.Graphics.FillMode.WireFrame
            };
            _rasterizerState = new RasterizerState()
            {
                CullMode = Microsoft.Xna.Framework.Graphics.CullMode.CullCounterClockwiseFace
            };
        }
Пример #2
0
 public DualContourColoredChunkSystem(GraphicsDevice device, ContentLibrary contentLibrary, IChunkManager chunkManager, CameraManager cameraManager, World world, ITerrainGradientFunction densityGradientFunction, float minimumSolidDensity)
 {
     _builder  = new DualContourChunkBuilder(device, world, densityGradientFunction, minimumSolidDensity);
     _renderer = new ColoredChunkRenderer(world.EngineConfiguration, contentLibrary, device, cameraManager, chunkManager);
 }