library: libRGL #include "TGLDisplayListCache.h" |
TGLDisplayListCache
class description - header file - source file - inheritance tree (.pdf)
private:
TGLDisplayListCache(Bool_t enable = true, UInt_t size = 10000)
virtual ~TGLDisplayListCache()
UInt_t Find(TGLDisplayListCache::CacheID_t cacheID) const
void Init()
TGLDisplayListCache::CacheID_t MakeCacheID(const TGLDrawable& drawable, const TGLDrawFlags& flags) const
public:
TGLDisplayListCache(const TGLDisplayListCache&)
Bool_t CaptureIsOpen()
static TClass* Class()
Bool_t CloseCapture()
Bool_t Draw(const TGLDrawable& drawable, const TGLDrawFlags& flags) const
void Dump() const
void Enable(Bool_t enable)
static TGLDisplayListCache& Instance()
virtual TClass* IsA() const
Bool_t IsEnabled()
Bool_t OpenCapture(const TGLDrawable& drawable, const TGLDrawFlags& flags)
TGLDisplayListCache& operator=(const TGLDisplayListCache&)
void Purge()
void Purge(const TGLDrawable& drawable)
void Purge(const TGLDrawable& drawable, const TGLDrawFlags& flags)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
UInt_t fSize !
Bool_t fInit !
Bool_t fEnabled !
Bool_t fCaptureOpen !
UInt_t fDLBase !
UInt_t fDLNextFree !
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 !
static TGLDisplayListCache* fgInstance ! the singleton cache instance
static const UInt_t fgInvalidDLName
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)
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.
void Purge()
Purge all entries for all drawable/LOD pairs from cache
Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLDisplayListCache.cxx,v 1.12 2006/02/23 16:44:52 brun 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.