class TGLContext


 This class encapsulates window-system specific information about a
 GL-context and alows their proper management in ROOT.

Function Members (Methods)

public:
TGLContext(TGLWidget* glWidget, Bool_t shareDefault = kTRUE, const TGLContext* shareList = 0)
virtual~TGLContext()
static TClass*Class()
Bool_tClearCurrent()
static TGLContext*GetCurrent()
TGLContextIdentity*GetIdentity() const
virtual TClass*IsA() const
Bool_tIsValid() const
Bool_tMakeCurrent()
voidRelease()
voidSetContext(TGLWidget* widget, const TGLContext* shareList)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
voidSwapBuffers()
private:
TGLContext(const TGLContext&)
TGLContext&operator=(const TGLContext&)

Data Members

private:
TGLPaintDevice*fDevice
Bool_tfFromCtorTo prohibit user's calls of SetContext.
TGLContextIdentity*fIdentity
TGLContextPrivate*fPimpl
Bool_tfValid

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLContext(TGLWidget* glWidget, Bool_t shareDefault = kTRUE, const TGLContext* shareList = 0)
 TGLContext ctor "from" TGLWidget.
 Is shareDefault is true, the shareList is set from default
 context-identity. Otherwise the given shareList is used (can be
 null).
 Makes thread switching.
void SetContext(TGLWidget* widget, const TGLContext* shareList)
WIN32 gl-context creation. Defined as a member-function (this code removed from ctor)
to make WIN32/X11 separation cleaner.
This function is public only for calls via gROOT and called from ctor.
Bool_t MakeCurrent()
If context is valid (TGLPaintDevice, for which context was created still exists),
make it current.
Bool_t ClearCurrent()
Reset current context.
void SwapBuffers()
If context is valid (TGLPaintDevice, for which context was created still exists),
swap buffers (in case of P-buffer call glFinish()).
void Release()
Make the context invalid and (do thread switch, if needed)
free resources.
~TGLContext()
TGLContext dtor. If it's called before TGLPaintDevice's dtor
(context is valid) resource will be freed and context
un-registered.
TGLContextIdentity * GetIdentity()
We can have several shared contexts,
and gl-scene wants to know, if some context
(defined by its identity) can be used.
TGLContext * GetCurrent()
Ask TGLContextPrivate to lookup context in its internal map.
TGLContext(TGLWidget* glWidget, Bool_t shareDefault = kTRUE, const TGLContext* shareList = 0)
   TGLContext(TGLPBuffer *glPbuf, const TGLContext *shareList = 0);
Bool_t IsValid()
{ return fValid; }

Author: Timur Pocheptsov, Jun 2007
Last change: root/gl:$Id: TGLContext.h 26250 2008-11-17 20:56:44Z matevz $
Last generated: 2008-11-18 08:46
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *

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.