ROOT  6.06/09
Reference Guide
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TGLContextIdentity Class Reference

Identifier of a shared GL-context.

Objects shared among GL-contexts include: display-list definitions, texture objects and shader programs.

Definition at line 83 of file TGLContext.h.

Public Member Functions

 TGLContextIdentity ()
 
virtual ~TGLContextIdentity ()
 Destructor. More...
 
void AddRef (TGLContext *ctx)
 Add context ctx to the list of references. More...
 
void Release (TGLContext *ctx)
 Remove context ctx from the list of references. More...
 
void AddClientRef ()
 
void ReleaseClient ()
 
Int_t GetRefCnt () const
 
Int_t GetClientRefCnt () const
 
Bool_t IsValid () const
 
void RegisterDLNameRangeToWipe (UInt_t base, Int_t size)
 Remember dl range for deletion in next MakeCurrent or dtor execution. More...
 
void DeleteGLResources ()
 Delete GL resources registered for destruction. More...
 
TGLFontManagerGetFontManager ()
 Get the free-type font-manager associated with this context-identity. More...
 

Static Public Member Functions

static TGLContextIdentityGetCurrent ()
 Find identitfy of current context. Static. More...
 
static TGLContextIdentityGetDefaultIdentity ()
 Get identity of a default Gl context. Static. More...
 
static TGLContextGetDefaultContextAny ()
 Get the first GL context with the default identity. More...
 

Protected Attributes

TGLFontManagerfFontManager
 

Private Types

typedef std::pair< UInt_t, Int_tDLRange_t
 
typedef std::list< DLRange_tDLTrash_t
 
typedef DLTrash_t::const_iterator DLTrashIt_t
 
typedef std::list< TGLContext * > CtxList_t
 

Private Member Functions

void CheckDestroy ()
 Private function called when reference count is reduced. More...
 
 ClassDef (TGLContextIdentity, 0)
 

Private Attributes

Int_t fCnt
 
Int_t fClientCnt
 
DLTrash_t fDLTrash
 
CtxList_t fCtxs
 

Static Private Attributes

static TGLContextIdentityfgDefaultIdentity
 

#include <TGLContext.h>

+ Collaboration diagram for TGLContextIdentity:

Member Typedef Documentation

typedef std::list<TGLContext*> TGLContextIdentity::CtxList_t
private

Definition at line 124 of file TGLContext.h.

typedef std::pair<UInt_t, Int_t> TGLContextIdentity::DLRange_t
private

Definition at line 120 of file TGLContext.h.

typedef std::list<DLRange_t> TGLContextIdentity::DLTrash_t
private

Definition at line 121 of file TGLContext.h.

typedef DLTrash_t::const_iterator TGLContextIdentity::DLTrashIt_t
private

Definition at line 122 of file TGLContext.h.

Constructor & Destructor Documentation

TGLContextIdentity::TGLContextIdentity ( )

Referenced by GetDefaultIdentity().

TGLContextIdentity::~TGLContextIdentity ( )
virtual

Destructor.

Definition at line 487 of file TGLContext.cxx.

Member Function Documentation

void TGLContextIdentity::AddClientRef ( )
inline

Definition at line 96 of file TGLContext.h.

Referenced by TGLScene::PreDraw().

void TGLContextIdentity::AddRef ( TGLContext ctx)

Add context ctx to the list of references.

Definition at line 495 of file TGLContext.cxx.

Referenced by TGLContext::TGLContext(), and TGLViewer::TGLViewer().

void TGLContextIdentity::CheckDestroy ( )
private

Private function called when reference count is reduced.

Definition at line 585 of file TGLContext.cxx.

Referenced by Release(), and ReleaseClient().

TGLContextIdentity::ClassDef ( TGLContextIdentity  ,
 
)
private
void TGLContextIdentity::DeleteGLResources ( )

Delete GL resources registered for destruction.

Definition at line 530 of file TGLContext.cxx.

Referenced by TGLContext::MakeCurrent(), and TGLViewer::PreRender().

Int_t TGLContextIdentity::GetClientRefCnt ( ) const
inline

Definition at line 100 of file TGLContext.h.

TGLContextIdentity * TGLContextIdentity::GetCurrent ( )
static

Find identitfy of current context. Static.

Definition at line 546 of file TGLContext.cxx.

Referenced by TGLViewerBase::PreRender().

TGLContext * TGLContextIdentity::GetDefaultContextAny ( )
static

Get the first GL context with the default identity.

Can return zero, but that's OK, too. Static.

Definition at line 566 of file TGLContext.cxx.

Referenced by TGLContext::TGLContext().

TGLContextIdentity * TGLContextIdentity::GetDefaultIdentity ( )
static

Get identity of a default Gl context. Static.

Definition at line 555 of file TGLContext.cxx.

Referenced by TGLContext::TGLContext().

TGLFontManager * TGLContextIdentity::GetFontManager ( )

Get the free-type font-manager associated with this context-identity.

Definition at line 576 of file TGLContext.cxx.

Referenced by TGLRnrCtx::RegisterFontNoScale(), and TGLRnrCtx::ReleaseFont().

Int_t TGLContextIdentity::GetRefCnt ( ) const
inline

Definition at line 99 of file TGLContext.h.

Bool_t TGLContextIdentity::IsValid ( ) const
inline

Definition at line 102 of file TGLContext.h.

Referenced by TGLScene::ReleaseGLCtxIdentity().

void TGLContextIdentity::RegisterDLNameRangeToWipe ( UInt_t  base,
Int_t  size 
)

Remember dl range for deletion in next MakeCurrent or dtor execution.

Definition at line 522 of file TGLContext.cxx.

Referenced by TGLLogicalShape::PurgeDLRange().

void TGLContextIdentity::Release ( TGLContext ctx)

Remove context ctx from the list of references.

Definition at line 504 of file TGLContext.cxx.

Referenced by TGLContext::~TGLContext(), and TGLViewer::~TGLViewer().

void TGLContextIdentity::ReleaseClient ( )
inline

Definition at line 97 of file TGLContext.h.

Referenced by TGLScene::ReleaseGLCtxIdentity(), and TGLScene::~TGLScene().

Member Data Documentation

Int_t TGLContextIdentity::fClientCnt
private

Definition at line 116 of file TGLContext.h.

Referenced by AddClientRef(), CheckDestroy(), GetClientRefCnt(), and ReleaseClient().

Int_t TGLContextIdentity::fCnt
private

Definition at line 115 of file TGLContext.h.

Referenced by AddRef(), CheckDestroy(), GetRefCnt(), IsValid(), and Release().

CtxList_t TGLContextIdentity::fCtxs
private

Definition at line 127 of file TGLContext.h.

Referenced by AddRef(), GetDefaultContextAny(), and Release().

DLTrash_t TGLContextIdentity::fDLTrash
private

Definition at line 126 of file TGLContext.h.

Referenced by DeleteGLResources(), and RegisterDLNameRangeToWipe().

TGLFontManager* TGLContextIdentity::fFontManager
protected

Definition at line 87 of file TGLContext.h.

Referenced by DeleteGLResources(), GetFontManager(), and ~TGLContextIdentity().

TGLContextIdentity* TGLContextIdentity::fgDefaultIdentity
staticprivate

Definition at line 129 of file TGLContext.h.

Referenced by CheckDestroy(), GetDefaultContextAny(), and GetDefaultIdentity().


The documentation for this class was generated from the following files: