All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GLContext Class Reference

#include <GLContext.h>

Public Member Functions

virtual ~GLContext ()
 Default destructor. More...
HardwareContextHandle contextHandle () const
 Return OpenGL context handle. More...
bool isValid () const
 Return if context is valid. More...
int makeCurrent ()
 Make the context "current" before execution of OpenGL operations. More...

Static Public Member Functions

static GLContextPtr create (SimpleWindowPtr window, HardwareContextHandle context={})
 Create a new context. More...

Protected Member Functions

 GLContext (SimpleWindowPtr window, HardwareContextHandle context=0)

Protected Attributes

SimpleWindowPtr _window
HardwareContextHandle _contextHandle
bool _isValid

Detailed Description

An OpenGL context singleton

Definition at line 41 of file GLContext.h.

Constructor & Destructor Documentation

virtual GLContext::~GLContext ( )

Default destructor.

GLContext::GLContext ( SimpleWindowPtr  window,
HardwareContextHandle  context = 0 

Member Function Documentation

HardwareContextHandle GLContext::contextHandle ( ) const

Return OpenGL context handle.

Definition at line 54 of file GLContext.h.

static GLContextPtr GLContext::create ( SimpleWindowPtr  window,
HardwareContextHandle  context = {} 

Create a new context.

Definition at line 45 of file GLContext.h.

bool GLContext::isValid ( ) const

Return if context is valid.

Definition at line 60 of file GLContext.h.

int GLContext::makeCurrent ( )

Make the context "current" before execution of OpenGL operations.

Member Data Documentation

HardwareContextHandle GLContext::_contextHandle

Definition at line 76 of file GLContext.h.

bool GLContext::_isValid

Definition at line 79 of file GLContext.h.

SimpleWindowPtr GLContext::_window

Definition at line 73 of file GLContext.h.

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