Specifies how polygons are to be drawn.
Normal, filled polygons.
Wireframe polygons, possibly with thickness.
Points at vertices only, possibly with thickness andor perspective sizing.
Filled polygons, without any particular emphasis on perspective correctness (a particularly useful designation for software rendering sprites).
Filled polygons with wireframe rendered in front. The wireframe is given a solid color.
get_geom_rendering(int geom_rendering) const¶
Returns the union of the Geom::GeomRendering bits that will be required once this
RenderModeAttribis applied to a geom which includes the indicated geom_rendering bits.
Returns the perspective flag. When this is true, the point thickness represented by
get_thickness()is actually a width in 3-d units, and the points should scale according to perspective. When it is false, the default, the point thickness is actually a width in pixels, and points are a uniform size regardless of distance from the camera.
Returns the line width or point thickness. This is only relevant when rendering points or lines, such as when the mode is M_wireframe or M_point (or when rendering actual points or lines primitives in M_polygon mode).
LColor const &
Returns the color that is used in M_filled_wireframe mode to distinguish the wireframe from the rest of the geometry.
make(RenderModeAttrib::Mode mode, PN_stdfloat thickness = 1.0, bool perspective = false, LColor const &wireframe_color = LColor::zero())¶
Constructs a new
RenderModeAttribobject that specifies whether to draw polygons in the normal, filled mode, or wireframe mode, or in some other yet-to-be-defined mode.
The thickness parameter specifies the thickness to be used for wireframe lines, as well as for ordinary linestrip lines; it also specifies the diameter of points. (Thick lines are presently only supported in OpenGL; but thick points are supported on either platform.)
If perspective is true, the point thickness represented is actually a width in 3-d units, and the points should scale according to perspective. When it is false, the point thickness is actually a width in pixels, and points are a uniform screen size regardless of distance from the camera.
In M_filled_wireframe mode, you should also specify the wireframe_color, indicating the flat color to assign to the overlayed wireframe.