Skip to content

Graphics library

This page lists all included graphics. The list is divided into:

  • 2D graphics: high-quality antialiased 2D graphical elements,
  • 3D graphics: meshes and volumes,
  • Basic graphics: basic, low-quality, aliased, but fast basic primitives (points, lines, triangles), useful for demo, testing, and when dealing with tens of millions of points

Note

If not specified, the default vertex structure is DvzVertex:

Field Type Description
pos vec3 position
color cvec4 color RGBA (four bytes)

2D graphics

Marker

Marker

Segment

Segment

Path

Path

Text

Text

Image

Image

3D graphics

Mesh

Mesh

The mesh graphics supports the following features:

  • Phong shading
  • Up to four textures
  • Customizable texture blending coefficients
  • Transparency (but does not play well with depth test)
  • Support for arbitrary RGB values (via cvec3 packing into vec2)
  • Customizable plane clipping

Plane clipping: when the clip vector is non-zero, the fragment shader implements the following test. If the dot product of the clip vector with the vertex position (in scene coordinates) is negative, the fragment is discarded. This feature allows to cut the mesh along any arbitrary affine plane.

Volume slice

VolumeSlice

Volume

Volume

Basic graphics

Points

Point

Lines

Lines

Line strip

Triangles

Triangle strip

Triangle fan

Warning

Triangle fan graphics is not supported on macOS and should therefore be avoided if macOS compatibility is desirable.