Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::GLSurface Class Reference

#include <fglmesa.h>

Inheritance diagram for fgl::GLSurface:

Inheritance graph
[legend]
Collaboration diagram for fgl::GLSurface:

Collaboration graph
[legend]
List of all members.

Detailed Description

The wrapper to MesaGL (offscreen SW rendering). The basic is this surface. You can render the 3D scene into the Windowed or full-screen mode. In the Windowed mode there is one GL context for each Window. The mode is taken from the type of passed Window - if the Window is of the type ROOTWND, the rendering will runs in the full-screen mode.
Examples:

gears16.cpp, geartrain.cpp, and morph3d.cpp.


Public Member Functions

 GLSurface (FGDrawBuffer *, int ww=0, int hh=0, bool direct_access=0)
int MakeCurrent (void)
void DestroyContext (void)
void Draw (void)


Constructor & Destructor Documentation

fgl::GLSurface::GLSurface FGDrawBuffer d,
int  ww = 0,
int  hh = 0,
bool  direct_access = 0
 

Creates and initializes an OpenGL context (via MesaGL library) for 3D rendering. This context is connected with DrawBuffer or Window (as child of DrawBuffer). The size of rendered surface is taken from the size of connected DrawBuffer or size is explicitly passed to the constructor.

Parameters:
d the pointer to the connected surface
ww width of surface (less or equal to the connected surface)
hh height of surface (less or equal to the connected surface)
direct_access if true then rendering will be performed into the VIDEORAM directly, otherwise into RAM buffer. In some cases it takes some more FPS.


Member Function Documentation

void fgl::GLSurface::DestroyContext void   ) 
 

Destroy GL context. See an OpenGL architecture guide for more details.

void fgl::GLSurface::Draw void   ) 
 

Draws rendered scene on the screen if needed.

Examples:
gears16.cpp, and geartrain.cpp.

int fgl::GLSurface::MakeCurrent void   ) 
 

Makes this GL context current. See an OpenGL architecture guide for more details.


Generated on Wed Feb 9 11:31:49 2005 for OpenGUI by  doxygen 1.4.0