H3D::H3DDisplayListObject::DisplayList Class Reference

We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering, giving automatic cache breaking when dependencies are modified. More...

#include <H3DDisplayListObject.h>

Inheritance diagram for H3D::H3DDisplayListObject::DisplayList:

Inheritance graph
List of all members.

Public Types

enum  CacheMode { ON, OFF, OPTIONS }

Public Member Functions

 DisplayList ()
 Constructor.
 ~DisplayList ()
 Destructor.
void setCacheMode (CacheMode m)
 Set the cache mode.
CacheMode setCacheMode ()
 Get the cache mode.
bool usingCaching ()
 Returns true if caching is in use and false otherwise.
unsigned int cachingDelay ()
 Returns the number of loops the DisplayList must render without receiving an event before a display is built.
void breakCache ()
 If called the display list will be rebuilt on next call to.
virtual void update ()
 Calls tryBuildDisplayList().
virtual void propagateEvent (Event e)
 When the event is propagated the display list is invalidated.
virtual void callList (bool build_list=true)
 Calls the OpenGL call list for if it exists.
FieldgetEventPointer ()
 Gets the pointer to the last field that created an event to this field.
bool hasCausedEvent (Field *f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.
template<class FieldType>
bool hasCausedEvent (auto_ptr< FieldType > &f)
 Returns true if the Field given has generated an event to this field since the last call to the update() function.

Protected Member Functions

bool childrenCachesReady (bool consider_active_field)
bool haveValidDisplayList ()
 Returns true if we have a valid display list built that can be called.
bool tryBuildDisplayList (bool cache_broken)
 Try to build a display list.

Friends

class H3DDisplayListObject

Classes

class  IsActive
 The IsActive field is updated each scenegraph loop, since Scene::time is routed to it to see if the callList() function was called during or since the last loop. More...

Detailed Description

We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering, giving automatic cache breaking when dependencies are modified.


Member Enumeration Documentation

enum H3D::H3DDisplayListObject::DisplayList::CacheMode
 

Enumerator:
ON  Caching is on.
OFF  Caching is off.
OPTIONS  Caching is depending in the GraphicalRenderingOptions in use.


Member Function Documentation

void H3DDisplayListObject::DisplayList::callList bool  build_list = true  )  [virtual]
 

Calls the OpenGL call list for if it exists.

If it does not exist we try to build it and execute it.

Reimplemented in H3D::ElevationGrid::DisplayList, H3D::X3DComposedGeometryNode::DisplayList, and H3D::X3DGeometryNode::DisplayList.

bool H3DDisplayListObject::DisplayList::tryBuildDisplayList bool  cache_broken  )  [protected]
 

Try to build a display list.

Requires that the display lists of all H3DDisplayListNode instances that are routed to us are valid in order to build the cache.

Parameters:
cache_broken true if this call is made when the cache has just been broken, e.g. from the update() function.
Returns:
true if the list was successfully built, false otherwise.


Generated on Thu Aug 24 12:39:14 2006 for H3D API by  doxygen 1.4.5