29 #ifndef __H3DDISPLAYLISTOBJECT_H__
30 #define __H3DDISPLAYLISTOBJECT_H__
41 class GraphicsOptions;
109 if( display_list ) glDeleteLists( display_list, 1 );
124 frustum_culling_mode = m;
129 return frustum_culling_mode;
133 virtual bool usingCaching();
136 bool usingFrustumCulling();
140 bool isOutsideViewFrustum();
143 static void rebuildAllDisplayLists();
147 virtual unsigned int cachingDelay();
153 virtual void update();
156 virtual void propagateEvent( Event e );
160 virtual void callList(
bool build_list =
true );
171 return event_fields.find( f ) != event_fields.end();
174 #ifdef DEPRECATE_DISPLAYLIST_EVENT_COLLECT
181 template<
class FieldType >
183 return hasCausedEvent( f.get() );
189 return event_fields.size();
193 void initGraphicOption();
196 bool childrenCachesReady(
bool consider_active_field );
201 return have_valid_display_list;
210 bool tryBuildDisplayList(
bool cache_broken );
244 static const int cache_delay_default = 3;
Contains different templates to modify field behaviour.
Contains the Field class.
Base header file that handles all configuration related settings.
Contains the Inst struct.
Contains the SFBool field class.
Contains the SFTime field class.
The Field class.
Definition: Field.h:46
Specifies parameters to use for graphical rendering of nodes.
Definition: GraphicsOptions.h:47
The IsActive field is updated each scenegraph loop, since Scene::time is routed to it to see if the c...
Definition: H3DDisplayListObject.h:65
IsActive()
Constructor.
Definition: H3DDisplayListObject.h:68
void callListCalled()
Should be called from callList().
Definition: H3DDisplayListObject.h:81
virtual void update()
Updates the value of the field.
Definition: H3DDisplayListObject.h:72
We use the Field's lazy evaluation mechanisms to manage the GL display lists for rendering,...
Definition: H3DDisplayListObject.h:60
size_t nrPendingEvents()
Returns the number of input fields that has generated an event to this field since the last call to t...
Definition: H3DDisplayListObject.h:188
GraphicsOptions * graphic_options_previous
previous graphic option
Definition: H3DDisplayListObject.h:241
void setFrustumCullingMode(FrustumCullingMode m)
Set the frustum culling mode.
Definition: H3DDisplayListObject.h:123
CacheMode getCacheMode()
Get the cache mode.
Definition: H3DDisplayListObject.h:118
CacheMode
The entries in CacheMode enumerator is used for checking if caching should be done or not.
Definition: H3DDisplayListObject.h:91
@ ON
Caching is on.
Definition: H3DDisplayListObject.h:93
@ OFF
Caching is off.
Definition: H3DDisplayListObject.h:95
bool have_valid_display_list
True if the display list has been built successfully.
Definition: H3DDisplayListObject.h:230
set< Field * > event_fields
The fields that has generated an event since the last call to update()
Definition: H3DDisplayListObject.h:215
static H3DUniquePtr< Field > break_list_field
This field is routed to all instances of DisplayList and can be used to force a rebuild of all displa...
Definition: H3DDisplayListObject.h:238
FrustumCullingMode frustum_culling_mode
The mode for view frustum culling.
Definition: H3DDisplayListObject.h:227
Field * getEventPointer()
Gets the pointer to the last field that created an event to this field
Definition: H3DDisplayListObject.h:164
H3DUniquePtr< IsActive > isActive
The isActive field is true if the callList() function has been called in the last scenegraph loop,...
Definition: H3DDisplayListObject.h:234
bool hasCausedEvent(Field *f)
Returns true if the Field given has generated an event to this field since the last call to the updat...
Definition: H3DDisplayListObject.h:170
bool reset_delay_cache_counter
flag to require resetting delay_cache_counter
Definition: H3DDisplayListObject.h:247
CacheMode FrustumCullingMode
The entries in FrustumCullingMode enumerator is used for checking if view frustum culling should be d...
Definition: H3DDisplayListObject.h:102
GLuint display_list
OpenGL display list identifier.
Definition: H3DDisplayListObject.h:221
CacheMode cache_mode
The mode for caching.
Definition: H3DDisplayListObject.h:224
~DisplayList()
Destructor.
Definition: H3DDisplayListObject.h:108
FrustumCullingMode getFrustumCullingMode()
Get the frustum culling mode.
Definition: H3DDisplayListObject.h:128
virtual bool haveValidDisplayList()
Returns true if we have a valid display list built that can be called.
Definition: H3DDisplayListObject.h:200
unsigned int delay_cache_counter
Display lists will not be built as long as this counter > 0.
Definition: H3DDisplayListObject.h:218
bool hasCausedEvent(H3DUniquePtr< FieldType > &f)
Returns true if the Field given has generated an event to this field since the last call to the updat...
Definition: H3DDisplayListObject.h:182
void setCacheMode(CacheMode m)
Set the cache mode.
Definition: H3DDisplayListObject.h:113
This abstract interface class is the base class for all node types that wants to create an OpenGL dis...
Definition: H3DDisplayListObject.h:54
H3DUniquePtr< DisplayList > displayList
The DisplayList instance handling the OpenGL caching of this object.
Definition: H3DDisplayListObject.h:256
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130