FX::FXGLContext Class Reference

#include <FXGLContext.h>

Inheritance diagram for FX::FXGLContext:

Inheritance graph
[legend]

List of all members.


Detailed Description

A GL context is an object representing the OpenGL state information. Multiple GL context may share display lists to conserve memory. When drawing multiple windows, it may be advantageous to share not only display lists, but also GL contexts. Since the GL context is created for a certain frame-buffer configuration, sharing of GL contexts is only possible if the windows sharing the GL context all have the same GL visual. However, display lists may be shared between different GL contexts.

Public Member Functions

 FXGLContext (FXApp *a, FXGLVisual *vis)
 FXGLContext (FXApp *a, FXGLVisual *vis, FXGLContext *shared)
FXbool isShared () const
FXGLVisualgetVisual () const
virtual void create ()
virtual void detach ()
virtual void destroy ()
FXbool begin (FXDrawable *drawable)
FXbool end ()
void swapBuffers ()
void swapSubBuffers (FXint x, FXint y, FXint w, FXint h)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
virtual ~FXGLContext ()
FXAppgetApp () const
FXEventLoopgetEventLoop () const
FXID id () const
void setUserData (void *ptr)
void * getUserData () const
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchar * getClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

Protected Attributes

void * ctx
FXID xid

Constructor & Destructor Documentation

FX::FXGLContext::FXGLContext ( FXApp a,
FXGLVisual vis 
)

Construct an OpenGL context with its own private display list.

FX::FXGLContext::FXGLContext ( FXApp a,
FXGLVisual vis,
FXGLContext shared 
)

Construct an OpenGL context sharing display lists with an existing GL context.

virtual FX::FXGLContext::~FXGLContext (  )  [virtual]

Destructor.


Member Function Documentation

FXbool FX::FXGLContext::isShared (  )  const

Return TRUE if it is sharing display lists.

FXGLVisual* FX::FXGLContext::getVisual (  )  const [inline]

Get the visual.

virtual void FX::FXGLContext::create (  )  [virtual]

Create context.

Reimplemented from FX::FXId.

virtual void FX::FXGLContext::detach (  )  [virtual]

Detach the server-side resources for this window.

Reimplemented from FX::FXId.

virtual void FX::FXGLContext::destroy (  )  [virtual]

Destroy the server-side resources for this window.

Reimplemented from FX::FXId.

FXbool FX::FXGLContext::begin ( FXDrawable drawable  ) 

Make OpenGL context current prior to performing OpenGL commands.

FXbool FX::FXGLContext::end (  ) 

Make OpenGL context non current.

void FX::FXGLContext::swapBuffers (  ) 

Swap front and back buffer.

void FX::FXGLContext::swapSubBuffers ( FXint  x,
FXint  y,
FXint  w,
FXint  h 
)

Copy part of backbuffer to front buffer [Mesa].

virtual void FX::FXGLContext::save ( FXStream store  )  const [virtual]

Save object to stream.

Reimplemented from FX::FXId.

virtual void FX::FXGLContext::load ( FXStream store  )  [virtual]

Load object from stream.

Reimplemented from FX::FXId.

FXApp* FX::FXId::getApp (  )  const [inline, inherited]

Get application.

FXEventLoop* FX::FXId::getEventLoop (  )  const [inline, inherited]

Get event loop which owns this.

FXID FX::FXId::id (  )  const [inline, inherited]

Get XID handle.

void FX::FXId::setUserData ( void *  ptr  )  [inline, inherited]

Set user data pointer.

void* FX::FXId::getUserData (  )  const [inline, inherited]

Get user data pointer.

virtual long FX::FXObject::onDefault ( FXObject ,
FXSelector  ,
void *   
) [virtual, inherited]

Called for unhandled messages.

Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.

const FXchar* FX::FXObject::getClassName (  )  const [inherited]

Get class name of some object.

bool FX::FXObject::isMemberOf ( const FXMetaClass metaclass  )  const [inherited]

Check if object is member of metaclass.

virtual long FX::FXObject::tryHandle ( FXObject sender,
FXSelector  sel,
void *  ptr 
) [virtual, inherited]

Try handle message safely.

QTransString FX::FXObject::tr ( const char *  text,
const char *  hint = 0 
) [inherited]

Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)

virtual void* FX::FXObject::getPythonObject (  )  const [inline, virtual, inherited]

Returns the python object representing this instance (if created in python).

virtual void FX::FXObject::decouplePythonObject (  )  const [inline, virtual, inherited]

Causes decoupling of python object from this object (deletes self).


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

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 21:59:53 2008 for TnFOX by doxygen v1.5.6