Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::Gdk::GL Namespace Reference

C++ framework for the GdkGLExt Open-GL extension. More...

Compounds

Font Methods

Intialization Methods

Query Methods

Shape Methods

Enumerations


Detailed Description

C++ framework for the GdkGLExt Open-GL extension.

Provides the GDK objects which support OpenGL rendering in GTK.


Enumeration Type Documentation

enum Inti::Gdk::GL::ConfigMode
 

Enumeration values:
MODE_RGB  RGB mode (default).
MODE_RGBA  same as RGB
MODE_INDEX  Index buffer.
MODE_SINGLE  Single buffer (default).
MODE_DOUBLE  Double buffered.
MODE_STEREO  Stereo visual.
MODE_ALPHA  Color buffer has alpha bits.
MODE_DEPTH  Depth buffer.
MODE_STENCIL  Stencil buffer.
MODE_ACCUM  Accumulation buffer.
MODE_MULTISAMPLE  not supported yet


Function Documentation

void draw_cone bool  solid,
double  base,
double  height,
int  slices,
int  stacks
 

Renders a cone oriented along the Z axis.

Parameters:
solid Set true if the cone should be solid.
base The radius of the base of the cone.
height The height of the cone.
slices The number of subdivisions around the Z axis.
stacks The number of subdivisions along the Z axis.

The base of the cone is placed at Z = 0, and the top at Z = height. The cone is subdivided around the Z axis into slices, and along the Z axis into stacks.

void draw_cube bool  solid,
double  size
 

Renders a cube.

Parameters:
solid Set true if the cube should be solid.
size The length of cube sides.

The cube is centered at the modeling coordinates origin with sides of length size.

void draw_dodecahedron bool  solid  ) 
 

Renders a dodecahedron centered at the modeling coordinates origin with a radius of the square root of 3.

Parameters:
solid Set true if the dodecahedron should be solid.

void draw_icosahedron bool  solid  ) 
 

Renders a icosahedron.

Parameters:
solid Set true if the icosahedron should be solid.

The icosahedron is centered at the modeling coordinates origin and has a radius of 1.0.

void draw_octahedron bool  solid  ) 
 

Renders a octahedron centered at the modeling coordinates origin with a radius of 1.0.

Parameters:
solid Set true if the octahedron should be solid.

void draw_sphere bool  solid,
double  radius,
int  slices,
int  stacks
 

Renders a sphere centered at the modeling coordinates origin of the specified radius.

Parameters:
solid Set true if the sphere should be solid.
radius The radius of the sphere.
slices The number of subdivisions around the Z axis (similar to lines of longitude).
stacks The number of subdivisions along the Z axis (similar to lines of latitude).

The sphere is subdivided around the Z axis into slices and along the Z axis into stacks.

void draw_teapot bool  solid,
double  scale
 

Renders a teapot.

Parameters:
solid Set true if the teapot should be solid.
scale The relative size of the teapot.

Both surface normals and texture coordinates for the teapot are generated. The teapot is generated with OpenGL evaluators.

void draw_torus bool  solid,
double  inner_radius,
double  outer_radius,
int  nsides,
int  rings
 

Renders a torus (doughnut) centered at the modeling coordinates origin whose axis is aligned with the Z axis.

Parameters:
solid Set true if the torus should be solid.
inner_radius The inner radius of the torus.
outer_radius The outer radius of the torus.
nsides The number of sides for each radial section.
rings The number of radial divisions for the torus.

Pango::Font* font_use_pango_font const Pango::FontDescription &  font_desc,
int  first,
int  count,
int  list_base,
const Display *  display = 0
 

Creates bitmap display lists from a Pango::Font.

Parameters:
font_desc A Pango::FontDescription describing the font to use.
first The index of the first glyph to be taken.
count The number of glyphs to be taken.
list_base The index of the first display list to be generated.
display A Gdk::Display, or null for the default display.
Returns:
The Pango::Font used, or null if no font matched.

GdkGLProc get_proc_address const char *  proc_name  ) 
 

Gets the address of the OpenGL, GLU, or GLX function.

Parameters:
proc_name The function name.
Returns:
The address of the function named by proc_name.

void init int *  argc,
char ***  argv
 

Initialize the Inti-GL library.

Parameters:
argc The address of the argc parameter of your main() function.
argv The address of the argv parameter of main().

Call this method before using any other Gdk::GL functions in your applications. It will initialize everything needed to operate the library and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments.

Note: This method will terminate your program if it was unable to initialize the library for some reason. If you want your program to fall back to a textual interface you want to call Gdk::GL::init_check() instead. Any argv parameters understood by Gdk::GL::init() are stripped before returning and argc changed accordingly.

bool init_check int *  argc,
char ***  argv
 

Initialize the Inti-GL library.

Parameters:
argc The address of the argc parameter of your main() function.
argv The address of the argv parameter of main().
Returns:
true if the GUI has been successfully initialized, false otherwise.

This method does the same work as Gdk::GL::init() with only a single change: It does not terminate the program if the library can't be initialized. Instead it returns false on failure. This way the application can fall back to some other means of communication with the user - for example a curses or command line interface.

Any argv parameters understood by Gdk::GL::init() are stripped before returning and argc changed accordingly.

bool parse_args int *  argc,
char ***  argv
 

Parses command line arguments, and initializes global attributes of GdkGLExt.

Parameters:
argc The number of command line arguments.
argv The array of command line arguments.
Returns:
true if initialization succeeded, otherwise false.

Any arguments used by GdkGLExt are removed from the array and argc and argv are updated accordingly. You shouldn't call this function explicitely if you are using Gdk::GL::init(), or Gdk::GL::init_check().

bool query_extension const Gdk::Display *  display = 0  ) 
 

Indicates whether the window system supports the OpenGL extension (GLX, WGL, etc).

Parameters:
display The Gdk::Display where the query is sent to, or null for the default display.
Returns:
true if OpenGL is supported, false otherwise.

bool query_gl_extension const char *  extension  ) 
 

Determines whether a given OpenGL extension is supported.

Parameters:
extension The name of the OpenGL extension.
Returns:
true if the OpenGL extension is supported, false if not supported.

There must be a valid current rendering context to call query_gl_extension(). This method returns information about OpenGL extensions only. This means that window system dependent extensions (for example, GLX extensions) are not reported by query_gl_extension().

bool query_version int *  major,
int *  minor,
const Gdk::Display *  display = 0
 

Gets the version numbers of the OpenGL extension to the window system.

Parameters:
major Return location for the major version number of the OpenGL extension.
minor Return location for the minor version number of the OpenGL extension.
display The Gdk::Display where the query is sent to, or null for the default display.
Returns:
false if it fails, true otherwise.

In the X Window System, it returns the GLX version. In the Microsoft Windows, it returns the Windows version.
Main Page - Footer


Generated on Sun Sep 14 20:59:26 2003 for Inti-GL by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002