rDisplayList Class Reference

display list wrapper More...

#include <rDisplayList.h>

Inheritance diagram for rDisplayList:

Inheritance graph
[legend]
Collaboration diagram for rDisplayList:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 rDisplayList ()
 ~rDisplayList ()
bool IsSet () const
bool IsInhibited () const
bool Call ()
 calls the display list, returns true if there was a list to call
void Clear (int inhibitGeneration=1)
 clears the display list and don't regenerate it for the next few calls

Static Public Member Functions

static bool IsRecording ()
 check whether a displaylist is currently being recorded.
static void ClearAll ()
 clears all display lists
static void Cancel ()
 cancels recording of the current display list

Protected Member Functions

virtual bool OnCall ()
 calls the display list, returns true if there was a list to call

Private Member Functions

 rDisplayList (rDisplayList const &)
rDisplayListoperator= (rDisplayList const &)

Private Attributes

GLuint list_
 the display list
int inhibit_
 inhibit display list generation for a while
bool filling_
 set if we're just filling the list

Friends

class rDisplayListFiller


Detailed Description

display list wrapper

Definition at line 61 of file rDisplayList.h.


Constructor & Destructor Documentation

rDisplayList::rDisplayList (  ) 

Definition at line 69 of file rDisplayList.cpp.

00071     : tListItem< rDisplayList >( se_displayListAnchor )
00072     , list_( 0 )
00073     , inhibit_( 0 )
00074     , filling_( false )
00075 #endif
00076 {
00077 }

rDisplayList::~rDisplayList (  ) 

Definition at line 79 of file rDisplayList.cpp.

References Clear(), filling_, list_, and tASSERT.

00080 {
00081 #ifndef DEDICATED
00082     tASSERT( !filling_ );
00083 
00084     Clear();
00085 
00086     tASSERT( !list_ );
00087 #endif
00088 }

Here is the call graph for this function:

rDisplayList::rDisplayList ( rDisplayList const &   )  [private]


Member Function Documentation

bool rDisplayList::IsSet (  )  const [inline]

Definition at line 68 of file rDisplayList.h.

References inhibit_, and list_.

