OpenGLEAN
OpenGLEAN User Support
Home page | Introduction | Documentation | Files | Examples | Proposals | Authors | Links


OpenGLEAN Development
Summary | CVS | (discussion via home page) | (contact via home page) | (suggestion box) | License | Todo | Bugs

Deprecated API Features
[OpenGLEAN API Reference]

Collaboration diagram for Deprecated API Features:


Functions

void glutAddMenuEntry (const char *label, int value)
void glutAddSubMenu (const char *label, int subMenuID)
void glutAttachMenu (int button)
void glutBitmapCharacter (GLUTfont font, int character)
int glutBitmapHeight (GLUTfont font)
int glutBitmapLength (GLUTfont font, const unsigned char *string)
void glutBitmapString (GLUTfont font, const unsigned char *string)
int glutBitmapWidth (GLUTfont font, int character)
void glutButtonBoxFunc (void(*callback)(int button, int state))
void glutChangeToMenuEntry (int item, const char *label, int value)
void glutChangeToSubMenu (int item, const char *label, int subMenuID)
void glutCloseFunc (void(*callback)(void))
int glutCreateMenu (void(*callback)(int value))
void glutDestroyMenu (int menuID)
void glutDetachMenu (int button)
void glutDialsFunc (void(*callback)(int dial, int value))
int glutEnterGameMode (void)
void glutForceJoystickFunc (void)
int glutGameModeGet (GLenum pname)
void glutGameModeString (const char *string)
void glutGetJoystickCenter (int ident, float *axes)
float glutGetJoystickDeadBand (int ident, int axis)
void glutGetJoystickMaxRange (int ident, float *axes)
void glutGetJoystickMinRange (int ident, float *axes)
int glutGetJoystickNotWorking (int ident)
int glutGetJoystickNumAxes (int ident)
int glutGetJoystickNumButtons (int ident)
float glutGetJoystickSaturation (int ident, int axis)
int glutGetMenu (void)
void * glutGetMenuData (void)
void glutJoystickFunc (void(*callback)(unsigned int buttons, int xaxis, int yaxis, int zaxis), int pollInterval)
void glutLeaveGameMode (void)
void glutMenuDestroyFunc (void(*callback)(void))
void glutMenuStatusFunc (void(*callback)(int status, int x, int y))
void glutMouseWheelFunc (void(*callback)(int wheel, int direction, int x, int y))
void glutRemoveMenuItem (int item)
void glutSetJoystickCenter (int ident, float *axes)
void glutSetJoystickDeadBand (int ident, int axis, float db)
void glutSetJoystickMaxRange (int ident, float *axes)
void glutSetJoystickMinRange (int ident, float *axes)
void glutSetJoystickSaturation (int ident, int axis, float st)
void glutSetMenu (int menuID)
void glutSetMenuData (void *data)
void glutSolidCone (GLdouble base, GLdouble height, GLint slices, GLint stacks)
void glutSolidCube (GLdouble width)
void glutSolidCuboctahedron (GLdouble s)
void glutSolidCylinder (GLdouble radius, GLdouble height, GLint slices, GLint stacks)
void glutSolidDodecahedron (void)
void glutSolidIcosahedron (void)
void glutSolidOctahedron (void)
void glutSolidRhombicDodecahedron (void)
void glutSolidSierpinskiSponge (int num_levels, const GLdouble offset[3], GLdouble scale)
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks)
void glutSolidTeapot (GLdouble size)
void glutSolidTetrahedron (void)
void glutSolidTorus (GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings)
void glutSpaceballButtonFunc (void(*callback)(int button, int state))
void glutSpaceballMotionFunc (void(*callback)(int x, int y, int z))
void glutSpaceballRotateFunc (void(*callback)(int x, int y, int z))
void glutStrokeCharacter (GLUTfont fontID, int character)
GLfloat glutStrokeHeight (GLUTfont fontID)
float glutStrokeLength (GLUTfont fontID, const unsigned char *string)
void glutStrokeString (GLUTfont fontID, const unsigned char *string)
float glutStrokeWidth (GLUTfont fontID, int character)
void glutTabletButtonFunc (void(*callback)(int button, int state, int x, int y))
void glutTabletMotionFunc (void(*callback)(int x, int y))
void glutVisibilityFunc (void(*callback)(int status))
void glutWireCone (GLdouble base, GLdouble height, GLint slices, GLint stacks)
void glutWireCube (GLdouble width)
void glutWireCuboctahedron (GLdouble s)
void glutWireCylinder (GLdouble radius, GLdouble height, GLint slices, GLint stacks)
void glutWireDodecahedron (void)
void glutWireIcosahedron (void)
void glutWireOctahedron (void)
void glutWireRhombicDodecahedron (void)
void glutWireSierpinskiSponge (int num_levels, const GLdouble offset[3], GLdouble scale)
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks)
void glutWireTeapot (GLdouble size)
void glutWireTetrahedron (void)
void glutWireTorus (GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings)
void glutWMCloseFunc (void(*callback)(void))

Detailed Description

Many GLUT/freeglut/OpenGLUT features will be chopped out of OpenGLEAN. Some are defective in design, some merely have no place in a tightly-focused library with OpenGLEAN's goals.

It is not expected that anything placed in the "deprecated" group will persist within OpenGLEAN. The features may be exported, in a source-compatible manner, to an external library. Or comparable functionality may be added back in via further API changes.


Function Documentation

void glutAddMenuEntry const char *  label,
int  value
 

Append an item to the current menu.

Parameters:
label Menu item text
value Menu item callback value
Inserts a given (label, value) pair into the current menu. label is the text displayed in the menu; value is the identifier received by the callback when the item is selected.

The new entry is added to the end of the menu.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutAddSubMenu(), glutChangeToMenuEntry(), glutChangeToSubMenu(), glutRemoveMenuItem()

void glutAddSubMenu const char *  label,
int  subMenuID
 

Append a submenu to the current menu.

Parameters:
label Submenu item text
subMenuID Submenu identifier
Attaches an existing menu as a submenu of the current menu. label is the text used for the item in the menu. subMenuID is the identifier of an existing menu to be appended as a submenu.

The submenu is added to the end of the menu.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutCreateMenu(), glutAddMenuEntry()

void glutAttachMenu int  button  ) 
 

Attach the current menu to the current window.

Parameters:
button Mouse button to bind to
Associates the button with the current menu in the current window.

The following are fatal errors:

  • To call this function without properly initializing OpenGLEAN via glutInit().
  • To call this function without a current menu.
  • To call this function without a current window.

