Open GL Super Bible:Learning OpenGL with the AUX Library
To access the contents, click the chapter and section titles.
Open GL Super Bible
(Publisher: Macmillan Computer Publishing)
Author(s): Waite group Press
ISBN: 1571690735
Publication Date: 08/01/96
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)==
'4')
); }
function
bookMarkit() {varurl="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Previous
Table of Contents
Next
auxInitDisplayMode
Purpose
Initializes the display mode of the AUX library OpenGL window.
Include File
<glaux.h>
Syntax
void auxInitDisplayMode(GLbitfield mask);
Description
This is the first function that must be called
by an AUX library-based program to set up the OpenGL window. This
function sets the characteristics of the window that OpenGL will use for
drawing operations.
Parameters
mask
GLbitfield: A mask or bitwise combination of
masks from Table 3-4. These mask values may be combined with a bitwise
OR. For example, to create a window that uses double buffering and color
index mode, call
auxInitDisplayMode(AUX_DOUBLE | AUX_INDEX)
Returns
None.
Example
See any example program from this chapter.
See Also
auxInitPosition, auxInitWindow
Table 3-4 Mask values for window characteristics
Mask Value
Meaning
AUX_SINGLE
Specifies a single-buffered window
AUX_DOUBLE
Specifies a double-buffered window
AUX_RGBA
Specifies an RGBA-mode window
AUX_INDEX
Specifies a color-index mode window
AUX_DEPTH
Specifies a 32-bit depth buffer
AUX_DEPTH16
Specifies a 16-bit depth buffer
AUX_STENCIL
Specifies a stencil buffer
AUX_ACCUM
Specifies an accumulation buffer
AUX_ALPHA
Specifies an ALPHA buffer
AUX_FIXED_332_PAL
Specifies a fixed 3-3-2 palette for the window
auxInitPosition
Purpose
Sets the window position used by auxInitWindow().
Include File
<glaux.h>
Syntax
void auxInitPosition(GLint x, GLint y, GLsizei width, GLsizei height);
Description
This function tells the AUX library where to
place the main graphics window when it is created.
Parameters
x
GLint: The position measured in pixels of the top left corner of the window from the left side of the screen.
y
GLint: The position measured in pixels of the top left corner of the window from the top of the screen.
width
GLsizei: The initial width of the client area of the window in screen pixels.
height
GLsizei: The initial height of the client area of the window in screen pixels.
Returns
None.
Example
See any example from this chapter.
See Also
auxInitDisplayMode, auxInitWindow
auxInitWindow
Purpose
Initializes and displays the OpenGL rendering window.
Include File
<glaux.h>
Syntax
void auxInitWindow(GLBYTE *titleString);
Description
This function opens the window that will be used by OpenGL for drawing operations.
The
window characteristics must first be set by auxInitDisplayMode() and
auxInitPosition().
Parameters
titleString
GLBYTE: A pointer to a character string that will be used for the window caption.
Returns
None.
Example
See any example from this chapter.
See Also
auxInitDisplayMode, auxInitPosition
auxKeyFunc
Purpose
Associates a callback function with a particular keystroke.
Include File
<glaux.h>
Syntax
void auxKeyFunc(GLint key, void(*function(void));
Description
Sets a callback function function that the AUX library calls when the
key indicated by key is pressed. The window is also redrawn after the
processing of this keystroke.
Parameters
key
GLint: Specifies the key with which to associate the given function. This can be one of the values in Table 3-5.
function
This callback function is prototyped as
void CALLBACK KeyFunc(void);
This function is called by the AUX library when the specified key is pressed. Passing NULL as this parameter disables a previous key function setting.
Returns
None.
Example
See the KEYMOVE supplementary example from this chapterłs subdirectory on the CD.
See Also
auxMouseFunc
Table 3-5 Auxiliary Library Key Definitions.
Key Value
Description
AUX_ESCAPE
The Escape key
AUX_SPACE
The Spacebar key
AUX_RETURN
The Return or Enter key
AUX_LEFT
The Left Arrow key
AUX_RIGHT
The Right Arrow key
AUX_UP
The Up Arrow key
AUX_DOWN
The Down Arrow key
AUX_A through AUX_Z
The keys A through Z (uppercase)
AUX_a through AUX_z
The keys a through z (lowercase)
AUX_0 through AUX_9
The number keys 0 through 9
auxMainLoop
Purpose
Specifies the function that should be used to update the OpenGL window.
Include File
<glaux.h>
Syntax
void auxMainLoop(AUXMAINPROC func);
Description
This function is used to specify the function
to be called whenever the OpenGL window needs to be refreshed. This
function does not return until the OpenGL window is closed.
Parameters
func
This function is prototyped as
void CALLBACK MainFunc(void);
This is the function to be used for updating the window by actually performing the drawing commands.
Returns
None.
Example
See any example from this chapter.
See Also
auxIdleFunc, auxReshapeFunc
Previous
Table of Contents
Next
Use of this site is subject to certain Terms & Conditions, Copyright � 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.
Wyszukiwarka
Podobne podstrony:
058 061v 02 058058 14sept61SP?0612010 03, str 058 064058 ADMM058 Malarstwo rokokowe we Francjiv 02 061058 59F F 061dzu 058 0527058 kryminologia wyklad 1056 058więcej podobnych podstron