|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
GLUT for Win32 README
|
|
kusano |
7d535a |
---------------------
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
VERSION/INFO:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
This is GLUT for Win32 version 3.7.6 as of Nov 8th 2001.
|
|
kusano |
7d535a |
See the COPYRIGHT section for distribution and copyright notices.
|
|
kusano |
7d535a |
Send all bug reports and questions for this version of GLUT to
|
|
kusano |
7d535a |
Nate Robins [nate@pobox.com].
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
For more information about GLUT for Win32, see the web page:
|
|
kusano |
7d535a |
www.pobox.com/~nate/glut.html or subscribe to the GLUT for Win32
|
|
kusano |
7d535a |
mailing list by sending e-mail to majordomo@perp.com with
|
|
kusano |
7d535a |
"subscribe glut" in the body of the message.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
For general information about GLUT, see the GLUT web page:
|
|
kusano |
7d535a |
http://reality.sgi.com/opengl/glut3/glut3.html and be sure to
|
|
kusano |
7d535a |
check the GLUT FAQ first for any questions that you may have:
|
|
kusano |
7d535a |
http://reality.sgi.com/opengl/glut3/glut-faq.html
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
COMPILING/INSTALLATION:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Precompiled versions of the DLL and import library can be
|
|
kusano |
7d535a |
found on the GLUT for Win32 web page mentioned above.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Microsoft Developer Studio 6 workspace and project files have
|
|
kusano |
7d535a |
been included in the source code distribution.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
To build the glut dll:
|
|
kusano |
7d535a |
First, open Microsoft Developer Studio.
|
|
kusano |
7d535a |
Then, select File -> Open Workspace and find the glut.dsw file
|
|
kusano |
7d535a |
in the file dialog and double-click on it.
|
|
kusano |
7d535a |
Finally, select Build -> Build glut32.dll.
|
|
kusano |
7d535a |
When the build is finished, it will copy:
|
|
kusano |
7d535a |
glut32.dll to %WinDir%\System,
|
|
kusano |
7d535a |
glut32.lib to $(MSDevDir)\..\..\VC98\lib, and
|
|
kusano |
7d535a |
glut.h to $(MSDevDir)\..\..\VC98\include\GL.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Additional workspace files have been included in the progs, test
|
|
kusano |
7d535a |
and lib directories to build the progs, tests and libs respectively.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
BORLAND NOTES:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
From what I understand, Borland supplies a utility that
|
|
kusano |
7d535a |
converts Microsoft Visual C++ .libs into Borland compatible
|
|
kusano |
7d535a |
files. Therefore, the best method for Borland users is
|
|
kusano |
7d535a |
probably to get the precompiled versions of the library and
|
|
kusano |
7d535a |
convert the library. To create an import library for Borland
|
|
kusano |
7d535a |
from the DLLs, use the following command (from a command prompt):
|
|
kusano |
7d535a |
IMPLIB glut32.lib glut32.dll
|
|
kusano |
7d535a |
If IMPLIB crashes when called this way, try
|
|
kusano |
7d535a |
IMPLIB glut32.lib glut32.def
|
|
kusano |
7d535a |
using the glut32.def file in this distribution.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
FORTRAN NOTES:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Bill Mitchell [william.mitchell@nist.gov] has put considerable
|
|
kusano |
7d535a |
effort into getting GLUT to work with different compilers for
|
|
kusano |
7d535a |
Fortran 90. He indicates that you should copy the f90glut.h
|
|
kusano |
7d535a |
file to your $(MSDevDir)\..\..\VC98\include\GL directory.
|
|
kusano |
7d535a |
Then, just build GLUT as usual. The Fortran 90 interface, f90gl,
|
|
kusano |
7d535a |
can be obtained at http://math.nist.gov/f90gl and contains
|
|
kusano |
7d535a |
installation instructions and usage examples.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
MISC NOTES:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Overlay support is not implemented, nor are there any plans to
|
|
kusano |
7d535a |
implement it in the near future.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o To customize the windows icon, you can use the resource name
|
|
kusano |
7d535a |
GLUT_ICON. For example, create an icon named "glut.ico", and
|
|
kusano |
7d535a |
create a file called glut.rc that contains the following:
|
|
kusano |
7d535a |
GLUT_ICON ICON glut.ico
|
|
kusano |
7d535a |
then compile the glut.rc file with the following:
|
|
kusano |
7d535a |
rc /r glut
|
|
kusano |
7d535a |
and link the resulting glut.res file into your executable
|
|
kusano |
7d535a |
(just like you would an object file).
|
|
kusano |
7d535a |
Alternatively, you can simply add the glut.rc file to your
|
|
kusano |
7d535a |
project if you are using Microsoft Developer Studio.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
IMPLEMENTATION DEPENDENT DIFFERENCES:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
There are a few differences between the Win32 version of GLUT
|
|
kusano |
7d535a |
and the X11 version of GLUT. Those are outlined here. Note
|
|
kusano |
7d535a |
that MOST of these differences are allowed by the GLUT
|
|
kusano |
7d535a |
specification. Bugs and unsupported features are outlined in
|
|
kusano |
7d535a |
the UNSUPPORTED/BUGS section.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutInit:
|
|
kusano |
7d535a |
The following command line options have no meaning (and are
|
|
kusano |
7d535a |
ignored) in GLUT for Win32:
|
|
kusano |
7d535a |
-display, -indirect, -direct, -sync.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutInitWindowPosition, glutPositionWindow:
|
|
kusano |
7d535a |
Win32 has two different coordinate systems for windows.
|
|
kusano |
7d535a |
One is in terms of client space and the other is the whole
|
|
kusano |
7d535a |
window space (including the decorations). If you
|
|
kusano |
7d535a |
glutPositionWindow(0, 0), GLUT for Win32 will place the
|
|
kusano |
7d535a |
window CLIENT area at 0, 0. This will cause the window
|
|
kusano |
7d535a |
decorations (title bar and left edge) to be OFF-SCREEN, but
|
|
kusano |
7d535a |
it gives the user the most flexibility in positioning.
|
|
kusano |
7d535a |
HOWEVER, if the user specifies glutInitWindowPosition(0, 0),
|
|
kusano |
7d535a |
the window is placed relative to window space at 0, 0.
|
|
kusano |
7d535a |
This will cause the window to be opened in the upper left
|
|
kusano |
7d535a |
corner with all the decorations showing. This behaviour is
|
|
kusano |
7d535a |
acceptable under the current GLUT specification.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutSetIconTitle, glutSetWindowTitle:
|
|
kusano |
7d535a |
There is no separation between Icon title and Window title
|
|
kusano |
7d535a |
in Win32. Therefore, setting an icon title in Win32 has
|
|
kusano |
7d535a |
no effect.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutSetCursor:
|
|
kusano |
7d535a |
As indicated in the GLUT specification, cursors may be
|
|
kusano |
7d535a |
different on different platforms. This is the case in GLUT
|
|
kusano |
7d535a |
for Win32. For the most part, the cursors will match the
|
|
kusano |
7d535a |
meaning, but not necessarily the shape. Notable exceptions
|
|
kusano |
7d535a |
are the GLUT_CURSOR_INFO & GLUT_CURSOR_SPRAY which use the
|
|
kusano |
7d535a |
crosshair cursor and the GLUT_CURSOR_CYCLE which uses the
|
|
kusano |
7d535a |
'no' or 'destroy' cursor in Win32.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutVisibilityFunc:
|
|
kusano |
7d535a |
Win32 seems to be unable to determine if a window is fully
|
|
kusano |
7d535a |
obscured. Therefore, the visibility of a GLUT window is
|
|
kusano |
7d535a |
only reflected by its Iconic, Hidden or Shown state. That
|
|
kusano |
7d535a |
is, even if a window is fully obscured, in GLUT for Win32,
|
|
kusano |
7d535a |
it is still "visible".
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutEntryFunc:
|
|
kusano |
7d535a |
Window Focus is handled differently in Win32 and X.
|
|
kusano |
7d535a |
Specifically, the "window manager" in Win32 uses a "click to
|
|
kusano |
7d535a |
focus" policy. That is, in order for a window to receive
|
|
kusano |
7d535a |
focus, a mouse button must be clicked in it. Likewise, in
|
|
kusano |
7d535a |
order for a window to loose focus, a mouse button must be
|
|
kusano |
7d535a |
clicked outside the window (or in another window).
|
|
kusano |
7d535a |
Therefore, the Enter and Leave notification provided by GLUT
|
|
kusano |
7d535a |
may behave differently in the Win32 and in X11 versions.
|
|
kusano |
7d535a |
There is a viable workaround for this. A program called
|
|
kusano |
7d535a |
"Tweak UI" is provided by Microsoft which can be used to
|
|
kusano |
7d535a |
change the focus policy in Win32 to "focus follows mouse".
|
|
kusano |
7d535a |
It is available from the Microsoft Web Pages:
|
|
kusano |
7d535a |
http://www.microsoft.com/windows/software/PowerToy.htm
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutCopyColormap:
|
|
kusano |
7d535a |
GLUT for Win32 always copies the colormap. There is never
|
|
kusano |
7d535a |
any sharing of colormaps. This is probably okay, since
|
|
kusano |
7d535a |
Win32 merges the logical palette and the physical palette
|
|
kusano |
7d535a |
anyway, so even if there are two windows with totally
|
|
kusano |
7d535a |
different colors in their colormaps, Win32 will find a
|
|
kusano |
7d535a |
(hopefully) good match between them.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutIdleFunc + menus:
|
|
kusano |
7d535a |
The glut idle function will NOT be called when a menu is
|
|
kusano |
7d535a |
active. This causes all animation to stop when a menu is
|
|
kusano |
7d535a |
active (in general, this is probably okay). Timer
|
|
kusano |
7d535a |
functions will still fire, however. If the timer callback
|
|
kusano |
7d535a |
draws into the rendering context, the drawing will not show
|
|
kusano |
7d535a |
up until after the menu has finished, though.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
UNSUPPORTED/BUGS:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutAttachMenu:
|
|
kusano |
7d535a |
Win32 only likes to work with left and right mouse buttons.
|
|
kusano |
7d535a |
Especially so with popup menus. Therefore, when attaching
|
|
kusano |
7d535a |
the menu to the middle mouse button, the LEFT mouse button
|
|
kusano |
7d535a |
must be used to select from the menu.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o glutSpaceball*, glutButtonBox*, glutTablet*, glutDials*:
|
|
kusano |
7d535a |
None of the special input devices are supported at this
|
|
kusano |
7d535a |
time.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o When resizing or moving a GLUT for Win32 window, no updating
|
|
kusano |
7d535a |
is performed. This causes the window to leave "tracks" on
|
|
kusano |
7d535a |
the screen when getting bigger or when previously obscured
|
|
kusano |
7d535a |
parts are being revealed. I put in a bit of a kludgy
|
|
kusano |
7d535a |
workaround for those that absolutely can't have the weird
|
|
kusano |
7d535a |
lines. The reshape callback is called multiple times for
|
|
kusano |
7d535a |
reshapes. Therefore, in the reshape callback, some drawing
|
|
kusano |
7d535a |
can be done. It should probably be limited to a color buffer
|
|
kusano |
7d535a |
clear.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o The video resizing capabilities of GLUT 3.3+ for X11 is
|
|
kusano |
7d535a |
currently unimplemented (this is probably ok, since it
|
|
kusano |
7d535a |
really isn't part of the spec until 4.0). I doubt that
|
|
kusano |
7d535a |
this will ever be part of GLUT for Win32, since there is no
|
|
kusano |
7d535a |
hardware to support it. A hack could simply change the
|
|
kusano |
7d535a |
resolution of the desktop.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
CHANGES/FIXES:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Nov 8, '01)
|
|
kusano |
7d535a |
x Released 3.7.6
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Nov 8, '01)
|
|
kusano |
7d535a |
x Changed fullscreen mode from TOPMOST back to simply TOP, since
|
|
kusano |
7d535a |
(it turns out) many people use windows atop a GLUT window.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Nov 8, '01)
|
|
kusano |
7d535a |
x Added code to prevent CPU spiking when no idle function is
|
|
kusano |
7d535a |
registered. Otherwise, if an idle function is registered, spike
|
|
kusano |
7d535a |
CPU so that the idle function gets all the attention it needs and
|
|
kusano |
7d535a |
if this is a problem on the program side, the user can stick a
|
|
kusano |
7d535a |
sleep() in their idle function. I believe that this strikes the
|
|
kusano |
7d535a |
best balance betweeen GLUT being fast, and also being "nice" to
|
|
kusano |
7d535a |
other processes. Thanks to James Wright for reporting this bug.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Nov 8, '01)
|
|
kusano |
7d535a |
x Fixed bug in motion callback handler which wasn't setting the
|
|
kusano |
7d535a |
current window, so multiple window apps (e.g., any GLUI app)
|
|
kusano |
7d535a |
wouldn't get the callback correctly.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 4, '01)
|
|
kusano |
7d535a |
x Fixed bug in glutEnterGameMode() that caused new windows to not
|
|
kusano |
7d535a |
be in "fullscreen" mode, so they got window decorations.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 4, '01)
|
|
kusano |
7d535a |
x Fixed bug in glutEnterGameMode() that caused new windows to not
|
|
kusano |
7d535a |
be in "fullscreen" mode, so they got window decorations.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 3, '01)
|
|
kusano |
7d535a |
x Fixed bug in getVisualInfoFromString(): visuals not reloaded on
|
|
kusano |
7d535a |
display mode change. Reload visuals each time they are queried.
|
|
kusano |
7d535a |
This fixes a problem with Win32 because the list of availabe Visuals
|
|
kusano |
7d535a |
(Pixelformats) changes after a change in displaymode. The problem
|
|
kusano |
7d535a |
occurs when switching to gamemode and back. Thanks to Michael
|
|
kusano |
7d535a |
Wimmer for pointing this out & providing the fix.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 3, '01)
|
|
kusano |
7d535a |
x Fixed bug in XGetVisualInfo(): pixelformats enumerated incorrectly.
|
|
kusano |
7d535a |
Passing 0 as a pixelformat index to DescribePixelFormat gives
|
|
kusano |
7d535a |
unpredictible results (e.g., this fails on the Voodoo opengl32.dll
|
|
kusano |
7d535a |
and always reports 0 as the last available pixelformat index).
|
|
kusano |
7d535a |
Thanks to Michael Wimmer for pointing this out & providing the fix.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 3, '01)
|
|
kusano |
7d535a |
x Fixed bug in glXGetConfig(): pixelformats enumerated incorrectly. The
|
|
kusano |
7d535a |
test was OpenGL support OR draw to window, but should be AND. Thanks
|
|
kusano |
7d535a |
to Michael Wimmer for pointing this out & providing the fix.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x Fixed glutChangeToSubMenu()/glutChangeToMenuEntry() bug where if you
|
|
kusano |
7d535a |
went back and forth between a submenu and a plain entry, the submenu
|
|
kusano |
7d535a |
wouldn't be updated properly.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x glutSetIconTitle() is now a nop.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x glutFullScreen() now sets the window as TOPMOST, therefore, the
|
|
kusano |
7d535a |
window will always be on top (this essentially disables alt-tabbing).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x The key repeat ignore flag is now honored correctly.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x Key presses are now reported more accurately and fully, in
|
|
kusano |
7d535a |
particular, modified up events (i.e., SHIFT-2) are now reported
|
|
kusano |
7d535a |
correctly.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x Subwindows nested arbitrarily deep get their keyboard callbacks
|
|
kusano |
7d535a |
correctly now.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 28, '01)
|
|
kusano |
7d535a |
x Major rewrite of the window procedure code to clean it up and make
|
|
kusano |
7d535a |
way for other bug fixes.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 23, '01)
|
|
kusano |
7d535a |
x Fixed noof example program to use RAND_MAX instead of assumed
|
|
kusano |
7d535a |
max of 2147483647.0. (Now it looks _much_ better!)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 22, '01)
|
|
kusano |
7d535a |
x Fixed sunlight example program. globe.raw data file was corrupt,
|
|
kusano |
7d535a |
added a new one.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sep 22, '01)
|
|
kusano |
7d535a |
x Fixed zcomposite example program to print message if overlay
|
|
kusano |
7d535a |
support is not found (instead of crashing).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Jan 22, '01)
|
|
kusano |
7d535a |
x Fixed malloc(0) bug in Win32 version of XGetVisualInfo. Thanks
|
|
kusano |
7d535a |
to Kekoa Proudfoot for bringing this to my attention.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Dec 12, '00)
|
|
kusano |
7d535a |
x Added data files for the advanced & advanced97 programs.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Dec 12, '00)
|
|
kusano |
7d535a |
x Added Developer Studio 6 project and workspace files for pretty
|
|
kusano |
7d535a |
much everything (the stuff left out was usually unix specific).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Dec 7, '00)
|
|
kusano |
7d535a |
x Fixed several compilation problems & corrupt files. Thanks to
|
|
kusano |
7d535a |
Alexander Stohr for bringing these to my attention and providing
|
|
kusano |
7d535a |
detailed fixes.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Dec 6, '00)
|
|
kusano |
7d535a |
x Fixed compiler support for lcc. Thanks to Gordon for bringing
|
|
kusano |
7d535a |
this to my attention and debugging fixes.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Nov 8, '00)
|
|
kusano |
7d535a |
x Fixed submenu problem (sometimes the menu callback was not
|
|
kusano |
7d535a |
called for valid items). Thanks to Michael Keeley.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Oct 16, '00)
|
|
kusano |
7d535a |
x Corrected corrupt duck.iv file. Thanks to Jon Willeke for finding
|
|
kusano |
7d535a |
this problem.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sept 27, '00)
|
|
kusano |
7d535a |
x Fixed bug in processWorkList that could cause a hang. Thanks to
|
|
kusano |
7d535a |
Bill Volz & Daniel Azuma.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sept 26, '00)
|
|
kusano |
7d535a |
x Added mui DLL project file (thanks to DMWeldy@ugsolutions.com).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Sept 9, '00)
|
|
kusano |
7d535a |
x Fixed Delete key bug (crash when no keyboard callback was
|
|
kusano |
7d535a |
registered, but a special key callback was). Thanks to
|
|
kusano |
7d535a |
Kent Bowling (kent_bowling@hotmail.com) for finding this bug.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(May 18, '00)
|
|
kusano |
7d535a |
x Fixed subwindow keyboard callbacks.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(May 22, '97)
|
|
kusano |
7d535a |
o Menus don't work under Windows 95
|
|
kusano |
7d535a |
x Fixed! Added a unique identifier to each menu item, and a
|
|
kusano |
7d535a |
search function to grab a menu item given the unique identifier.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(May 21, '97)
|
|
kusano |
7d535a |
o A few minor bug fixes here and there.
|
|
kusano |
7d535a |
x Thanks to Bruce Silberman and Chris Vale for their help with
|
|
kusano |
7d535a |
this. We now have a DLL!
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Apr 25, '97)
|
|
kusano |
7d535a |
o DLL version of the library is coming (as soon as I figure out
|
|
kusano |
7d535a |
how to do it -- if you know, let me know).
|
|
kusano |
7d535a |
x Thanks to Bruce Silberman and Chris Vale for their help with
|
|
kusano |
7d535a |
this. We now have a DLL!
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Apr 24, '97)
|
|
kusano |
7d535a |
x Added returns to KEY_DOWN etc messages so that the F10 key
|
|
kusano |
7d535a |
doesn't toggle the system menu anymore.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Apr 7, '97)
|
|
kusano |
7d535a |
o Palette is incorrect for modes other than TrueColor.
|
|
kusano |
7d535a |
x Fixed this by forcing a default palette in modes that aren't
|
|
kusano |
7d535a |
Truecolor in order to 'simulate' it. The applications
|
|
kusano |
7d535a |
program shouldn't have to do this IMHO, but I guess we
|
|
kusano |
7d535a |
can't argue with Microsoft (well, we can, but what good
|
|
kusano |
7d535a |
will it do?).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Apr 2, '97)
|
|
kusano |
7d535a |
x Added glut.ide file for Borland users.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Apr 2, '97)
|
|
kusano |
7d535a |
x Fixed a bug in the WM_QUERYNEWPALETTE message. Wasn't
|
|
kusano |
7d535a |
checking for a null colormap, then de-ref'd it. Oops.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 13, '97)
|
|
kusano |
7d535a |
o glutTimerFunc:
|
|
kusano |
7d535a |
Currently, GLUT for Win32 programs busy waits when there is
|
|
kusano |
7d535a |
an outstanding timer event (i.e., there is no select()
|
|
kusano |
7d535a |
call). I haven't found this to be a problem, but I plan to
|
|
kusano |
7d535a |
fix it just because I can't bear the thought of a busy wait.
|
|
kusano |
7d535a |
x Added a timer event and a wait in the main loop. This fixes
|
|
kusano |
7d535a |
the CPU spike.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 11, '97)
|
|
kusano |
7d535a |
x Fixed subwindow visibility. The visibility callback of
|
|
kusano |
7d535a |
subwindows wasn't being called, now it is.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 11, '97)
|
|
kusano |
7d535a |
o glutGetHDC, glutGetHWND:
|
|
kusano |
7d535a |
In order to support additional dialog boxes, wgl fonts, and
|
|
kusano |
7d535a |
a host of other Win32 dependent structures, two functions
|
|
kusano |
7d535a |
have been added that operate on the current window in GLUT.
|
|
kusano |
7d535a |
The first (glutGetHDC) returns a handle to the current
|
|
kusano |
7d535a |
windows device context. The second (glutGetHWND) returns
|
|
kusano |
7d535a |
handle to the current window.
|
|
kusano |
7d535a |
x Took these out to preserve GLUT portability.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 11, '97)
|
|
kusano |
7d535a |
x Fixed the glutWarpPointer() coordinates. Were relative to
|
|
kusano |
7d535a |
the screen, now relative to window (client area) origin
|
|
kusano |
7d535a |
(which is what they're supposed to be).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 11, '97)
|
|
kusano |
7d535a |
o glutCreateMenu, glutIdleFunc:
|
|
kusano |
7d535a |
Menu's are modal in Win32. That is, they don't allow any
|
|
kusano |
7d535a |
messages to be processed while they are up. Therefore, if
|
|
kusano |
7d535a |
an idle function exists, it will not be called while
|
|
kusano |
7d535a |
processing a menu.
|
|
kusano |
7d535a |
x Fixed! I've put in a timer function that fires every
|
|
kusano |
7d535a |
millisecond while a menu is up. The timer function handles
|
|
kusano |
7d535a |
idle and timer events only (which should be the only
|
|
kusano |
7d535a |
functions that are firing when a menu is up anyway).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 7 '97)
|
|
kusano |
7d535a |
x Fixed minor bugs tracked down by the example programs.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Mar 6, '97)
|
|
kusano |
7d535a |
x Merged 3.3 GLUT for X11 into 3.2 GLUT for Win32. New code
|
|
kusano |
7d535a |
structure allows for EASY merging!
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o In Win32, the parent gets the right to set the cursor of
|
|
kusano |
7d535a |
any of its children. Therefore, a child windows cursor
|
|
kusano |
7d535a |
will 'blink' between its cursor and its parent.
|
|
kusano |
7d535a |
x Fixed this by checking whether the cursor is in a child
|
|
kusano |
7d535a |
window or not.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Feb 28 '97)
|
|
kusano |
7d535a |
o On initial bringup apps are getting 2 display callbacks.
|
|
kusano |
7d535a |
x Fixed by the Fev 28 re-write.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Some multiple window (not subwindow) functionality is messed up.
|
|
kusano |
7d535a |
See the sphere.exe program.
|
|
kusano |
7d535a |
x Fixed by the Feb 28 re-write.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o GLUT for Win32 supports color index mode ONLY in a paletted
|
|
kusano |
7d535a |
display mode (i.e., 256 or 16 color mode).
|
|
kusano |
7d535a |
x Fixed this in the re-write. If you can get a color index
|
|
kusano |
7d535a |
visual (pixel format) you can use color index mode.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(Feb 28 '97)
|
|
kusano |
7d535a |
o Quite a few bugs (and incompatibilities) were being caused
|
|
kusano |
7d535a |
by the structure that I used in the previous port of GLUT.
|
|
kusano |
7d535a |
Therefore I decided that it would be best to "get back to
|
|
kusano |
7d535a |
the roots". I re-implemented most of glut trying to stick
|
|
kusano |
7d535a |
with the structure layed out by Mark. The result is a much
|
|
kusano |
7d535a |
more stable version that passes ALL (!) (except overlay)
|
|
kusano |
7d535a |
the tests provided by Mark. In addition, this new
|
|
kusano |
7d535a |
structure will allow future enhancements by Mark to be
|
|
kusano |
7d535a |
integrated much more quickly into the Win32 version. Also,
|
|
kusano |
7d535a |
I'm now ordering the bugs in reverse, so that the most
|
|
kusano |
7d535a |
recently fixed appear at the top of the list.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(9/8/96)
|
|
kusano |
7d535a |
o Changed the glutGetModifiers code to produce an error if not
|
|
kusano |
7d535a |
called in the core input callbacks.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(9/11/96)
|
|
kusano |
7d535a |
o If the alt key is pressed with more than one other modifier key
|
|
kusano |
7d535a |
it acts as if it is stuck -- it stays selected until pressed
|
|
kusano |
7d535a |
and released again.
|
|
kusano |
7d535a |
x Fixed.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(9/12/96)
|
|
kusano |
7d535a |
o When a submenu is attached to a menu, sometimes a GPF occurs.
|
|
kusano |
7d535a |
Fixed. Needed to set the submenu before referencing it's members.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Kenny: Also, one little problem, I attached the menu to the
|
|
kusano |
7d535a |
right-button, but when the left-button is pressed I detach
|
|
kusano |
7d535a |
it to give the right-button new meaning; if I pop-up the menu and I
|
|
kusano |
7d535a |
don't want to select anything, like most users, I click off of the
|
|
kusano |
7d535a |
menu to make it disappear. When I do this, I get a GLUT error and
|
|
kusano |
7d535a |
the program terminates because I am altering the menu attachment
|
|
kusano |
7d535a |
from within the button press while the menu is active.
|
|
kusano |
7d535a |
x Fixed. Needed to finish the menu when the user presses the button,
|
|
kusano |
7d535a |
not just when a button is released.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o GLUT for Win32 emulates a middle mouse button by checking if
|
|
kusano |
7d535a |
both mouse buttons are down. This causes a lot of problems with
|
|
kusano |
7d535a |
the menu and other multiple mouse button things.
|
|
kusano |
7d535a |
x Fixed. No more middle mouse button emulation. Perhaps it would
|
|
kusano |
7d535a |
be a good idea to emulate the middle mouse button (if not present)
|
|
kusano |
7d535a |
with a key?
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(9/15/96)
|
|
kusano |
7d535a |
o Added code to accept a user defined icon. If no icon is provided,
|
|
kusano |
7d535a |
a default icon is loaded.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(9/19/96)
|
|
kusano |
7d535a |
o Shane: Command line options seem to be screwed up. (9/13)
|
|
kusano |
7d535a |
x Fixed. The geometry command line was broken, and so was the
|
|
kusano |
7d535a |
gldebug command line.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Fixed a bug in the default glut reshape. It was looking for the
|
|
kusano |
7d535a |
parent of the current window and GPF'ing if there wasn't a parent.
|
|
kusano |
7d535a |
Put in a check for a parent, and if none is there, use the
|
|
kusano |
7d535a |
child.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Idle function sucks up all processor cycles. (9/8/96)
|
|
kusano |
7d535a |
x I don't know if this is avoidable. If you have a tight rendering
|
|
kusano |
7d535a |
loop, it may be that the processor time is going to be sucked up
|
|
kusano |
7d535a |
no matter what. You can add a sleep() to the end of your render
|
|
kusano |
7d535a |
loop if you would like to yeild to other processes and you don't
|
|
kusano |
7d535a |
care too much about the speed of your rendering loop. If you have
|
|
kusano |
7d535a |
Hardware that supports OpenGL (like a 3Dpro card, or GLint card)
|
|
kusano |
7d535a |
then this should be less of a problem, since it won't be rendering
|
|
kusano |
7d535a |
in software. (9/11/96)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o If a window is fully obscured by another window, the visibility
|
|
kusano |
7d535a |
callback is NOT called. As far as I can tell, this is a limitation
|
|
kusano |
7d535a |
of the Win32 api, but a workaround is being searched for. (9/8/96)
|
|
kusano |
7d535a |
x Limitation of the Win32 API
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Fixed the entry functions. They only work if the keyboard focus
|
|
kusano |
7d535a |
changes. Therefore, in most Win32 systems, the mouse must be
|
|
kusano |
7d535a |
pressed outside of the window to get a GLUT_LEFT message and
|
|
kusano |
7d535a |
then pressed inside the window for a GLUT_ENTERED message.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Alt modifier key doesn't work with keyboard callback. (9/8/96)
|
|
kusano |
7d535a |
x Probably okay, because the glut spec says that these keys can
|
|
kusano |
7d535a |
be intercepted by the system (which the alt key is...) (9/11/96)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(11/17/96)
|
|
kusano |
7d535a |
o glutRemoveMenuItem() not working properly.
|
|
kusano |
7d535a |
x Thanks to Gary (grc@maple.civeng.rutgers.edu) for the fix to
|
|
kusano |
7d535a |
this one.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Timer functions are messed up.
|
|
kusano |
7d535a |
x Thanks to Joseph Galbraith for the fix to this one.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(12/9/96)
|
|
kusano |
7d535a |
o One (minor) difference came up between the X version of glut
|
|
kusano |
7d535a |
and the nt one which you should know about. It is not a new
|
|
kusano |
7d535a |
problem, and it concerns co-ords returned to the pointer
|
|
kusano |
7d535a |
callbacks. (glutMotionFunc, glutMouseFunc)
|
|
kusano |
7d535a |
Under X, you get co-ords in the range 0 +/- 2^15, under NT
|
|
kusano |
7d535a |
you get 0..2^16. This is only really a problem when moving
|
|
kusano |
7d535a |
above or to the left of the window.
|
|
kusano |
7d535a |
eg dragging one pixel ABOVE the window will give :-
|
|
kusano |
7d535a |
under x11 : y = -1
|
|
kusano |
7d535a |
under nt : y = 2^16 -1
|
|
kusano |
7d535a |
x Put in fix provided by Shane Clauson.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(12/17/96)
|
|
kusano |
7d535a |
o Idle functions not working properly for multiple windows.
|
|
kusano |
7d535a |
x Fixed this by posting an idle message to every window in the
|
|
kusano |
7d535a |
window list when idle.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
(12/18/96)
|
|
kusano |
7d535a |
o glutSetCursor() was misbehaving (lthomas@cco.caltech.edu).
|
|
kusano |
7d535a |
x Win32 requires that the hCursor member of the window class
|
|
kusano |
7d535a |
be set to NULL when the class is registered or whenever the
|
|
kusano |
7d535a |
mouse is moved, the original cursor is replaced (go
|
|
kusano |
7d535a |
figure!). Now sets the cursor whenever a WM_MOUSEMOVE message
|
|
kusano |
7d535a |
is received, because the WM_SETCURSOR event resets the cursor
|
|
kusano |
7d535a |
even when in the decoration area.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Geometry is not being handled quite right. The numbers don't
|
|
kusano |
7d535a |
take into account the window decorations. That is, if I say
|
|
kusano |
7d535a |
make a window 100x100, then the WHOLE window (not just the
|
|
kusano |
7d535a |
client area) is 100x100. Therefore, the client (opengl) area
|
|
kusano |
7d535a |
is smaller than 100x100. (9/8/96)
|
|
kusano |
7d535a |
x Fixed. Added code to subtract the decoration size on glutGet()
|
|
kusano |
7d535a |
and add the decoration size on glutReshapeWindow().
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
o Multiple glutPostRedisplay() calls are NOT being combined.
|
|
kusano |
7d535a |
To get round the "coalesce" problem on glutPostRedisplay,
|
|
kusano |
7d535a |
the easiest solution is to roll-your-own coalesce by
|
|
kusano |
7d535a |
keeping a global "dirty" flag in the app (eg replace all
|
|
kusano |
7d535a |
calls to glutPostRedisplay with image_dirty=TRUE;), and to
|
|
kusano |
7d535a |
handle image_dirty with a single glutPostRedisplay in the
|
|
kusano |
7d535a |
idle callback when required. (erk - but increases
|
|
kusano |
7d535a |
performance for my particular app (a rendering engine on
|
|
kusano |
7d535a |
the end of a pipleine with a stream of graphics updates) by
|
|
kusano |
7d535a |
a couple of orders of magnitude ! ) (9/8/96)
|
|
kusano |
7d535a |
x Added code to coalesce redisplays. Every idle cycle, a
|
|
kusano |
7d535a |
check is made to see which windows need redisplay, if they
|
|
kusano |
7d535a |
need it, a redisplay is posted. The glutPostRedisplay()
|
|
kusano |
7d535a |
call is just a stub that sets a flag.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
THANKS:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Special thanks to the following people for extensive testing,
|
|
kusano |
7d535a |
suggestions, fixes and help:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Alexander Stohr
|
|
kusano |
7d535a |
Shane Clauson
|
|
kusano |
7d535a |
Kenny Hoff
|
|
kusano |
7d535a |
Richard Readings
|
|
kusano |
7d535a |
Paul McQuesten
|
|
kusano |
7d535a |
Philip Winston
|
|
kusano |
7d535a |
JaeWoo Ahn
|
|
kusano |
7d535a |
Joseph Galbraith
|
|
kusano |
7d535a |
Paula Higgins
|
|
kusano |
7d535a |
Sam Fortin
|
|
kusano |
7d535a |
Chris Vale
|
|
kusano |
7d535a |
Bill Mitchell
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
and of course, the original author of GLUT:
|
|
kusano |
7d535a |
Mark Kilgard.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
and many others...
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
COPYRIGHT:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The OpenGL Utility Toolkit distribution for Win32 (Windows NT &
|
|
kusano |
7d535a |
Windows 95) contains source code modified from the original source
|
|
kusano |
7d535a |
code for GLUT version 3.3 which was developed by Mark J. Kilgard. The
|
|
kusano |
7d535a |
original source code for GLUT is Copyright 1997 by Mark J. Kilgard.
|
|
kusano |
7d535a |
GLUT for Win32 is Copyright 1997 by Nate Robins and is not in the
|
|
kusano |
7d535a |
public domain, but it is freely distributable without licensing fees.
|
|
kusano |
7d535a |
It is provided without guarantee or warrantee expressed or implied.
|
|
kusano |
7d535a |
It was ported with the permission of Mark J. Kilgard by Nate Robins.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
THIS SOURCE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
|
kusano |
7d535a |
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
kusano |
7d535a |
OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
OpenGL (R) is a registered trademark of Silicon Graphics, Inc.
|