See also:
glutCreateMenu(), glutSetMenu(), glutDetachMenu(),
Todo:
Assumes 3 mouse buttons. (Actually OPENGLEAN_MAX_MENUS holds the assumed number of buttons.) Cannot bind to more buttons. Will not issue any warnings or errors if the user does not have enough buttons to reach your menu.

void glutBitmapCharacter GLUTfont  font,
int  character
 

Draw a bitmapped character.

Parameters:
font A bitmapped font identifier.
character A character code.
Draw a character at the current OpenGL raster position using a bitmapped font. The raster position is advanced by the width of the character.

Nothing is drawn, and the raster position is unaffected when either:

  • character is out of range
  • font is not a valid OpenGLEAN bitmap font
  • The current OpenGL raster position is invalid

Note:
glutBitmapString() is generally more efficient for strings of characters.
See also:
glRasterPos(), glutBitmapString(), glutBitmapWidth(), glutBitmapHeight(), glutStrokeCharacter()

int glutBitmapHeight GLUTfont  font  ) 
 

Return the height of a given font, in pixels.

Parameters:
font A bitmapped font identifier.
Return the line-to-line vertical spacing (in pixels) between lines of a bitmapped font.

Returns 0 if font is invalid.

Note:
Does not report the height used by individual characters. This may limit its usefulness. (Compare with other font-metric queries.)
See also:
glutBitmapCharacter(), glutBitmapString(), glutBitmapWidth(), glutBitmapLength(), glutStrokeHeight()
Todo:
We have discussed adding a "font descender" query. We should go ahead and do it.

int glutBitmapLength GLUTfont  font,
const unsigned char *  string
 

Return the width of a bitmapped string, in pixels.

Parameters:
font A bitmapped font identifier.
string A NUL-terminated ASCII string.
Returns the maximum horizontal OpenGL raster position offset for a string in a bitmapped font.

As with glutBitmapString(), newlines are taken into consideration.

Returns 0 if the font is invalid or if the string is empty or NULL.

See also:
glutBitmapString(), glutBitmapWidth(), glutBitmapHeight(), glutStrokeLength()

void glutBitmapString GLUTfont  font,
const unsigned char *  string
 

Draw a string of bitmapped characters.

Parameters:
font A bitmapped font identifier.
string A NUL-terminated ASCII string.
Draw a string the current OpenGL raster position using a bitmapped font. The raster position is advanced by the width of the string.

The starting raster position is used as the left margin for multi-line strings. Each newline character repositions the raster position at the beginning of the next line.

Nothing is drawn, and the raster position is unaffected when either:

  • font is not a valid OpenGLEAN bitmap font
  • string is an empty string or NULL pointer
  • The current OpenGL raster position is invalid

See also:
glRasterPos(), glutBitmapCharacter()

int glutBitmapWidth GLUTfont  font,
int  character
 

Return the width of a bitmapped character, in pixels.

Parameters:
font A bitmapped font identifier.
character A character code.
Returns the horizontal OpenGL raster position offset for a character in a bitmapped font.

It is also an upper bound on the width of the bitmapped glyph for character, though not all letters will use their full width, especially fixed-width fonts.

Returns 0 if the character is out of the inclusive range [0,255] or if the font is invalid.

Note:
In GLUT, some glyphs could render to the left of the starting position, in some fonts. OpenGLEAN's fonts all position all of their glyphs to start at, or to the right of, the initial position.
See also:
glutBitmapCharacter(), glutBitmapLength(), glutBitmapHeight(), glutStrokeWidth()

void glutButtonBoxFunc void(*)(int button, int state)  callback  ) 
 

Sets a button-box button callback.

Parameters:
callback Client buttonbox button hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

A dials-and-buttons box has buttons numbered from 1 to glutDeviceGet(GLUT_NUM_BUTTON_BOX_BUTTONS), inclusive. The parameters callback are the button and its state as either GLUT_UP or GLUT_DOWN .

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement button-box support.

Also in contrast, mouse buttons are numbered from 0 in the GLUT API. This is a wrinkle.

See also:
glutDialsFunc()

void glutChangeToMenuEntry int  item,
const char *  label,
int  value
 

Replace a menu entry with an item.

Parameters:
item Integer position down the list
label Menu item text
value Menu item callback value
Walks the list of the menu items and replaces the numbered item in the list with the given definition. Except that it replaces a pre-existing item, this function is much like glutAddMenuEntry().

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutAddMenuEntry(), glutAddSubMenu(), glutChangeToSubMenu(), glutRemoveMenuItem()

void glutChangeToSubMenu int  item,
const char *  label,
int  subMenuID
 

Replace a menu entry with a submenu.

Parameters:
item Integer position down the list
label Submenu item text
subMenuID Submenu identifier
Walks the list of the menu items and replaces the numbered item in the list with the given submenu.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutAddMenuEntry(), glutAddSubMenu(), glutChangeToMenuEntry(), glutRemoveMenuItem()

void glutCloseFunc void(*)(void)  callback  ) 
 

Window destruction callback.

Parameters:
callback Client window destruction hook.
Deprecated. The basic design of the feature is wrong. It makes more sense to have the library invoke your callback and let your callback return 0/1 to tell OpenGLUT to continue or not. This would let us get rid of the rather annoying state-twiddling mechanism that freeglut uses. (Alternatively, let the client call glutLeaveMainLoop().) Ideally, this function should have been called glutDestroyWindowFunc(), or similar.

When a window is destroyed by user-action in traditional GLUT, the application terminates. In freeglut, OpenGLUT, and OpenGLEAN, the application can choose to persist and treat the window close event as a normal event. This callback is how that event is transmitted to the application.

This callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
This function is exactly the same as glutWMCloseFunc(), which has been deprecated. This function should be used instead.
See also:
glutDestroyWindow(), glutWMCloseFunc()
Todo:
There needs to be some work to rationalize the behavior when a window is closed. Presently, the handling is ad-hoc and sloppy.

int glutCreateMenu void(*)(int value)  callback  ) 
 

Create a new menu.

Parameters:
callback Client hook for the new menu.
Create a menu with a callback bound to callback, and return the menu's integer id.

When the user makes a selection from this menu, callback is invoked with the parameter value, which comes from the (label, value) pair that is defined with glutAddMenuEntry().

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

See also:
glutAddMenuEntry(), glutAddSubMenu(), glutDestroyMenu()

void glutDestroyMenu int  menuID  ) 
 

Destroy a menu.

Parameters:
menuID The menu to destroy.
Destroys a given menu object by its ID.

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

