コード例 #1
0
        public void Draw(RenderContext context)
        {
            double        height   = heightInFeet / 300000;
            RenderContext context2 = new RenderContext(context.graphicsDevice, Matrixd.CreateTranslation(new Vector3d(0, 0, height)) * context.WVP, context.minX, context.maxX, context.minY, context.maxY, context.cameraZoom, context.layerPass);

            buffer.Draw(context2, PrimitiveType.TriangleList, null, roofColor.ToVector3());
            buffer2.Draw(context, PrimitiveType.TriangleList, wallTexture, null);
        }
コード例 #2
0
 public void Draw(RenderContext context)
 {
     if (context.layerPass == RenderContext.LayerPass.MAIN_PASS)
     {
         waterBuffer.Draw(context);
         foreach (var descriptor in descriptors)
         {
             descriptor.Draw(context);
         }
     }
     if (context.highQuality || (context.maxX - context.minX < 0.1 && context.maxY - context.minY < 0.1))
     {
         if (context.layerPass == RenderContext.LayerPass.TREE_DENSITY_PASS)
         {
             waterBuffer.Draw(context, PrimitiveType.TriangleList, null, new Vector3(0, 0, 0));
             foreach (var descriptor in treeDescriptors)
             {
                 descriptor.Draw(context);
             }
         }
         if (context.layerPass == RenderContext.LayerPass.GRASS_DENSITY_PASS)
         {
             waterBuffer.Draw(context, PrimitiveType.TriangleList, null, new Vector3(0, 0, 0));
             foreach (var descriptor in grassDescriptors)
             {
                 descriptor.Draw(context);
             }
         }
         treeBuffer.Draw(context);
     }
     if (Game1.DEBUGGING)
     {
         context.graphicsDevice.Clear(ClearOptions.DepthBuffer, Color.Transparent, context.graphicsDevice.Viewport.MaxDepth, 0);
         debugBuffer.Draw(context);
     }
 }
コード例 #3
0
 public void Draw(RenderContext context)
 {
     buffer.Draw(context, PrimitiveType.TriangleList, null, color.ToVector3());
 }
コード例 #4
0
 public void Draw(RenderContext context)
 {
     buffer.Draw(context, PrimitiveType.TriangleList, texture, color == null ? (Vector3?)null : color.ToVector3());
 }