John Documented InitWindowPosition extensions and added some kbd fn info.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@59 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
47bf690785
commit
a4bfe34a9e
@ -277,7 +277,41 @@ dodecahedron.
|
|||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
4.2 glutInitWindowPosition, glutInitWindowSize</h2>
|
4.2 glutInitWindowPosition, glutInitWindowSize</h2>
|
||||||
|
The "<tt>glutInitWindowPosition</tt> " and "<tt>glutInitWindowSize</tt>"
|
||||||
|
functions specify a desired position and size for windows that <i>freeglut</i>
|
||||||
|
will create in the future.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutInitWindowPosition ( int x, int y ) ;</tt>
|
||||||
|
<br><tt>void glutInitWindowSize ( int width, int height ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutInitWindowPosition</tt> " and "<tt>glutInitWindowSize</tt>"
|
||||||
|
functions specify a desired position and size for windows that <i>freeglut</i>
|
||||||
|
will create in the future. The position is measured in pixels from
|
||||||
|
the upper left hand corner of the screen, with "x" increasing to the right
|
||||||
|
and "y" increasing towards the bottom of the screen. The size is
|
||||||
|
measured in pixels. <i>Freeglut</i> does not promise to follow these
|
||||||
|
specifications in creating its windows, it certainly makes an attempt to.
|
||||||
|
<p>The position and size of a window are a matter of some subtlety.
|
||||||
|
Most windows have a usable area surrounded by a border and with a title
|
||||||
|
bar on the top. The border and title bar are commonly called "decorations."
|
||||||
|
The position of the window unfortunately varies with the operating system.
|
||||||
|
On Linux, it is the coordinates of the upper left-hand corner of its decorations.
|
||||||
|
On Windows, it is the coordinates of the upper left hand corner of its
|
||||||
|
usable interior. For both operating systems, the size of the window
|
||||||
|
is the size of the usable interior.
|
||||||
|
<p>Windows has some additional quirks which the application programmer
|
||||||
|
should know about. First, the minimum y-coordinate of a window decoration
|
||||||
|
is zero. (This is a feature of <i>freeglut</i> and can be adjusted
|
||||||
|
if so desired.) Second, there appears to be a minimum window width
|
||||||
|
on Windows which is 104 pixels. The user may specify a smaller width,
|
||||||
|
but the Windows system calls ignore it. It is also impossible to
|
||||||
|
make a window narrower than this by dragging on its corner.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>For some reason, GLUT is not affected by the 104-pixel minimum window
|
||||||
|
width. If the user clicks on the corner of a window which is narrower
|
||||||
|
than this amount, the window will immediately snap out to this width, but
|
||||||
|
the application can call "<tt>glutReshapeWindow</tt> " and make a window
|
||||||
|
narrower again.
|
||||||
<h2>
|
<h2>
|
||||||
4.3 glutInitDisplayMode</h2>
|
4.3 glutInitDisplayMode</h2>
|
||||||
|
|
||||||
@ -318,8 +352,8 @@ to have control return from the "<tt>glutMainLoop</tt>" function to the
|
|||||||
calling function. <i>Freeglut</i> allows the programmer to force
|
calling function. <i>Freeglut</i> allows the programmer to force
|
||||||
this by setting the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option and invoking
|
this by setting the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>" option and invoking
|
||||||
the "<tt>glutLeaveMainLoop</tt>" function from one of the callbacks.
|
the "<tt>glutLeaveMainLoop</tt>" function from one of the callbacks.
|
||||||
Stopping the program this way is preferable to simply calling "<tt>exit</tt>"
|
Stopping the program this way is preferable to simply calling "<tt>exit</tt>
|
||||||
from within a callback because this allows <i>freeglut</i> to free allocated
|
" from within a callback because this allows <i>freeglut</i> to free allocated
|
||||||
memory and otherwise clean up after itself. (I know I just said this,
|
memory and otherwise clean up after itself. (I know I just said this,
|
||||||
but I think it is important enough that it bears repeating.)
|
but I think it is important enough that it bears repeating.)
|
||||||
<h2>
|
<h2>
|
||||||
@ -332,7 +366,8 @@ in the <i>freeglut</i> event loop.
|
|||||||
<p>The "<tt>glutMainLoopEvent</tt> " function causes <i>freeglut</i>
|
<p>The "<tt>glutMainLoopEvent</tt> " function causes <i>freeglut</i>
|
||||||
to process one iteration's worth of events in its event loop. This
|
to process one iteration's worth of events in its event loop. This
|
||||||
allows the application to control its own event loop and still use the
|
allows the application to control its own event loop and still use the
|
||||||
<i>freeglut</i> windowing system.
|
<i>freeglut</i>
|
||||||
|
windowing system.
|
||||||
<p><b>Changes From GLUT</b>
|
<p><b>Changes From GLUT</b>
|
||||||
<p>GLUT does not include this function.
|
<p>GLUT does not include this function.
|
||||||
<h2>
|
<h2>
|
||||||
@ -347,6 +382,12 @@ to stop the event loop. If the "<tt>GLUT_ACTION_ON_WINDOW_CLOSE</tt>"
|
|||||||
option has been set to "<tt>GLUT_ACTION_CONTINUE_EXECUTION</tt> ", control
|
option has been set to "<tt>GLUT_ACTION_CONTINUE_EXECUTION</tt> ", control
|
||||||
will return to the function which called "<tt>glutMainLoop</tt> "; otherwise
|
will return to the function which called "<tt>glutMainLoop</tt> "; otherwise
|
||||||
the application will exit.
|
the application will exit.
|
||||||
|
<p>If the application has two nested calls to "<tt>glutMainLoop</tt>" and
|
||||||
|
calls "<tt>glutLeaveMainLoop</tt>", the behaviour of <i>freeglut</i> is
|
||||||
|
undefined. It may leave only the inner nested loop or it may leave
|
||||||
|
both loops. If the reader has a strong preference for one behaviour
|
||||||
|
over the other he should contact the <i>freeglut</i> Programming Consortium
|
||||||
|
and ask for the code to be fixed.
|
||||||
<p><b>Changes From GLUT</b>
|
<p><b>Changes From GLUT</b>
|
||||||
<p>GLUT does not include this function.
|
<p>GLUT does not include this function.
|
||||||
<h1>
|
<h1>
|
||||||
@ -405,25 +446,73 @@ the application will exit.
|
|||||||
|
|
||||||
<h1>
|
<h1>
|
||||||
9.0 <a NAME="Overlay"></a> Overlay Functions</h1>
|
9.0 <a NAME="Overlay"></a> Overlay Functions</h1>
|
||||||
|
<i>Freeglut</i> does not allow overlays, although it does "answer the mail"
|
||||||
|
with function stubs so that GLUT-based programs can compile and link against
|
||||||
|
<i>freeglut</i>
|
||||||
|
without modification. If the reader needs overlays, he should contact
|
||||||
|
the <i>freeglut</i> Programming Consortium and ask for them to be implemented.
|
||||||
|
He should also be prepared to assist in the implementation.
|
||||||
<h2>
|
<h2>
|
||||||
9.1 glutEstablishOverlay</h2>
|
9.1 glutEstablishOverlay</h2>
|
||||||
|
The "<tt>glutEstablishOverlay</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutEstablishOverlay ( void ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutEstablishOverlay</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements this function.
|
||||||
<h2>
|
<h2>
|
||||||
9.2 glutRemoveOverlay</h2>
|
9.2 glutRemoveOverlay</h2>
|
||||||
|
The "<tt>glutRemoveOverlay</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutRemoveOverlay ( void ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutRemoveOverlay</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements this function.
|
||||||
<h2>
|
<h2>
|
||||||
9.3 glutUseLayer</h2>
|
9.3 glutUseLayer</h2>
|
||||||
|
The "<tt>glutUseLayer</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutUseLayer ( GLenum layer ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutUseLayer</tt>" function is not implemented in <i>freeglut</i>.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements this function.
|
||||||
<h2>
|
<h2>
|
||||||
9.4 glutPostOverlayRedisplay</h2>
|
9.4 glutPostOverlayRedisplay</h2>
|
||||||
|
The "<tt>glutPostOverlayRedisplay</tt> " function is not implemented in
|
||||||
|
<i>freeglut</i>.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutPostOverlayRedisplay ( void ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutPostOverlayRedisplay</tt> " function is not implemented
|
||||||
|
in <i>freeglut</i>.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements this function.
|
||||||
<h2>
|
<h2>
|
||||||
9.5 glutPostWindowOverlayRedisplay</h2>
|
9.5 glutPostWindowOverlayRedisplay</h2>
|
||||||
|
The "<tt>glutPostWindowOverlayRedisplay</tt> " function is not implemented
|
||||||
|
in <i>freeglut</i>.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutPostWindowOverlayRedisplay ( int window ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutPostWindowOverlayRedisplay</tt> " function is not implemented
|
||||||
|
in <i>freeglut</i>.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements this function.
|
||||||
<h2>
|
<h2>
|
||||||
9.6 glutShowOverlay, glutHideOverlay</h2>
|
9.6 glutShowOverlay, glutHideOverlay</h2>
|
||||||
|
The "<tt>glutShowOverlay</tt>" and "<tt>glutHideOverlay</tt>" functions
|
||||||
|
are not implemented in <i>freeglut</i> .
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutShowOverlay( void ) ;</tt>
|
||||||
|
<br><tt>void glutHideOverlay( void ) ;</tt>
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutShowOverlay</tt>" and "<tt>glutHideOverlay</tt>" functions
|
||||||
|
are not implemented in <i>freeglut</i> .
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>GLUT implements these functions.
|
||||||
<h1>
|
<h1>
|
||||||
10.0 <a NAME="Menu"></a> Menu Functions</h1>
|
10.0 <a NAME="Menu"></a> Menu Functions</h1>
|
||||||
|
|
||||||
@ -513,13 +602,151 @@ Functions</h1>
|
|||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
12.6 glutSpecialFunc</h2>
|
12.6 glutSpecialFunc</h2>
|
||||||
|
The "<tt>glutSpecialFunc</tt>" function sets the window's special key press
|
||||||
|
callback. <i>Freeglut</i> calls the special key press callback when the
|
||||||
|
user presses a special key.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutSpecialFunc ( void (*func) ( int key, int x, int y ) )
|
||||||
|
;</tt>
|
||||||
|
<p><tt>func </tt>The window's new special key press callback
|
||||||
|
function
|
||||||
|
<br><tt>key </tt>The key whose press triggers the
|
||||||
|
callback
|
||||||
|
<br><tt>x </tt>The x-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is pressed
|
||||||
|
<br><tt>y </tt>The y-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is pressed
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutSpecialFunc</tt>" function specifies the function
|
||||||
|
that <i>freeglut</i> will call when the user presses a special key on the
|
||||||
|
keyboard. The callback function has one argument: the name
|
||||||
|
of the function to be invoked ("called back") at the time at which the
|
||||||
|
special key is pressed. The function returns no value. <i>Freeglut</i>
|
||||||
|
sets the <i>current window</i> to the window which is active when the callback
|
||||||
|
is invoked. "Special keys" are the function keys, the arrow keys,
|
||||||
|
the Page Up and Page Down keys, and the Insert key. The Delete key
|
||||||
|
is considered to be a regular key.
|
||||||
|
<br> Calling "<tt>glutSpecialUpFunc</tt>" with a NULL
|
||||||
|
argument disables the call to the window's special key press callback.
|
||||||
|
<p> The "<tt>key</tt>" argument may take one of the following
|
||||||
|
defined constant values:
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_F1, GLUT_KEY_F2, ..., GLUT_KEY_F12</tt>
|
||||||
|
- F1 through F12 keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_PAGE_UP, GLUT_KEY_PAGE_DOWN</tt>
|
||||||
|
- Page Up and Page Down keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_HOME, GLUT_KEY_END</tt>
|
||||||
|
- Home and End keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt> - arrow
|
||||||
|
keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_INSERT</tt>
|
||||||
|
- Insert key</li>
|
||||||
|
</ul>
|
||||||
|
<b>Changes From GLUT</b>
|
||||||
|
<p>None.
|
||||||
<h2>
|
<h2>
|
||||||
12.7 glutKeyboardUpFunc</h2>
|
12.7 glutKeyboardUpFunc</h2>
|
||||||
|
The "<tt>glutKeyboardUpFunc</tt>" function sets the window's key release
|
||||||
|
callback. <i>Freeglut</i> calls the key release callback when the user
|
||||||
|
releases a key.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutKeyboardUpFunc ( void (*func) ( unsigned char key, int
|
||||||
|
x, int y ) ) ;</tt>
|
||||||
|
<p><tt>func </tt>The window's new key release callback
|
||||||
|
function
|
||||||
|
<br><tt>key </tt>The key whose release triggers
|
||||||
|
the callback
|
||||||
|
<br><tt>x </tt>The x-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is released
|
||||||
|
<br><tt>y </tt>The y-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is released
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutKeyboardUpFunc</tt>" function specifies the function
|
||||||
|
that <i>freeglut</i> will call when the user releases a key from the keyboard.
|
||||||
|
The callback function has one argument: the name of the function
|
||||||
|
to be invoked ("called back") at the time at which the key is released.
|
||||||
|
The function returns no value. <i>Freeglut</i> sets the <i>current
|
||||||
|
window</i> to the window which is active when the callback is invoked.
|
||||||
|
<br> While <i>freeglut</i> checks for upper or lower
|
||||||
|
case letters, it does not do so for non-alphabetical characters.
|
||||||
|
Nor does it account for the Caps-Lock key being on. The operating
|
||||||
|
system may send some unexpected characters to <i>freeglut</i>, such as
|
||||||
|
"8" when the user is pressing the Shift key. <i>Freeglut</i> also
|
||||||
|
invokes the callback when the user releases the Control, Alt, or Shift
|
||||||
|
keys, among others. Releasing the Delete key causes this function
|
||||||
|
to be invoked with a value of 127 for "<tt>key</tt>".
|
||||||
|
<br> Calling "<tt>glutKeyboardUpFunc</tt>" with a NULL
|
||||||
|
argument disables the call to the window's key release callback.
|
||||||
|
<p><b>Changes From GLUT</b>
|
||||||
|
<p>This function is not implemented in GLUT versions before Version 4.
|
||||||
|
It has been designed to be as close to GLUT as possible. Users who
|
||||||
|
find differences should contact the <i>freeglut</i> development team to
|
||||||
|
have them fixed.
|
||||||
<h2>
|
<h2>
|
||||||
12.8 glutSpecialUpFunc</h2>
|
12.8 glutSpecialUpFunc</h2>
|
||||||
|
The "<tt>glutSpecialUpFunc</tt>" function sets the window's special key
|
||||||
|
release callback. <i>Freeglut</i> calls the special key release callback
|
||||||
|
when the user releases a special key.
|
||||||
|
<p><b>Usage</b>
|
||||||
|
<p><tt>void glutSpecialUpFunc ( void (*func) ( int key, int x, int y )
|
||||||
|
) ;</tt>
|
||||||
|
<p><tt>func </tt>The window's new special key release
|
||||||
|
callback function
|
||||||
|
<br><tt>key </tt>The key whose release triggers
|
||||||
|
the callback
|
||||||
|
<br><tt>x </tt>The x-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is released
|
||||||
|
<br><tt>y </tt>The y-coordinate of
|
||||||
|
the mouse relative to the window at the time the key is released
|
||||||
|
<p><b>Description</b>
|
||||||
|
<p>The "<tt>glutSpecialUpFunc</tt>" function specifies the function
|
||||||
|
that <i>freeglut</i> will call when the user releases a special key from
|
||||||
|
the keyboard. The callback function has one argument: the name
|
||||||
|
of the function to be invoked ("called back") at the time at which the
|
||||||
|
special key is released. The function returns no value. <i>Freeglut</i>
|
||||||
|
sets the <i>current window</i> to the window which is active when the callback
|
||||||
|
is invoked. "Special keys" are the function keys, the arrow keys,
|
||||||
|
the Page Up and Page Down keys, and the Insert key. The Delete key
|
||||||
|
is considered to be a regular key.
|
||||||
|
<br> Calling "<tt>glutSpecialUpFunc</tt>" with a NULL
|
||||||
|
argument disables the call to the window's special key release callback.
|
||||||
|
<p> The "<tt>key</tt>" argument may take one of the following
|
||||||
|
defined constant values:
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_F1, GLUT_KEY_F2, ..., GLUT_KEY_F12</tt>
|
||||||
|
- F1 through F12 keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_PAGE_UP, GLUT_KEY_PAGE_DOWN</tt>
|
||||||
|
- Page Up and Page Down keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_HOME, GLUT_KEY_END</tt>
|
||||||
|
- Home and End keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN</tt> - arrow
|
||||||
|
keys</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<tt>GLUT_KEY_INSERT</tt>
|
||||||
|
- Insert key</li>
|
||||||
|
</ul>
|
||||||
|
<b>Changes From GLUT</b>
|
||||||
|
<p>This function is not implemented in GLUT versions before Version 4.
|
||||||
|
It has been designed to be as close to GLUT as possible. Users who
|
||||||
|
find differences should contact the <i>freeglut</i> development team to
|
||||||
|
have them fixed.
|
||||||
<h2>
|
<h2>
|
||||||
12.9 glutMouseFunc</h2>
|
12.9 glutMouseFunc</h2>
|
||||||
|
|
||||||
@ -590,9 +817,9 @@ which are rendered using the "<tt>glBitmap</tt>" function call, and stroke
|
|||||||
fonts, which are rendered as sequences of OpenGL line segments. Because
|
fonts, which are rendered as sequences of OpenGL line segments. Because
|
||||||
they are rendered as bitmaps, the bitmap fonts tend to render more quickly
|
they are rendered as bitmaps, the bitmap fonts tend to render more quickly
|
||||||
than stroke fonts, but they are less flexible in terms of scaling and rendering.
|
than stroke fonts, but they are less flexible in terms of scaling and rendering.
|
||||||
Bitmap font characters are positioned with calls to the "<tt>glRasterPos*</tt>"
|
Bitmap font characters are positioned with calls to the "<tt>glRasterPos*</tt>
|
||||||
functions while stroke font characters use the OpenGL transformations to
|
" functions while stroke font characters use the OpenGL transformations
|
||||||
position characters.
|
to position characters.
|
||||||
<p> It should be noted that <i>freeglut</i> fonts are
|
<p> It should be noted that <i>freeglut</i> fonts are
|
||||||
similar but not identical to GLUT fonts. At the moment, <i>freeglut</i>
|
similar but not identical to GLUT fonts. At the moment, <i>freeglut</i>
|
||||||
fonts do not support the "`" (backquote) and "|" (vertical line) characters;
|
fonts do not support the "`" (backquote) and "|" (vertical line) characters;
|
||||||
@ -655,8 +882,8 @@ rendered
|
|||||||
<p>The "<tt>glutBitmapCharacter</tt> " function renders the given
|
<p>The "<tt>glutBitmapCharacter</tt> " function renders the given
|
||||||
character in the specified bitmap font. <i>Freeglut</i> automatically
|
character in the specified bitmap font. <i>Freeglut</i> automatically
|
||||||
sets the necessary pixel unpack storage modes and restores the existing
|
sets the necessary pixel unpack storage modes and restores the existing
|
||||||
modes when it has finished. Before the first call to "<tt>glutBitMapCharacter</tt>"
|
modes when it has finished. Before the first call to "<tt>glutBitMapCharacter</tt>
|
||||||
the application program should call "<tt>glRasterPos*</tt>" to set the
|
" the application program should call "<tt>glRasterPos*</tt>" to set the
|
||||||
position of the character in the window. The "<tt>glutBitmapCharacter</tt>"
|
position of the character in the window. The "<tt>glutBitmapCharacter</tt>"
|
||||||
function advances the cursor position as part of its call to "<tt>glBitmap</tt>"
|
function advances the cursor position as part of its call to "<tt>glBitmap</tt>"
|
||||||
and so the application does not need to call "<tt>glRasterPos*</tt>" again
|
and so the application does not need to call "<tt>glRasterPos*</tt>" again
|
||||||
@ -752,9 +979,9 @@ rendered
|
|||||||
character in the specified stroke font. Before the first call to
|
character in the specified stroke font. Before the first call to
|
||||||
"<tt>glutStrokeCharacter</tt>" the application program should call the
|
"<tt>glutStrokeCharacter</tt>" the application program should call the
|
||||||
OpenGL transformation (positioning and scaling) functions to set the position
|
OpenGL transformation (positioning and scaling) functions to set the position
|
||||||
of the character in the window. The "<tt>glutStrokeCharacter</tt>"
|
of the character in the window. The "<tt>glutStrokeCharacter</tt>
|
||||||
function advances the cursor position by a call to "<tt>glTranslatef</tt>"
|
" function advances the cursor position by a call to "<tt>glTranslatef</tt>
|
||||||
and so the application does not need to call the OpenGL positioning functions
|
" and so the application does not need to call the OpenGL positioning functions
|
||||||
again for successive characters on the same line.
|
again for successive characters on the same line.
|
||||||
<p><b>Changes From GLUT</b>
|
<p><b>Changes From GLUT</b>
|
||||||
<p>Nonexistent characters are rendered as asterisks.
|
<p>Nonexistent characters are rendered as asterisks.
|
||||||
@ -837,13 +1064,13 @@ that all characters have (nominally) the same height.
|
|||||||
<i>Freeglut</i> includes eighteen routines for generating easily-recognizable
|
<i>Freeglut</i> includes eighteen routines for generating easily-recognizable
|
||||||
3-d geometric objects. These routines are effectively the same ones
|
3-d geometric objects. These routines are effectively the same ones
|
||||||
that are included in the GLUT library, and reflect the functionality available
|
that are included in the GLUT library, and reflect the functionality available
|
||||||
in the <i>aux</i> toolkit described in the <i>OpenGL Programmer's Guide</i>.
|
in the <i>aux</i> toolkit described in the <i>OpenGL Programmer's Guide</i>
|
||||||
They are included to allow programmers to create with a single line of
|
. They are included to allow programmers to create with a single
|
||||||
code a three-dimensional object which can be used to test a variety of
|
line of code a three-dimensional object which can be used to test a variety
|
||||||
OpenGL functionality. None of the routines generates a display list
|
of OpenGL functionality. None of the routines generates a display
|
||||||
for the object which it draws. The functions generate normals appropriate
|
list for the object which it draws. The functions generate normals
|
||||||
for lighting but, except for the teapon functions, do not generate texture
|
appropriate for lighting but, except for the teapon functions, do not generate
|
||||||
coordinates.
|
texture coordinates.
|
||||||
<h2>
|
<h2>
|
||||||
15.1 glutWireSphere, glutSolidSphere</h2>
|
15.1 glutWireSphere, glutSolidSphere</h2>
|
||||||
The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
|
The "<tt>glutWireSphere</tt>" and "<tt>glutSolidSphere</tt>" functions
|
||||||
@ -913,10 +1140,10 @@ number of slices around the base of the cone
|
|||||||
number of segments between the base and the tip of the cone (the number
|
number of segments between the base and the tip of the cone (the number
|
||||||
of points, including the tip, is <tt>stacks + 1</tt>)
|
of points, including the tip, is <tt>stacks + 1</tt>)
|
||||||
<p><b>Description</b>
|
<p><b>Description</b>
|
||||||
<p>The "<tt>glutWireCone</tt>" and "<tt>glutSolidCone</tt>" functions render
|
<p>The "<tt>glutWireCone</tt>" and "<tt> glutSolidCone</tt>" functions
|
||||||
a right circular cone with a base centered at the origin and in the X-Y
|
render a right circular cone with a base centered at the origin and in
|
||||||
plane and its tip on the positive Z-axis. The wire cone is rendered
|
the X-Y plane and its tip on the positive Z-axis. The wire cone is
|
||||||
with triangular elements.
|
rendered with triangular elements.
|
||||||
<p><b>Changes From GLUT</b>
|
<p><b>Changes From GLUT</b>
|
||||||
<p>None that we know of.
|
<p>None that we know of.
|
||||||
<h2>
|
<h2>
|
||||||
@ -929,9 +1156,9 @@ a wireframe and solid cube respectively.
|
|||||||
<p><tt>dSize </tt>The desired
|
<p><tt>dSize </tt>The desired
|
||||||
length of an edge of the cube
|
length of an edge of the cube
|
||||||
<p><b>Description</b>
|
<p><b>Description</b>
|
||||||
<p>The "<tt>glutWireCube</tt>" and "<tt>glutSolidCube</tt>" functions render
|
<p>The "<tt>glutWireCube</tt>" and "<tt> glutSolidCube</tt>" functions
|
||||||
a cube of the desired size, centered at the origin. Its faces are
|
render a cube of the desired size, centered at the origin. Its faces
|
||||||
normal to the coordinate directions.
|
are normal to the coordinate directions.
|
||||||
<p><b>Changes From GLUT</b>
|
<p><b>Changes From GLUT</b>
|
||||||
<p>None that we know of.
|
<p>None that we know of.
|
||||||
<h2>
|
<h2>
|
||||||
@ -997,8 +1224,8 @@ one. Two of the corners lie on the positive and negative X-axes.
|
|||||||
<p>None that we know of.
|
<p>None that we know of.
|
||||||
<h2>
|
<h2>
|
||||||
15.7 glutWireRhombicDodecahedron, glutSolidRhombicDodecahedron</h2>
|
15.7 glutWireRhombicDodecahedron, glutSolidRhombicDodecahedron</h2>
|
||||||
The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>"
|
The "<tt>glutWireRhombicDodecahedron</tt>" and "<tt>glutSolidRhombicDodecahedron</tt>
|
||||||
functions draw a wireframe and solid rhombic dodecahedron (twelve-sided
|
" functions draw a wireframe and solid rhombic dodecahedron (twelve-sided
|
||||||
semi-regular solid) respectively.
|
semi-regular solid) respectively.
|
||||||
<p><b>Usage</b>
|
<p><b>Usage</b>
|
||||||
<p><tt>void glutWireRhombicDodecahedron ( void ) ;</tt>
|
<p><tt>void glutWireRhombicDodecahedron ( void ) ;</tt>
|
||||||
@ -1112,5 +1339,11 @@ is the famous OpenGL teapot [add reference].
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Reference in New Issue
Block a user