See also:
glutCreateMenu()

void glutDetachMenu int  button  ) 
 

Detach menu from the current window.

Parameters:
button Mouse button to unbind from.
If the given button has a menu bound to it, this breaks the assocation.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current window.

See also:
glutCreateMenu, glutDestroyMenu(), glutAttachMenu()

void glutDialsFunc void(*)(int dial, int value)  callback  ) 
 

Sets a dials-box button callback.

Parameters:
callback Client dials-box dial hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

A dials-and-buttons box has dials numbered from 1 to glutDeviceGet(GLUT_NUM_BUTTON_BOX_DIALS), inclusive. The parameters to callback are the dial and its value the latter being an absolute rotation in degrees.

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement dials-box support.
See also:
glutButtonBoxFunc()

int glutEnterGameMode void   ) 
 

Enter game mode

GLUT's gamemode is deprecated. Do not use it. Consider using glutFullScreen(), glutCreateMenuWindow(), or similar, instead. OpenGLEAN is considering providing a more usable set of features to control video mode and such, by which all capabilities of gamemode (and then some) can be accomplished.

Any combination of the following may apply:

  • Resolution change, possibly to the requested resolution, possibly to a "nearest match".
  • Refresh frequency change.
  • A window with drawable area equal to the requested screen resolution may be created.
  • The mouse may be restricted to operate within your window.

Note:
freeglut developers claim that "many" man pages for this function say that this function returns void. I cannot see where that is true. GLUT never properly documented it as far as I know, and I don't believe that OpenGLUT or OpenGLEAN ever made such a claim.

Only returns a boolean value. Some GLUT implementations may return a window ID, but in old GLUT, at least on WIN32, I gather that gamemode's purpose was to bypass the windowing system altogehter. It is meaningless to talk about window IDs for gamemode in that case. You should not be calling glutSetWindow() or any other window creation, management, or destruction functions while in gamemode. You should only take a 0/non-0 return from glutEnterGameMode().

Varies in behavior; X users can disable the resolution change by an OpenGLEAN compile-time option.

Deprecated.

See also:
glutGameModeString(), glutEnterGameMode(), glutLeaveGameMode(), glutGameModeGet()
Bug:
OpenGLEAN may be unable to restore the original settings (this has been observed on WIN32).

void glutForceJoystickFunc void   ) 
 

Forces a joystick poll and callback.

THIS FUNCTION IS DEPRECATED.

Like all OpenGLEAN joystick support, this function is deprecated. The plan is to spin joystick support off into a separate library.

Forces the OpenGLEAN joystick code to poll your joystick(s) and to call your joystick callbacks with the result. The operation completes, including callbacks, before glutForceJoystickFunc() returns.

It is a fatal error to call this function without first initializing OpenGLEAN via glutInit().

See also:
glutJoystickFunc()

int glutGameModeGet GLenum  pname  ) 
 

Return the value of a game mode parameter.

Parameters:
pname The parameter value to be returned
GLUT's gamemode is deprecated. Do not use it. Consider using glutFullScreen(), glutCreateMenuWindow(), or similar, instead. OpenGLEAN is considering providing a more usable set of features to control video mode and such, by which all capabilities of gamemode (and then some) can be accomplished.

pname is one of:

  • GLUT_GAME_MODE_ACTIVE Return non-zero if we are presently in gamemode.
  • GLUT_GAME_MODE_POSSIBLE Return whether the requested gamemode settings are viable. (May also actually change the mode?) Does not necessarily tell you whether entering gamemode will have any effect.
  • GLUT_GAME_MODE_WIDTH Return the game mode width. (in pixels)
  • GLUT_GAME_MODE_HEIGHT Return the game mode height. (in pixels)
  • GLUT_GAME_MODE_PIXEL_DEPTH Return the game mode pixel depth. (in bits)
  • GLUT_GAME_MODE_REFRESH_RATE Return the game mode vertical refresh frequency. (in Hz)
  • GLUT_GAME_MODE_DISPLAY_CHANGED Return non-zero if we are presently in gamemode. (Same as GLUT_GAME_MODE_ACTIVE.)

If pname is unknown, a warning is printed and a value of -1 is returned.

Note:
Deprecated
See also:
glutGameModeString(), glutEnterGameMode(), glutLeaveGameMode(), glutGameModeGet()
Todo:
OpenGLEAN intrepretation of GLUT_GAME_MODE_DISPLAY_CHANGED

void glutGameModeString const char *  string  ) 
 

Set the game mode display string.

Parameters:
string A configuration parameter as a string.
GLUT's gamemode is deprecated. Do not use it. Consider using glutFullScreen(), glutCreateMenuWindow(), or similar, instead. OpenGLEAN is considering providing a more usable set of features to control video mode and such, by which all capabilities of gamemode (and then some) can be accomplished.

Sets the gamemode status according to an undocumented string.

Glancing at old GLUT 3.7, the freeglut codebase that we inherited does not implement more than a single GLUT gamemode ``criteria''. It may not even do that much correctly.

In principle, this code lets you set the video dimensions, rendering depth, and video refresh rate. In practice, the combination that you request may be unsupportable and the target host may even refuse to honor any such changes.

If you use this function but do not set all options, the following defaults may be substituted for some values:

  • width 640
  • height 480
  • depth 16
  • refresh 72

Note:
This function is deprecated.
See also:
glutGameModeString(), glutEnterGameMode(), glutLeaveGameMode(), glutGameModeGet()

void glutGetJoystickCenter int  ident,
float *  axes
 

Retrieves the joystick's nominal at-rest position.

Parameters:
ident The joystick of interest
axes Where to store old values for each axi.
Because joysticks are not terribly consistent devices, it is desirable to callibrate for the joystick's actual at-rest position. This function helps you do that.

Note:
axes is not checked, and axes should have for at least glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutSetJoystickCenter(), glutGetJoystickDeadBand()

float glutGetJoystickDeadBand int  ident,
int  axis
 

Returns the joystick's "dead band".

Parameters:
ident The joystick in which we are interested.
axis The interesting axis of the joystick.
My understanding of joystick hardware is limited, but apparently there is a region near the center where we want to consider the joystick "stationary", even if it is reading slightly off-center. This is to accomodate imperfections in joysticks.

See also:
glutSetJoystickDeadBand()

void glutGetJoystickMaxRange int  ident,
float *  axes
 

Get the joystick's maximum range.

Parameters:
ident The joystick in which we are interested.
axes Where to store max. ranges for the joystick's axes.
Using this function allows your application to calibrate the joystick's maximum range.

