library: libRGL
#include "TGLDisplayListCache.h"

TGLDisplayListCache


class description - header file - source file
viewCVS header - viewCVS source

class TGLDisplayListCache

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TGLDisplayListCache(const TGLDisplayListCache&)
Bool_tCaptureIsOpen()
static TClass*Class()
Bool_tCloseCapture()
Bool_tDraw(const TGLDrawable& drawable, const TGLDrawFlags& flags) const
voidDump() const
voidEnable(Bool_t enable)
static TGLDisplayListCache&Instance()
virtual TClass*IsA() const
Bool_tIsEnabled()
Bool_tOpenCapture(const TGLDrawable& drawable, const TGLDrawFlags& flags)
TGLDisplayListCache&operator=(const TGLDisplayListCache&)
voidPurge()
voidPurge(const TGLDrawable& drawable)
voidPurge(const TGLDrawable& drawable, const TGLDrawFlags& flags)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
private:
TGLDisplayListCache(Bool_t enable = true, UInt_t size = 10000)
virtual~TGLDisplayListCache()
UInt_tFind(TGLDisplayListCache::CacheID_t cacheID) const
voidInit()
TGLDisplayListCache::CacheID_tMakeCacheID(const TGLDrawable& drawable, const TGLDrawFlags& flags) const

Data Members

private:
UInt_tfSize!
Bool_tfInit!
Bool_tfEnabled!
Bool_tfCaptureOpen!
UInt_tfDLBase!
UInt_tfDLNextFree!
map<pair<const TGLDrawable*,const short>,unsigned int,less<pair<const TGLDrawable*,const short> >,allocator<pair<const pair<const TGLDrawable*,const short>,unsigned int> > >fCacheDLMap!
Bool_tfCaptureFullReported!
static TGLDisplayListCache*fgInstance! the singleton cache instance
static const UInt_tfgInvalidDLName

Class Description

                                                                      
 TGLDisplayListCache                                                  
                                                                      
 Singleton cache of GL display lists. Provides lazy automatic GL      
 display list capture of draws by a TGLDrawable at a certain 'LOD'    
 which can be disable on a global, per drawable or LOD basis.         
                                                                      
 Internally the cache creates a block of GL display lists of fSize,   // 
 and maintains a stl::map, mapping CacheID_t ids (created from        
 TGLDrawable and LOD draw flag) to 'name' entries in the GL display   
 list block.                                                          
                                                                      
 See TGLDrawable::Draw() for use.                                     
 NOTE: Purging of individual TGLDrawables not currently implemented:  
       Purge(const TGLDrawable & drawable)                            //    
       Purge(const TGLDrawable & drawable, UInt_t LOD)                // 

TGLDisplayListCache & Instance()
 Create (if required) and return the singleton display list cache
TGLDisplayListCache(Bool_t enable, UInt_t size)
 Construct display list cache.
 Private constructor - cache is singleton obtained through 
 TGLDisplayListCache::Instance()
~TGLDisplayListCache()
 Destroy display list cache - deleting internal GL display list block
void Init()
 Initialise the cache - create the internal GL display list block of size
 fSize
Bool_t Draw(const TGLDrawable & drawable, const TGLDrawFlags & flags)
 Draw (call) the GL dislay list entry associated with the drawable / LOD
 flag pair, and return kTRUE. If no list item associated, return KFALSE.
Bool_t OpenCapture(const TGLDrawable & drawable, const TGLDrawFlags & flags)
 Open capture of GL draw commands into cache entry, associated with 
 drawable / LOD pair. Capture is done in GL_COMPILE mode - so the cache 
 entry has to be drawn using TGLDisplayListCache::Draw() after capture close.

 Return kTRUE if opened, kFALSE if not. Capture is not opened if cache not 
 enabled or cache if full.
 GL display lists can be nested at 'run' (draw) time, but cannot be nested
 in capture - so attempting to nest captures is rejected.
Bool_t CloseCapture()
 Close currently open capture - return kTRUE if one open and successfully
 closed.
void Purge()
 Purge all entries for all drawable/LOD pairs from cache
void Purge(const TGLDrawable & /* drawable */)
 Purge all entries for a drawable at any LOD from cache
 NOTE: NOT IMPLEMENTED AT PRESENT!
void Purge(const TGLDrawable & /* drawable */, const TGLDrawFlags & /* flags */)
 Purge entry for a drawable/LOD from cache
 NOTE: NOT IMPLEMENTED AT PRESENT!
UInt_t Find(CacheID_t cacheID)
 Return the GL display list block name associated with 'cacheID' 
 cacheID is generated from drawable/flags pair - see 
 TGLDisplayListCache::MakeCacheID()
void Dump()
 Dump usage count of cache
TGLDisplayListCache(Bool_t enable = true, UInt_t size = 10000)
 Methods
CacheID_t MakeCacheID(const TGLDrawable & drawable, const TGLDrawFlags & flags)
void Enable(Bool_t enable)
 Cache manipulators
{ fEnabled = enable; }
Bool_t IsEnabled()
void   Resize(UInt_t size)     {}; //TODO
{ return fEnabled; }
Bool_t CaptureIsOpen()
{ return fCaptureOpen; }

Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLDisplayListCache.cxx,v 1.13 2006/12/09 23:01:54 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.