Panda3D
Functions
renderModeAttrib.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "renderModeAttrib.h"
#include "graphicsStateGuardianBase.h"
#include "dcast.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) RenderModeAttrib
 Constructs a new RenderModeAttrib object that specifies whether to draw polygons in the normal, filled mode, or wireframe mode, or in some other yet-to-be-defined mode. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2002-03-14

Definition in file renderModeAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

Constructs a new RenderModeAttrib object that specifies whether to draw polygons in the normal, filled mode, or wireframe mode, or in some other yet-to-be-defined mode.

Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

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.

This should return the result of applying the other RenderAttrib to a node in the scene graph below this RenderAttrib, which was already applied. In most cases, the result is the same as the other RenderAttrib (that is, a subsequent RenderAttrib completely replaces the preceding one). On the other hand, some kinds of RenderAttrib (for instance, ColorTransformAttrib) might combine in meaningful ways. Tells the BamReader how to create objects of type RenderModeAttrib.

Definition at line 43 of file renderModeAttrib.cxx.