Note:
axes is not checked, and axes should have space for at least glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutGetJoysticksaturation()

void glutGetJoystickMinRange int  ident,
float *  axes
 

Get the joystick's maximum range.

Parameters:
ident The joystick in which we are interested.
axes Where to store min. ranges for the joystick's axes.
Using this function allows your application to calibrate the joystick's maximum range.

Note:
axes is not checked, and axes should have space for at least glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutGetJoysticksaturation()

int glutGetJoystickNotWorking int  ident  ) 
 

Returns 0 if the joystick is working.

Parameters:
ident The joystick that we are interested in.
OpenGLEAN provides a joytick API extension which allows you to directly poll the joysticks.

glutGetJoystickNotWorking() returns 0 if the joystick is working, and non-zero if it is not working. If it is not working, no indication of why it fails will be provided. If a joystick transitions from working to noot working, there is no way to detect it except by querying again.

Note:
Actually returns an opaque integer error-code. A return of 0 apparently means "no error". The possible non-zero codes are undocumented. Probably should return !!error, or (better still) the function should have been called glutGetJoystickWorking() and returned !error. Or...best of all: Add a glutGet() or glutDeviceGet() for it.

int glutGetJoystickNumAxes int  ident  ) 
 

Returns the number proportional axes on a joystick.

Parameters:
ident The joystick that we want.
OpenGLEAN provides a joystick API extension which allows you to directly poll the joysticks.

glutGetJoystickNumAxes() queries the OpenGLEAN API for informaation about the number of axes on a given joystick.

See also:
glutGetJoystickNumButtons()

int glutGetJoystickNumButtons int  ident  ) 
 

Returns the number of boolean buttons on a joystick.

Parameters:
ident The joystick that we want.
OpenGLEAN provides a joystick API extension which allows you to directly poll the joysticks.

glutGetJoystickNumButtons() queries the OpenGLEAN API for informaation about the number of buttons on a given joystick.

See also:
glutGetJoystickNumAxes()

float glutGetJoystickSaturation int  ident,
int  axis
 

Get the joystick's saturation.

Parameters:
ident The joystick in which we are interested.
axis The interesting axis of the joystick.
Using this function allows your application to query the joystick's saturation.

See also:
glutSetJoystickSaturation()

int glutGetMenu void   ) 
 

Get the current menu ID.

Returns the integer ID of the current menu.

Currently returns 0 if there is no current menu.

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

Note:
Arguably we should also OPENGLEAN_REQUIRE_MENU().
See also:
glutSetMenu()

void* glutGetMenuData void   ) 
 

Retrieve menu user data pointer

Retrieve a previously stored user data pointer from the current menu.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutSetMenuData()

void glutJoystickFunc void(*)(unsigned int buttons, int xaxis, int yaxis, int zaxis)  callback,
int  pollInterval
 

Reports joystick state for the current window.

Parameters:
callback Client function for joystick events
pollInterval Approximate (minimum) millisecond interval
The callback is called roughly every pollinterval milliseconds, and will give the joystick status.

The buttons bitmask is a bit-wise OR of:

  • GLUT_JOYSTICK_BUTTON_A
  • GLUT_JOYSTICK_BUTTON_B
  • GLUT_JOYSTICK_BUTTON_C
  • GLUT_JOYSTICK_BUTTON_D

The axis values are in the range [-1000,1000].

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
This function has been deprecated. The inherent nature of the code is to actively poll an unrelated device. There is no reason that you could not do this yourself with standard GLUT timers and a separate function for polling the joystick. As OpenGLEAN is aiming to make a leaner, focused library, the joystick will be moved elsewhere. To preserve the functionality in a compatibly licensed, non-conflicting library, however, OpenGLEAN will export its joystick polling support to a satellite library before removing this feature from the core.

void glutLeaveGameMode void   ) 
 

Leave game mode, returning to normal desktop mode

GLUT's gamemode is deprecated. Do not use it. Consider using glutFullScreen(), glutCreateMenuWindow(), or similar, instead. OpenGLEAN is considering providing a more usable set of features to control video mode and such, by which all capabilities of gamemode (and then some) can be accomplished.

Note:
Deprecated.
See also:
glutGameModeString(), glutEnterGameMode(), glutLeaveGameMode(), glutGameModeGet()

void glutMenuDestroyFunc void(*)(void)  callback  ) 
 

Destruction callback for menus.

Parameters:
callback Client menu destruction hook.
Deprecated.

The menu functions are deprecated from OpenGLEAN. It would be better to put them in an external library.

When a menu is destroyed, OpenGLEAN will call this hook, if defined on that menu.

This callback is not bound to any window.

This callback is bound to a specific menu.

Note:
For emphasis, we repeat: This callback does not bind to any window.
See also:
glutCloseFunc(), glutCreateMenu(), glutDestroyMenu()
Todo:
What on Earth is rationale for this feature? Menus should only be destroyed when we ask them to be destroyed, or when their window is destroyed. In the former case, we already know that the menu is being destroyed because we requested it. In the latter case, it is easy for the client to track that if they care, via window-destruction callbacks.

void glutMenuStatusFunc void(*)(int status, int x, int y)  callback  ) 
 

Informs client of changes to menu status.

Parameters:
callback Client menu status hook.
Deprecated.

The menu functions are deprecated from OpenGLEAN. It would be better to put them in an external library.

Broadly, OpenGLEAN operates in two modes. At any given time, it is either in menu mode (with a popup menu display, possibly with subitems) or it is not.

When moving from non-menu to menu status, callback (if defined) will be called with GLUT_MENU_IN_USE . Conversely, when moving from menu to non-menu status, callback (if defined) will be called with GLUT_MENU_NOT_IN_USE .

This differs from the old, deleted glutMenuStateFunc() in that glutMenuStateFunc() did not let you obtain mouse x and y coordinates of the mouse when the menu state transition took place.

This callback is bound to both the current window and the current menu.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit().

See also:
glutAddMenu(), glutMenuDestroyFunc()
Bug:
Your callback is not actually called presently.

void glutMouseWheelFunc void(*)(int wheel, int direction, int x, int y)  callback  ) 
 

Sets the mouse wheel callback for the current window.

Parameters:
callback Client hook for mouse wheel events.
Deprecated. Use button numbers, which are just as reliable and informational. A new API with support for more information, and more reliable reporting, will be added later. Usually, 3 real buttons are allowed for, and 4th and 5th pseudo-buttons are reported for mouse-wheel ticks. But mice with more (or less) than 3 buttons are known, as are mice with more (and less) than 1 wheel. You are better off interacting with the user or using a configuration file than relying on this function.

