HDK
|
#include <glContext.h>
Public Member Functions | |
virtual GLF_API | ~GlfGLContext () |
GlfGLContext (const GlfGLContext &)=delete | |
GlfGLContext & | operator= (const GlfGLContext &)=delete |
GLF_API bool | IsCurrent () const |
Returns true if this context is current. More... | |
GLF_API bool | IsSharing (GlfGLContextSharedPtr const &otherContext) |
Returns true if this context is sharing with otherContext. More... | |
virtual bool | IsValid () const =0 |
Returns true if this context is valid. More... | |
virtual GlfGLContextSharedPtr | CreateSharingContext () |
Static Public Member Functions | |
static GLF_API GlfGLContextSharedPtr | GetCurrentGLContext () |
Returns an instance for the current GL context. More... | |
static GLF_API GlfGLContextSharedPtr | GetSharedGLContext () |
Returns an instance for the shared GL context. More... | |
static GLF_API void | MakeCurrent (const GlfGLContextSharedPtr &context) |
Makes context current if valid, otherwise makes no context current. More... | |
static GLF_API bool | AreSharing (GlfGLContextSharedPtr const &context1, GlfGLContextSharedPtr const &context2) |
Returns true if context1 and context2 are sharing. More... | |
static GLF_API bool | IsInitialized () |
Returns whether this interface has been initialized. More... | |
static GLF_API void | DoneCurrent () |
Makes no context current. More... | |
Protected Member Functions | |
GLF_API | GlfGLContext () |
virtual void | _MakeCurrent ()=0 |
Makes this context current. More... | |
virtual bool | _IsSharing (const GlfGLContextSharedPtr &rhs) const =0 |
Returns true if this context is sharing with rhs. More... | |
virtual bool | _IsEqual (const GlfGLContextSharedPtr &rhs) const =0 |
Returns true if this context is equal to rhs . More... | |
Provides window system independent access to GL contexts.
All OpenGL operation occurs within a current GL Context. The GL contexts used by an application are allocated and managed by the window system interface layer, i.e. Qt, GLUT, GLX, etc.
This class provides a way for lower-level OpenGL framework code to get useful information about the GL contexts in use by the application.
This mechanism depends on the application code registering callbacks to provide access to its GL contexts.
Definition at line 52 of file glContext.h.
|
virtual |
|
delete |
|
protected |
|
protectedpure virtual |
Returns true
if this context is equal to rhs
.
Implemented in GlfGLRawContext, and GlfTestGLContext.
|
protectedpure virtual |
Returns true
if this context is sharing with rhs.
Implemented in GlfGLRawContext, and GlfTestGLContext.
|
protectedpure virtual |
Makes this context current.
Implemented in GlfGLRawContext, and GlfTestGLContext.
|
static |
Returns true
if context1 and context2 are sharing.
|
inlinevirtual |
Creates a new GlfContext that shares GL resources with this context. The purpose of this function is to be able to create a new GL context on a second thread that shares with the context on the main-thread. If the GlfContext implementation does not support sharing contexts null is returned. Example usage: Main-thread: RegisterGLContextCallbacks(); GlfGLContext::MakeCurrent(...); Second-thread: s = GetCurrentGLContext(); c = s->CreateSharingContext();
Definition at line 116 of file glContext.h.
|
static |
Returns an instance for the current GL context.
|
static |
Returns an instance for the shared GL context.
GLF_API bool GlfGLContext::IsCurrent | ( | ) | const |
Returns true
if this context is current.
|
static |
Returns whether this interface has been initialized.
GLF_API bool GlfGLContext::IsSharing | ( | GlfGLContextSharedPtr const & | otherContext | ) |
Returns true
if this context is sharing with otherContext.
|
pure virtual |
Returns true
if this context is valid.
Implemented in GlfGLRawContext, and GlfTestGLContext.
|
static |
Makes context
current if valid, otherwise makes no context current.
|
delete |