00069     {
00070 #ifndef DEDICATED
00071         return list_ && !inhibit_;
00072 #else
00073         return false;
00074 #endif

bool rDisplayList::IsInhibited (  )  const [inline]

Definition at line 76 of file rDisplayList.h.

References inhibit_.

00078     {
00079 #ifndef DEDICATED
00080         return inhibit_;
00081 #else
00082         return false;

bool rDisplayList::IsRecording (  )  [static]

check whether a displaylist is currently being recorded.

Definition at line 93 of file rDisplayList.cpp.

Referenced by ClearAll(), gWallRim_helper(), OnCall(), gCycleWallsDisplayListManager::RenderAll(), and eWallRim::RenderAll().

00094 {
00095     return sr_currentFiller;
00096 }

Here is the caller graph for this function:

bool rDisplayList::Call (  )  [inline]

calls the display list, returns true if there was a list to call

Definition at line 88 of file rDisplayList.h.

References OnCall().

Referenced by rModel::Render(), rConsole::Render(), gCycleWallsDisplayListManager::RenderAll(), eWallRim::RenderAll(), gNetPlayerWall::RenderList(), and rDisplayListFiller::Stop().

00091     {

Here is the call graph for this function:

Here is the caller graph for this function:

void rDisplayList::Clear ( int  inhibitGeneration = 1  ) 

clears the display list and don't regenerate it for the next few calls

Definition at line 132 of file rDisplayList.cpp.

References filling_, inhibit_, and list_.

Referenced by Cancel(), gCycleWallsDisplayListManager::Clear(), ClearAll(), gNetPlayerWall::ClearDisplayList(), eWallRim::DestroyDisplayList(), gNetPlayerWall::MyInitAfterCreation(), OnCall(), rConsole::Render(), gCycleWallsDisplayListManager::RenderAll(), and ~rDisplayList().

00133 {
00134 #ifndef DEDICATED
00135 
00136     // clear the list
00137     if ( !filling_ && list_ )
00138     {
00139         glDeleteLists( list_, 1 );
00140         list_ = 0;
00141     }
00142     else
00143     {
00144         // clear it later
00145         if ( list_ && inhibitGeneration < 1 )
00146         {
00147             inhibitGeneration = 1;
00148         }
00149     }
00150 
00151     // memorize inhibit counter
00152     if ( inhibit_ < inhibitGeneration )
00153     {
00154         inhibit_ = inhibitGeneration;
00155     }
00156 #endif
00157 }

Here is the caller graph for this function:

static rCallbackBeforeScreenModeChange sr_unload & rDisplayList::ClearAll (  )  [static]

clears all display lists

Definition at line 160 of file rDisplayList.cpp.

References Clear(), IsRecording(), tListItem< T >::Next(), and tASSERT.

Referenced by rISurfaceTexture::OnUnload(), and rISurfaceTexture::~rISurfaceTexture().

00161 {
00162 #ifndef DEDICATED
00163     tASSERT(!IsRecording());
00164 
00165     rDisplayList *run = se_displayListAnchor;
00166     while (run)
00167     {
00168         run->Clear();
00169         run = run->Next();
00170     }
00171 #endif
00172 }

Here is the call graph for this function:

Here is the caller graph for this function:

void rDisplayList::Cancel (  )  [static]

cancels recording of the current display list

Definition at line 175 of file rDisplayList.cpp.

References Clear(), rDisplayListFiller::list_, and rDisplayListFiller::Stop().

Referenced by rISurfaceTexture::OnSelect(), and rModel::Render().

00176 {
00177 #ifndef DEDICATED
00178     if ( sr_currentFiller )
00179     {
00180         sr_currentFiller->list_.Clear(0);
00181         sr_currentFiller->Stop();
00182     }
00183 #endif
00184 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool rDisplayList::OnCall (  )  [protected, virtual]

calls the display list, returns true if there was a list to call

Reimplemented in rDisplayListAlphaSensitive.

Definition at line 99 of file rDisplayList.cpp.

References Clear(), filling_, inhibit_, IsRecording(), list_, and tASSERT.

Referenced by Call(), and rDisplayListAlphaSensitive::OnCall().

00100 {
00101 #ifndef DEDICATED
00102     tASSERT( !filling_ );
00103 
00104     // no playback while another list is recorded; this
00105     // gives us a chance to agglomerate primitives.
00106     if ( IsRecording() )
00107     {
00108         return false;
00109     }
00110 
00111     if ( inhibit_ > 0 && list_ )
00112     {
00113         Clear();
00114         --inhibit_;
00115         return false;
00116     }
00117 
00118     if ( list_ )
00119     {
00120 #ifdef LIST_STATS
00121         sr_counter.Count( rListCounter::Use );
00122 #endif
00123         glCallList( list_ );
00124         return true;
00125     }
00126 #endif
00127 
00128     return false;
00129 }

Here is the call graph for this function:

Here is the caller graph for this function:

rDisplayList& rDisplayList::operator= ( rDisplayList const &   )  [private]


Friends And Related Function Documentation

friend class rDisplayListFiller [friend]

Definition at line 63 of file rDisplayList.h.


Member Data Documentation

GLuint rDisplayList::list_ [private]

the display list

Definition at line 109 of file rDisplayList.h.

Referenced by Clear(), IsSet(), OnCall(), rDisplayListFiller::Start(), rDisplayListFiller::Stop(), and ~rDisplayList().

int rDisplayList::inhibit_ [private]

inhibit display list generation for a while

Definition at line 110 of file rDisplayList.h.

Referenced by Clear(), IsInhibited(), IsSet(), OnCall(), rDisplayListFiller::Start(), and rDisplayListFiller::Stop().

bool rDisplayList::filling_ [private]

set if we're just filling the list

Definition at line 111 of file rDisplayList.h.

Referenced by Clear(), OnCall(), rDisplayListFiller::Start(), rDisplayListFiller::Stop(), and ~rDisplayList().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:52:24 2008 for Armagetron Advanced by  doxygen 1.5.4