If the mouse wheel is spun over your (sub)window, OpenGLEAN will, in theory, report this via the MouseWheel callback. wheel is the wheel number, direction is +/- 1, and x and y are the mouse coordinates.

If you do not register a wheel callback, wheel events will be reported as mouse buttons.

This callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
Windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent.
See also:
glutMouseFunc()
Bug:
Due to lack of information about the mouse, it is impossible to implement this correctly on X at this time. Use of this function limits the portability of your application. (This feature does work on X, just not reliably.) You are encouraged to use the standard, reliable mouse-button reporting, rather than wheel events.

void glutRemoveMenuItem int  item  ) 
 

Remove a given menu item.

Parameters:
item Integer position down the list
Walks the list of the menu items and deletes the numbered item in the list.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutAddMenuEntry(), glutAddSubMenu(), glutChangeToMenuEntry(), glutChangeToSubMenu()

void glutSetJoystickCenter int  ident,
float *  axes
 

Sets the joystick's nominal at-rest position.

Parameters:
ident The joystick of interest
axes New values for the center position on each axis.
Because joysticks are not terribly consistent devices, it is desirable to callibrate for the joystick's actual at-rest position. This function helps you do that.

Note:
axes is not checked, and axes should have at least glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutGetJoystickCenter(), glutSetJoystickDeadBand()

void glutSetJoystickDeadBand int  ident,
int  axis,
float  db
 

Set the joystick's deadband.

Parameters:
ident The joystick in which we are interested.
axis The interesting axis of the joystick.
db The new deadband setting.
Using this function allows your application to calibrate the joystick's deadband.

See also:
glutGetJoystickDeadBand()

void glutSetJoystickMaxRange int  ident,
float *  axes
 

Set the joystick's maximum range.

Parameters:
ident The joystick in which we are interested.
axes New max. ranges for the joystick's axes.
Using this function allows your application to calibrate the joystick's maximum range.

Note:
axes is not checked, and axes should have at least as glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutGetJoysticksaturation()

void glutSetJoystickMinRange int  ident,
float *  axes
 

Set the joystick's minimum range.

Parameters:
ident The joystick in which we are interested.
axes New min. ranges for the joystick's axes.
Using this function allows your application to calibrate the joystick's minimum range.

Note:
axes is not checked, and axes should have at least as glutGetJoystickNumAxes(ident) worth of float values.
See also:
glutGetJoystickMinRange(), glutSetJoystickMaxRange()

void glutSetJoystickSaturation int  ident,
int  axis,
float  st
 

Set the joystick's saturation.

Parameters:
ident The joystick in which we are interested.
axis The interesting axis of the joystick.
st The new saturation setting.
Using this function allows your application to calibrate the joystick's saturation.

See also:
glutGetJoystickSaturation()

void glutSetMenu int  menuID  ) 
 

Set the current menu ID.

Parameters:
menuID Selected menu
Set the current menu to the specified menuID.

It is a fatal error to call this function without properly initializing OpenGLEAN via glutInit().

See also:
glutGetMenu()

void glutSetMenuData void *  data  ) 
 

Store menu user data pointer.

Parameters:
data Client pointer data
glutSetMenuData() associates an arbitrary user data pointer, data, with the current menu. OpenGLEAN does not interpret this pointer in any way, but merely stores it for you in the menu structure.

It is a fatal error either to call this function without properly initializing OpenGLEAN via glutInit() or to call this function without a current menu.

See also:
glutGetMenuData()

void glutSolidCone GLdouble  base,
GLdouble  height,
GLint  slices,
GLint  stacks
 

Draw a solid cone.

Parameters:
base Cone radius at the base in the xy plane.
height Height of cone in positive z direction.
slices The number of divisions around the z axis. (latitudal)
stacks The number of divisions along the z axis. (longitudal)
The glutSolidCone() function draws a shaded cone with a base in the xy-plane, oriented in the positive z direction.

Note:
The number of polygons representing the conical surface is proportional to (slices*stacks).
See also:
glutWireCone()

void glutSolidCube GLdouble  width  ) 
 

Draw a solid cube centered at the origin.

Parameters:
width The width, height and depth of the cube.
The glutSolidCube() function draws a solid-shaded cube with side-length given by width. The vertices of the cube are at (+/- width/2, +/- width/2, +/- width/2), so that the cube is centered at the origin.

Author:
Code contributed by Andreas Umbach <marvin@dataway.ch>
See also:
glutWireCube()

void glutSolidCuboctahedron GLdouble  s  ) 
 

Draw a solid "cuboctahedron".

Parameters:
s Scale factor.
A cuboctahedron is described by John Fay as a cube with the corners sliced off just deeply enough that each of the facets (where the corners were) touch one another. The result is that the 6 square faces of the original cube are still square, but smaller (and 45 degrees rotated in their planes), while 8 new equilateral facets are added at what used to be the corners.

The scaling parameter, s, allows you to adjust the size of the resulting object.

The object is centered at the origin.

See also:
glutWireCuboctahedron

void glutSolidCylinder GLdouble  radius,
GLdouble  height,
GLint  slices,
GLint  stacks
 

Draw a solid cylinder.

Parameters:
radius Radius of the cylinder.
height Z height.
slices Divisions around z axis.
stacks Divisions along z axis.
glutSolidCylinder() draws a shaded cylinder, the center of whose base is at the origin and whose axis is along the positive z axis.

See also:
glutWireCylinder()

void glutSolidDodecahedron void   ) 
 

Draw a solid dodecahedron.

This function draws a regular, solid, 12-sided polyhedron centered at the origin. The distance from the origin to the vertices is sqrt(3). The facets are pentagons.

See also:
glutWireDodecahedron(), glutSolidRhombicDodecahedron(), glutWireRhombicDodecahedron()

void glutSolidIcosahedron void   ) 
 

Draw a solid icosahedron.

This function draws a regular, solid 20-sided polyhedron centered at the origin. The distance from the origin to the vertices is 1.

See also:
glutWireIcosahedron()

void glutSolidOctahedron void   ) 
 

Draw a solid octahedron.

This function draws a regular, solid 8-sided polyhedron centered at the origin. The vertices are at (+/-1, 0, 0), (0, +/-1, 0), (0, 0, +/-1).

Note:
We visit the same vertices the same number of times as in the wire octahedron, but the order is different.
See also:
glutWireOctahedron()

void glutSolidRhombicDodecahedron void   ) 
 

