Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXGLContext Class Reference

#include <FXGLContext.h>

Inheritance diagram for FX::FXGLContext:
FX::FXId FX::FXObject

List of all members.

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 ()

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.


Constructor & Destructor Documentation

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

Return TRUE if it is sharing display lists.

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.

Make OpenGL context current prior to performing OpenGL commands.

Make OpenGL context non current.

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.

Copyright © 1997-2005 Jeroen van der Zijp