This class encapsulates window-system specific information about a GL-context and alows their proper management in ROOT.
TGLContext(TGLWidget* glWidget, Bool_t shareDefault = kTRUE, const TGLContext* shareList = 0) | |
virtual | ~TGLContext() |
static TClass* | Class() |
Bool_t | ClearCurrent() |
static TGLContext* | GetCurrent() |
TGLContextIdentity* | GetIdentity() const |
virtual TClass* | IsA() const |
Bool_t | IsValid() const |
Bool_t | MakeCurrent() |
void | Release() |
void | SetContext(TGLWidget* widget, const TGLContext* shareList) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
void | SwapBuffers() |
TGLContext(const TGLContext&) | |
void | GlewInit() |
TGLContext& | operator=(const TGLContext&) |
TGLPaintDevice* | fDevice | |
Bool_t | fFromCtor | To prohibit user's calls of SetContext. |
TGLContextIdentity* | fIdentity | |
TGLContextPrivate* | fPimpl | |
Bool_t | fValid | |
static Bool_t | fgGlewInitDone |
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.
Initialize GLEW - static private function. Called immediately after creation of the firs GL context.
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.
If context is valid (TGLPaintDevice, for which context was created still exists), make it current.
If context is valid (TGLPaintDevice, for which context was created still exists), swap buffers (in case of P-buffer call glFinish()).
TGLContext dtor. If it's called before TGLPaintDevice's dtor (context is valid) resource will be freed and context un-registered.
We can have several shared contexts, and gl-scene wants to know, if some context (defined by its identity) can be used.
TGLContext(TGLPBuffer *glPbuf, const TGLContext *shareList = 0);