Draw a solid rhombic dodecahedron

This function draws a solid-shaded dodecahedron whose facets are rhombic and whose vertices are at unit radius. No facet lies normal to any coordinate axes. The polyhedron is centered at the origin.

See also:
glutWireRhombicDodecahedron(), glutWireDodecahedron(), glutSolidDodecahedron()

void glutSolidSierpinskiSponge int  num_levels,
const GLdouble  offset[3],
GLdouble  scale
 

Draw a solid Spierspinski's sponge.

Parameters:
num_levels Recursive depth.
offset Location vector.
scale Relative size.
This function recursively draws a few levels of a solid-shaded Sierpinski's Sponge. If num_levels is 0, draws 1 tetrahedron. The offset is a translation. The z axis is normal to the base. The sponge is centered at the origin.

Note:
Runtime is exponential in num_levels .
See also:
glutWireSierpinskiSponge()
Todo:
Consider removing the offset parameter from the API (use a helper function).

num_levels should really be unsigned.

Here is the call graph for this function:

void glutSolidSphere GLdouble  radius,
GLint  slices,
GLint  stacks
 

Draw a solid sphere centered at the origin.

Parameters:
radius Sphere radius.
slices The number of divisions around the z axis. (latitudal)
stacks The number of divisions along the z axis. (longitudal)
The glutSolidSphere() function draws a shaded sphere centered at the origin. The surface is created from quadrangles (except for triangles as degenerate quads at the poles) in a longitude/latitude pattern. The equatorial great circle lies in the xy-plane and is centered on the origin.

Note:
The number of polygons representing the spherical surface is proportional to (slices*stacks).
See also:
glutWireSphere()

void glutSolidTeapot GLdouble  size  ) 
 

Draw a solid teapot.

Parameters:
size Scale factor.
Draws the standard Teapot, solid shaded, using OpenGL evaluators. This is the classic "Utah Teapot" of computer graphics. The base should lie in the xy-plane with "up" being along the positive z axis.

This is derived from SGI code. It should also be the same as the teapot modeled by Martin Newell in 1975.

Note:
Uses a higher mesh density than the "wire" teapot.
See also:
glutWireTeapot()

void glutSolidTetrahedron void   ) 
 

Draw a solid tetrahedron.

This function draws a regular, solid 4-sided polyhedron centered at the origin. The distance from the origin to the vertices is 1.

See also:
glutWireTetrahedron()
Todo:
See todo-list on glutWireTetrahedron().

void glutSolidTorus GLdouble  dInnerRadius,
GLdouble  dOuterRadius,
GLint  nSides,
GLint  nRings
 

Draw a solid torus.

Parameters:
dInnerRadius Radius of ``tube''
dOuterRadius Radius of ``path''
nSides Facets around ``tube''
nRings Joints along ``path''
This function effectively wraps a cylinder with nSides slats and bends it at nRings facets around a circular path, forming a torus, or ``donut''. The center is at the origin and the ``path'' rings around the z axis.

The torus parameters can be explored interactively with the OpenGLEAN shapes demo.

Note:
dInnerRadius and dOuterRadius are not analogous to similar measurements of an anulus.
See also:
glutWireTorus()

void glutSpaceballButtonFunc void(*)(int button, int state)  callback  ) 
 

Sets a spaceball button callback.

Parameters:
callback Client spaceball button hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

This function registers a callback for a spaceball to report buttons. A spaceball has six axes of freedom (three of motion and three of orientation), plus buttons. The spaceball has glutDeviceGet(GLUT_NUM_SPACEBALL_BUTTONS) and numbers them from 1. Button state is either GLUT_UP or GLUT_DOWN.

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement spaceball support.

In contrast, mouse buttons are numbered from 0 in the GLUT API. This is a wrinkle.

See also:
glutSpaceballRotateFunc(), glutSpaceballMotiononFunc(),

void glutSpaceballMotionFunc void(*)(int x, int y, int z)  callback  ) 
 

Sets a spaceball motion callback.

Parameters:
callback Client spaceball motion hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

This function registers a callback for a spaceball to report position. A spaceball has six axes of freedom (three of motion and three of orientation), plus buttons. The spaceball allows you to move a control point in 3D space with a resolution of +/- 1000 units along each of 3 axes.

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement spaceball support.
See also:
glutSpaceballRotateFunc(), glutSpaceballButtonFunc(),

void glutSpaceballRotateFunc void(*)(int x, int y, int z)  callback  ) 
 

Sets a spaceball rotation callback.

Parameters:
callback Client spaceball rotation hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

This function registers a callback for a spaceball to report rotation. A spaceball has six axes of freedom (three of motion and three of orientation), plus buttons. The spaceball allows you to rotate a control orientation +/- 1800 units about each of 3 axes.

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement spaceball support.
See also:
glutSpaceballMotionFunc(), glutSpaceballButtonFunc(),

void glutStrokeCharacter GLUTfont  fontID,
int  character
 

Draw a stroked character.

Parameters:
fontID A GLUT stroked font identifier.
character An ASCII character other than NUL.
This function draws one character from one stroked font (selected by fontID) using OpenGL GL_LINE_STRIP. These characters are drawn at the origin in model space. The the model space origin is translated at the end, according to the character width in fontID.

Does nothing if:

  • The fontID is invalid.
  • The character is out of the font's range.

See also:
glBegin(), glTranslatef(), glutStrokeWidth(), glutStrokeString(), glutStrokeHeight(), glutBitmapCharacter()

GLfloat glutStrokeHeight GLUTfont  fontID  ) 
 

Returns the height of a given font.

Parameters:
fontID A GLUT stroked font identifier.
This function reports the height of a font, given by fontID, as a global characteristic of that font.

Returns 0 if fontID is invalid.

Note:
Does not report the height used by individual characters. This may limit its usefulness; perhaps we should change it? (And/or add a new function.)
See also:
glutStrokeCharacter(), glutStrokeString(), glutStrokeWidth(), glutStrokeLength(), glutBitmapHeight()
Todo:
We have discussed adding a "font descender" query. We should go ahead and do it.

float glutStrokeLength GLUTfont  fontID,
const unsigned char *  string
 

Returns model space width of a string in a given font.

Parameters:
fontID A GLUT stroked font identifier.
string A C-style (NUL-terminated) string.
This function reports the sum of the widths of the characters in a string, using the font metrics of a given font.

Like glutStrokeString(), glutStrokeLength() respects newlines in the input.

Returns 0 if:

  • The fontID is out of range.
  • The string is NULL.
  • All characters in the string are zero-width.

