Esempio n. 1
0
        private void DrawTerrain(TerrainNode node, int layer)
        {
            // So, if doesn't have any samplers - do anything...
            if (node.Samplers.Count == 0 || node.SamplersSuitable.Count == 0)
            {
                return;
            }

            // Find all the quads in the terrain node that need to be drawn
            node.FindDrawableQuads(node.TerrainQuadRoot);

            // The draw them
            node.DrawQuads(node.TerrainQuadRoot, QuadMesh, MPB, layer);
        }
Esempio n. 2
0
        private void DrawTerrain(TerrainNode node)
        {
            // Get all the samplers attached to the terrain node. The samples contain the data need to draw the quad
            var samplers = node.Samplers.Where(sampler => sampler.enabled && sampler.StoreLeaf).ToList();

            // So, if doesn't have any samplers - do anything...
            if (samplers.Count == 0)
            {
                return;
            }

            // Find all the quads in the terrain node that need to be drawn
            node.FindDrawableQuads(node.TerrainQuadRoot, samplers);

            // The draw them
            node.DrawQuad(node.TerrainQuadRoot, samplers, QuadMesh, MPB);
        }