HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GlfGLContext Class Referenceabstract

#include <glContext.h>

+ Inheritance diagram for GlfGLContext:

Public Member Functions

virtual GLF_API ~GlfGLContext ()
 
 GlfGLContext (const GlfGLContext &)=delete
 
GlfGLContextoperator= (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

virtual GLF_API GlfGLContext::~GlfGLContext ( )
virtual
GlfGLContext::GlfGLContext ( const GlfGLContext )
delete
GLF_API GlfGLContext::GlfGLContext ( )
protected

Member Function Documentation

virtual bool GlfGLContext::_IsEqual ( const GlfGLContextSharedPtr rhs) const
protectedpure virtual

Returns true if this context is equal to rhs.

Implemented in GlfGLRawContext, and GlfTestGLContext.

virtual bool GlfGLContext::_IsSharing ( const GlfGLContextSharedPtr rhs) const
protectedpure virtual

Returns true if this context is sharing with rhs.

Implemented in GlfGLRawContext, and GlfTestGLContext.

virtual void GlfGLContext::_MakeCurrent ( )
protectedpure virtual

Makes this context current.

Implemented in GlfGLRawContext, and GlfTestGLContext.

static GLF_API bool GlfGLContext::AreSharing ( GlfGLContextSharedPtr const context1,
GlfGLContextSharedPtr const context2 
)
static

Returns true if context1 and context2 are sharing.

virtual GlfGLContextSharedPtr GlfGLContext::CreateSharingContext ( )
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 GLF_API void GlfGLContext::DoneCurrent ( )
static

Makes no context current.

static GLF_API GlfGLContextSharedPtr GlfGLContext::GetCurrentGLContext ( )
static

Returns an instance for the current GL context.

static GLF_API GlfGLContextSharedPtr GlfGLContext::GetSharedGLContext ( )
static

Returns an instance for the shared GL context.

GLF_API bool GlfGLContext::IsCurrent ( ) const

Returns true if this context is current.

static GLF_API bool GlfGLContext::IsInitialized ( )
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.

virtual bool GlfGLContext::IsValid ( ) const
pure virtual

Returns true if this context is valid.

Implemented in GlfGLRawContext, and GlfTestGLContext.

static GLF_API void GlfGLContext::MakeCurrent ( const GlfGLContextSharedPtr context)
static

Makes context current if valid, otherwise makes no context current.

GlfGLContext& GlfGLContext::operator= ( const GlfGLContext )
delete

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