Note:
Refer to glutStrokeWidth() for notes on the nature of this function's return value, and for comparisons to old GLUT and freeglut.
See also:
glutStrokeString(), glutStrokeWidth(), glutStrokeHeight(), glutBitmapLength()

void glutStrokeString GLUTfont  fontID,
const unsigned char *  string
 

Draw a string of stroked characters.

Parameters:
fontID A GLUT stroked font identifier.
string A NUL-terminated ASCII string.
This function draws a string in the font indicated by fontID. It is almost equivalent to calling glutStrokeCharacter() on each character in the string, successively. Mostly, it is a convenience function to hide the loop, and to treat \n as a special symbol rather than a normal glyph.

The first character displays at the current model space origin, The origin changes by successive translations.

The newline character, \n (ASCII LF) is treated as a newline and resets the origin horizontally while advancing the line 1 font-height down the y-axis.

Does nothing if:

  • fontID is out of range.
  • string is NULL
  • string is empty

Unlike glutBitmapString(), there is little performance advantage to using glutStrokeString() as compared with calling glutStrokeCharacter() yourself for every character.

See also:
glutStrokeLength(), glutStrokeCharacter(), glutStrokeHeight(), glutBitmapString()

float glutStrokeWidth GLUTfont  fontID,
int  character
 

Returns the width in pixels of a character in a given font.

Parameters:
fontID A GLUT stroked font identifier.
character A character code.
This function reports how far the model space origin will advance if you putput this character in the font named by fontID. Not all letters will use their full width, especially in fixed-width fonts.

Returns 0 if character is out of range or if the fontID is invalid.

Note:
Historically, this function has been described as returning a pixel-width, but was implemented to return the width in model-space units, rounded to integers. GLUT never resolved this, and freeglut duplicated the confusion. OpenGLEAN has decided to stay in model-space and to return the unrounded floating point value. An unreleased GLUT 3.8 was supposed to include glutStrokeWidthf() and glutStrokeLengthf() (note the *f suffixes), but that is not in wide use.
See also:
glutStrokeCharacter(), glutStrokeLength(), glutStrokeHeight() glutBitmapWidth()
Todo:
Determine if any glyphs are either wider than this function or if they render outside of the bounding box given by (0,-descent) by (width,height-descent).

void glutTabletButtonFunc void(*)(int button, int state, int x, int y)  callback  ) 
 

Sets a tablet button callback.

Parameters:
callback Client tablet button hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

This function registers a callback by which you receive reports a tablet button status feature. Buttons are reported with button in the range 1 to glutDeviceGet(GLUT_NUM_TABLET_BUTTONS). state is either GLUT_UP or GLUT_DOWN and x and y are the tablet coordinate (see glutTabletMotionFunc() for the bounds of x and y).

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement tablet support.

Buttons are not pressure-sensitive.

See also:
glutTabletButtonFunc(), glutMouseFunc()
Todo:
We might want to add support for this sooner or later. Although a tablet could also be generalized as a mouse. There are relatively cheap AipTek HyperPen tablets, and slightly less cheap Wacom tablets on many store shelves.

void glutTabletMotionFunc void(*)(int x, int y)  callback  ) 
 

Sets a tablet motion callback.

Parameters:
callback Client tablet motion hook.
Deprecated.

There is no particularly good reason for this to be part of OpenGLEAN at this time. Nor is there any support for it.

This function registers a callback by which OpenGLEAN reports a puck or stylus position in the range of [0, 2000] along the x and y axes.

The callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
OpenGLEAN does not implement tablet support.

This API does not include tilt information.

See also:
glutTabletButtonFunc(), glutMouseFunc()
Todo:
We might want to add support for this sooner or later. Although a tablet could also be generalized as a mouse. There are relatively cheap AipTek HyperPen tablets, and slightly less cheap Wacom tablets on many store shelves.

void glutVisibilityFunc void(*)(int status)  callback  ) 
 

Sets the Visibility callback for the current window.

Parameters:
callback Client hook for visibility changes.
OpenGLEAN may call this function when your window's visbility status has changed. status can take on two values: GLUT_NOT_VISIBLE or GLUT_VISIBLE . If any pixel of your window (including descendants) is visible, your window is GLUT_VISIBLE .

The callback is bound to the current window.

This function is deprecated in lieu of glutWindowStatusFunc(). However, while Mark Kilgard's GLUT 3.7 seems to have included glutWindowStatusFunc(), I cannot see yet where he documented that function, much less where he deprecated this function. This function has, however, been deprecated by OpenGLUT, formally, and all known GLUT implementations currently offer glutWindowStatusFunc().

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
This is not a polling mechanism. You are only informed of transitions that OpenGLEAN observes while your callback is in place.

This function appears to be superceded by glutWindowStatusFunc().

This callback is mutually exclusive of glutWindowStatusFunc().

See also:
glutPopWindow(), glutPushWindow(), glutWindowStatusFunc()

Here is the call graph for this function:

void glutWireCone GLdouble  base,
GLdouble  height,
GLint  slices,
GLint  stacks
 

Draw a wireframe cone.

Parameters:
base Cone radius at the base in the xy plane.
height Height of cone in positive z direction.
slices The number of divisions around the z axis. (latitudal)
stacks The number of divisions along the z axis. (longitudal)
The glutWireCone() function draws a wireframe cone with a base in the xy plane oriented in positive z.

Note:
The number of line segments representing the conical surface is proportional to (slices*stacks).
See also:
glutSolidCone()

void glutWireCube GLdouble  width  ) 
 

Draw a wireframe cube centered at the origin.

Author:
Code contributed by Andreas Umbach <marvin@dataway.ch>
Parameters:
width The width, height and depth of the cube.
The glutWireCube() function draws an axis-aligned wireframe cube with a specified width, height and depth. The vertices of the cube are at (+/- width/2, +/- width/2, +/- width/2), so that the cube is centered at the origin.

See also:
glutSolidCube()

void glutWireCuboctahedron GLdouble  s  ) 
 

Draw a wireframe "cuboctahedron".

Parameters:
s Scale factor.
A cuboctahedron is described by John Fay as a cube with the corners sliced off just deeply enough that each of the facets (where the corners were) touch one another. The result is that the 6 square faces of the original cube are still square, but smaller (and 45 degrees rotated in their planes), while 8 new equilateral facets are added at what used to be the corners.

The scaling parameter, s, allows you to adjust the size of the resulting object.

The object is centered at the origin.

