![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXGLContext.h>
Public Member Functions | |
FXGLContext (FXApp *a, FXGLVisual *vis) | |
FXGLContext (FXApp *a, FXGLVisual *vis, FXGLContext *shared) | |
FXbool | isShared () const |
FXGLVisual * | getVisual () 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 () |
![]() | |
FXApp * | getApp () const |
FXID | id () const |
void | setUserData (void *ptr) |
void * | getUserData () const |
virtual | ~FXId () |
![]() | |
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) |
virtual | ~FXObject () |
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.
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 |
Destructor.
FXbool FX::FXGLContext::isShared | ( | ) | const |
Return TRUE if it is sharing display lists.
|
inline |
Get the visual.
|
virtual |
Create context.
Reimplemented from FX::FXId.
|
virtual |
Detach the server-side resources for this window.
Reimplemented from FX::FXId.
|
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.
Copy part of backbuffer to front buffer [Mesa].
|
virtual |
Save object to stream.
Reimplemented from FX::FXId.
![]() |