| 1 |
#include <OSGConfig.h> |
|---|
| 2 |
|
|---|
| 3 |
using namespace OSG; |
|---|
| 4 |
|
|---|
| 5 |
/*! \defgroup GrpSystemNodeCoresDrawablesBase Base Drawables |
|---|
| 6 |
\ingroup GrpSystemNodeCoresDrawables |
|---|
| 7 |
|
|---|
| 8 |
See \ref PageSystemDrawablesBase for details. |
|---|
| 9 |
|
|---|
| 10 |
*/ |
|---|
| 11 |
|
|---|
| 12 |
/*! \page PageSystemDrawablesBase Base Drawables |
|---|
| 13 |
|
|---|
| 14 |
To simplify implementation there are two base Drawables that can be used as |
|---|
| 15 |
parent classes for derivation: osg::Drawable and osg::MaterialDrawable. |
|---|
| 16 |
|
|---|
| 17 |
\section PageSystemDrawablesBaseDrawable Drawable |
|---|
| 18 |
|
|---|
| 19 |
The simple Drawable is the root class of all renderable NodeCores. It |
|---|
| 20 |
contains the Statistics element descriptors that can be used to collect |
|---|
| 21 |
information about renderable geometry. |
|---|
| 22 |
|
|---|
| 23 |
\ext Use a Drawable pointer whenever you need to keep something that can be |
|---|
| 24 |
rendered, but don't need access to the Material. \endext |
|---|
| 25 |
|
|---|
| 26 |
\dev Not sure the name is right, because I don't know if and how I would render |
|---|
| 27 |
something that doesn't have a material. Maybe if we get multi-material nodes |
|---|
| 28 |
later? It keeps the inheritance hierarchy cleaner anyway. \enddev |
|---|
| 29 |
|
|---|
| 30 |
\section PageSystemDrawablesBaseMaterialDrawable MaterialDrawable |
|---|
| 31 |
|
|---|
| 32 |
The MaterialDrawable contains a pointer to a osg::Material that is used to |
|---|
| 33 |
render the node. It is abstract, but the base for most renderable classes. |
|---|
| 34 |
|
|---|
| 35 |
\ext It also contains a simple framework for extending the system in the sense |
|---|
| 36 |
of adding node cores that render OpenGL geometry. The drawPrimitives method |
|---|
| 37 |
needs to call the necessary OpenGL commands. Register the MaterialDrawables |
|---|
| 38 |
action methods in the initMethod and that's it, see OSGSlicer.cpp or the Cubes |
|---|
| 39 |
example for an example. \endext |
|---|
| 40 |
|
|---|
| 41 |
*/ |
|---|