Note:
Unlike most wireframe objects, this one traces its edges exactly once.
See also:
glutSolidCuboctahedron
Bug:
Normals are computed relative to the square faces, so every facet set of 4 lines has a single normal (and the normals of the triangle faces are ignored).

void glutWireCylinder GLdouble  radius,
GLdouble  height,
GLint  slices,
GLint  stacks
 

Draw a wireframe cylinder.

Parameters:
radius Radius of cylinder.
height Z height.
slices Number of divisions around the z axis.
stacks Number of divisions along the z axis.
glutWireCylinder() draws a wireframe of a cylinder, the center of whose base is at the origin, and whose axis parallels the z axis.

See also:
glutSolidCylinder()

void glutWireDodecahedron void   ) 
 

Draw a wireframe dodecahedron.

This function draws a regular, wireframe 12-sided polyhedron centered at the origin. The distance from the origin to the vertices is sqrt(3). The facets are pentagons. No facet is normal any of the x, y, or z axes.

See also:
glutSolidDodecahedron(), glutWireRhombicDodecahedron(), glutSolidRhombicDodecahedron()

void glutWireIcosahedron void   ) 
 

Draw a wireframe icosahedron.

This function draws a regular, solid 20-sided polyhedron centered at the origin. The distance from the origin to the vertices is 1. No facet is normal to any of the x, y, or z axes.

See also:
glutSolidIcosahedron()

void glutWireOctahedron void   ) 
 

Draw a wireframe octahedron.

This function draws a regular wireframe 8-sided polyhedron centered at the origin. The vertices are at (+/-1, 0, 0), (0, +/-1, 0), (0, 0, +/-1).

Note:
We visit the same vertices the same number of times as for the solid octahedron, but the order is different.

Draws every edge twice.

The lines have normals, but the normals are from the facets, rather than upon the edge. If you squint too hard, the lighting on a wireframe octahedron does not look quite right.

See also:
glutSolidOctahedron()
Todo:
It may be faster (and look better) to draw each edge once, setting the Normal at each edge. (I don't think that this matters all that much, but a lineloop was proposed for the wire Cube for speed.)

void glutWireRhombicDodecahedron void   ) 
 

Draw a wireframe rhombic dodecahedron

This function draws a wireframe dodecahedron whose facets are rhombic and whose vertices are at unit radius. No facet lies normal to any coordinate axes. The polyhedron is centered at the origin.

See also:
glutSolidRhombicDodecahedron(), glutWireDodecahedron(), glutSolidDodecahedron()

void glutWireSierpinskiSponge int  num_levels,
const GLdouble  offset[3],
GLdouble  scale
 

Draw a wireframe Spierspinski's sponge.

Parameters:
num_levels Recursive depth.
offset Location vector.
scale Relative size.
This function recursively draws a few levels of Sierpinski's Sponge in wireframe. If num_levels is 0, draws 1 tetrahedron. The offset is a translation. The z axis is normal to the base. The sponge is centered at the origin.

Note:
Runtime is exponential in num_levels .
See also:
glutSolidSierpinskiSponge()
Todo:
Refer to the TODO entries for glutWireSierpinksySponge().

Here is the call graph for this function:

void glutWireSphere GLdouble  radius,
GLint  slices,
GLint  stacks
 

Draw a wireframe sphere centered at the origin.

Parameters:
radius Sphere radius.
slices The number of divisions around the z axis. (latitudal)
stacks The number of divisions along the z axis. (longitudal)
The glutWireSphere() function draws a wireframe sphere centered at the origin. The "equatorial" great circle lies in the xy-plane.

Note:
The number of line segments representing the spherical surface is proportional to (slices*stacks).
See also:
glutSolidSphere().

void glutWireTeapot GLdouble  size  ) 
 

Draw a wireframe teapot.

Parameters:
size Scale factor.
This function draws the standard Teapot in wireframe using OpenGL evaluators. This is the classic "Utah Teapot" of computer graphics. The base should lie in the xy-plane with "up" being along the positive z axis.

This is derived from SGI code. It should also be the same as the teapot modeled by Martin Newell in 1975.

Note:
Uses a lower mesh density than the "solid" teapot.
See also:
glutSolidTeapot()

void glutWireTetrahedron void   ) 
 

Draw a wireframe tetrahedron.

This function draws a regular, wireframe 4-sided polyhedron centered at the origin. The distance from the origin to the vertices is 1.

See also:
glutSolidTetrahedron()
Todo:
Merge r0 r1 r2 and r3 into one array.

Put the normals into the (or an) array.

Make the array static const, with file scope, and share with glutSolidTetrahedron().

Maybe consolidate with the SierpinskySponge?

void glutWireTorus GLdouble  dInnerRadius,
GLdouble  dOuterRadius,
GLint  nSides,
GLint  nRings
 

Draw a wireframe torus.

Parameters:
dInnerRadius Radius of ``tube''
dOuterRadius Radius of ``path''
nSides Facets around ``tube''
nRings Joints along ``path''
This function effectively wraps a cylinder with nSides slats and bends it at nRings facets around a circular path, forming a torus, or ``donut''. The center is at the origin and the ``path'' rings around the z axis.

The torus parameters can be explored interactively with the OpenGLEAN shapes demo.

Note:
dInnerRadius and dOuterRadius are not analogous to similar measurements of an anulus.
See also:
glutSolidTorus()

void glutWMCloseFunc void(*)(void)  callback  ) 
 

Window destruction callback.

Parameters:
callback Client window destruction hook.
Deprecated.

First, this function is redundant of glutCloseFunc(), and this function's name is not as well or clearly chosen. Secondly, the issues surrounding glutCloseFun() apply here as well. Unless prevented by some other concern, please use glutCloseFunc(), until such time as a better API is available.

When a window is destroyed by user-action in traditional GLUT, the application terminates. In freeglut, OpenGLUT, and OpenGLEAN, the application can choose to persist and treat the window close event as a normal event. This callback is how that event is transmitted to the application. This callback is bound to the current window.

It is fatal to call this function without properly initializing OpenGLEAN via glutInit(). It is a nonfatal, silent error to call this function without a current window.

Note:
This function is exactly the same as glutCloseFunc(). In fact, this function is just a call to the other function, with the same parameter.
See also:
glutDestroyWindow(), glutCloseFunc()

Here is the call graph for this function:





SourceForge.net Logo Supported in part by SourceForge.net.

Generated on Fri Sep 16 20:15:40 2005 for OpenGLEAN by doxygen 1.4.3
The OpenGLEAN project is hosted by olib.org and SourceForge.