Click or drag to resize

DisplayPipelineDrawMeshShaded Method (Mesh, GrasshopperDisplayMaterial)

Draws a single mesh with the Grasshopper 2 ("G2") shaded display. This is a convenience overload of DrawMeshesShaded(IEnumerableMesh, GrasshopperDisplayMaterial); see it for the mesh requirements and vertex-colour handling.

Namespace:  Rhino.Display
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public void DrawMeshShaded(
	Mesh mesh,
	GrasshopperDisplayMaterial material
)

Parameters

mesh
Type: Rhino.GeometryMesh
The mesh to draw. Should have current single-precision vertices and vertex normals (see DrawMeshesShaded(IEnumerableMesh, GrasshopperDisplayMaterial)).
material
Type: Rhino.DisplayGrasshopperDisplayMaterial
The G2 shaded settings to draw with. When null, default settings are used.
Remarks

The mesh is uploaded to the GPU on every redraw. Nothing is cached between frames, so every redraw re-uploads the mesh. When drawing more than one mesh, prefer a single batched DrawMeshesShaded(IEnumerableMesh, GrasshopperDisplayMaterial) call over many single-mesh calls.

See Also