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 Methods

 FXGLContext (FXApp *a, FXGLVisual *vis)
 FXGLContext (FXApp *a, FXGLVisual *vis, FXGLContext *shared)
FXbool isShared () const
 Return TRUE if it is sharing display lists.

FXGLVisualgetVisual () const
 Get the visual.

virtual void create ()
 Create context.

virtual void detach ()
 Detach the server-side resources for this window.

virtual void destroy ()
 Destroy the server-side resources for this window.

FXbool begin (FXDrawable *drawable)
 Make OpenGL context current prior to performing OpenGL commands.

FXbool end ()
 Make OpenGL context non current.

void swapBuffers ()
 Swap front and back buffer.

void swapSubBuffers (FXint x, FXint y, FXint w, FXint h)
 Copy part of backbuffer to front buffer [Mesa].

virtual void save (FXStream &store) const
 Save object to stream.

virtual void load (FXStream &store)
 Load object from stream.

virtual ~FXGLContext ()
 Destructor.


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

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.