Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
icl::qt::GLContext Class Reference

Shallow Wrapper class around GLX and QGLContext instances. More...

#include <GLContext.h>

List of all members.

Public Types

typedef void * Handle
 internal handle type

Public Member Functions

 GLContext ()
 creates a null context
 GLContext (Handle handle, bool isGLX, long unsigned int pbuffer=0, Handle display=0)
 create a new context either of type GLXContext or of type QGLContext*
void makeCurrent () const
 selects the given context (makes it 'current')
bool isNull () const
 returns whether a context is null
 operator bool () const
 returns whether a contest is no null
bool operator< (const GLContext &other) const
bool operator== (const GLContext &other) const
 comparison operator

Static Public Member Functions

static GLContext currentContext ()
 returns the current context
static void set_current_glx_context (Handle handle, long unsigned int pbuffer, Handle display)
 sets ths curretn GLXContext
static void unset_current_glx_context ()

Protected Attributes

Handle handle
 context handle (either of type QGLContext* or GLXContext)
bool isGLX
 defines how to interpret handle
long unsigned int pbuffer
 for GLXContexts only: corresponding pbuffer ID
Handle display
 for GLXContexts only: current X-Display

Static Protected Attributes

static GLContext current_glx_context
 static instance (only necessary for GLXContexts)

Detailed Description

Shallow Wrapper class around GLX and QGLContext instances.

The GLContext class can be used to query the current GLContext activated. Right now, ICL knows two different kinds of GLContexts:

  1. QGLContext created by all 3D drawing components
  2. GLXContext created for offscreen rendering of scenes

The GLContex class provides a generic access to both types of contexts.

Please note that the GLContext class does right now only work in ICL. It is used in the GLFragmentShader class to determine wheter a given shader has already been compiled and set up for the current active GLContext.


Member Typedef Documentation

internal handle type


Constructor & Destructor Documentation

creates a null context

icl::qt::GLContext::GLContext ( Handle  handle,
bool  isGLX,
long unsigned int  pbuffer = 0,
Handle  display = 0 
) [inline]

create a new context either of type GLXContext or of type QGLContext*

Actually, this constructor should not be called manually


Member Function Documentation

returns the current context

bool icl::qt::GLContext::isNull ( ) const [inline]

returns whether a context is null

selects the given context (makes it 'current')

icl::qt::GLContext::operator bool ( ) const [inline]

returns whether a contest is no null

bool icl::qt::GLContext::operator< ( const GLContext other) const [inline]
bool icl::qt::GLContext::operator== ( const GLContext other) const [inline]

comparison operator

static void icl::qt::GLContext::set_current_glx_context ( Handle  handle,
long unsigned int  pbuffer,
Handle  display 
) [static]

sets ths curretn GLXContext

This is automatically done as long as the scene class instances is rendered into an offscreen rendering context

This is automatically called when Scene::render is finished and not offscreen rendering contexts are active any more.


Member Data Documentation

static instance (only necessary for GLXContexts)

for GLXContexts only: current X-Display

context handle (either of type QGLContext* or GLXContext)

bool icl::qt::GLContext::isGLX [protected]

defines how to interpret handle

long unsigned int icl::qt::GLContext::pbuffer [protected]

for GLXContexts only: corresponding pbuffer ID


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines