GLUT for Win32 README
---------------------
VERSION/INFO:
This is GLUT for Win32 version 3.7.6 as of Nov 8th 2001.
See the COPYRIGHT section for distribution and copyright notices.
Send all bug reports and questions for this version of GLUT to
Nate Robins [nate@pobox.com].
For more information about GLUT for Win32, see the web page:
www.pobox.com/~nate/glut.html or subscribe to the GLUT for Win32
mailing list by sending e-mail to majordomo@perp.com with
"subscribe glut" in the body of the message.
For general information about GLUT, see the GLUT web page:
http://reality.sgi.com/opengl/glut3/glut3.html and be sure to
check the GLUT FAQ first for any questions that you may have:
http://reality.sgi.com/opengl/glut3/glut-faq.html
COMPILING/INSTALLATION:
o Precompiled versions of the DLL and import library can be
found on the GLUT for Win32 web page mentioned above.
o Microsoft Developer Studio 6 workspace and project files have
been included in the source code distribution.
To build the glut dll:
First, open Microsoft Developer Studio.
Then, select File -> Open Workspace and find the glut.dsw file
in the file dialog and double-click on it.
Finally, select Build -> Build glut32.dll.
When the build is finished, it will copy:
glut32.dll to %WinDir%\System,
glut32.lib to $(MSDevDir)\..\..\VC98\lib, and
glut.h to $(MSDevDir)\..\..\VC98\include\GL.
Additional workspace files have been included in the progs, test
and lib directories to build the progs, tests and libs respectively.
BORLAND NOTES:
From what I understand, Borland supplies a utility that
converts Microsoft Visual C++ .libs into Borland compatible
files. Therefore, the best method for Borland users is
probably to get the precompiled versions of the library and
convert the library. To create an import library for Borland
from the DLLs, use the following command (from a command prompt):
IMPLIB glut32.lib glut32.dll
If IMPLIB crashes when called this way, try
IMPLIB glut32.lib glut32.def
using the glut32.def file in this distribution.
FORTRAN NOTES:
Bill Mitchell [william.mitchell@nist.gov] has put considerable
effort into getting GLUT to work with different compilers for
Fortran 90. He indicates that you should copy the f90glut.h
file to your $(MSDevDir)\..\..\VC98\include\GL directory.
Then, just build GLUT as usual. The Fortran 90 interface, f90gl,
can be obtained at http://math.nist.gov/f90gl and contains
installation instructions and usage examples.
MISC NOTES:
o Overlay support is not implemented, nor are there any plans to
implement it in the near future.
o To customize the windows icon, you can use the resource name
GLUT_ICON. For example, create an icon named "glut.ico", and
create a file called glut.rc that contains the following:
GLUT_ICON ICON glut.ico
then compile the glut.rc file with the following:
rc /r glut
and link the resulting glut.res file into your executable
(just like you would an object file).
Alternatively, you can simply add the glut.rc file to your
project if you are using Microsoft Developer Studio.
IMPLEMENTATION DEPENDENT DIFFERENCES:
There are a few differences between the Win32 version of GLUT
and the X11 version of GLUT. Those are outlined here. Note
that MOST of these differences are allowed by the GLUT
specification. Bugs and unsupported features are outlined in
the UNSUPPORTED/BUGS section.
o glutInit:
The following command line options have no meaning (and are
ignored) in GLUT for Win32:
-display, -indirect, -direct, -sync.
o glutInitWindowPosition, glutPositionWindow:
Win32 has two different coordinate systems for windows.
One is in terms of client space and the other is the whole
window space (including the decorations). If you
glutPositionWindow(0, 0), GLUT for Win32 will place the
window CLIENT area at 0, 0. This will cause the window
decorations (title bar and left edge) to be OFF-SCREEN, but
it gives the user the most flexibility in positioning.
HOWEVER, if the user specifies glutInitWindowPosition(0, 0),
the window is placed relative to window space at 0, 0.
This will cause the window to be opened in the upper left
corner with all the decorations showing. This behaviour is
acceptable under the current GLUT specification.
o glutSetIconTitle, glutSetWindowTitle:
There is no separation between Icon title and Window title
in Win32. Therefore, setting an icon title in Win32 has
no effect.
o glutSetCursor:
As indicated in the GLUT specification, cursors may be
different on different platforms. This is the case in GLUT
for Win32. For the most part, the cursors will match the
meaning, but not necessarily the shape. Notable exceptions
are the GLUT_CURSOR_INFO & GLUT_CURSOR_SPRAY which use the
crosshair cursor and the GLUT_CURSOR_CYCLE which uses the
'no' or 'destroy' cursor in Win32.
o glutVisibilityFunc:
Win32 seems to be unable to determine if a window is fully
obscured. Therefore, the visibility of a GLUT window is
only reflected by its Iconic, Hidden or Shown state. That
is, even if a window is fully obscured, in GLUT for Win32,
it is still "visible".
o glutEntryFunc:
Window Focus is handled differently in Win32 and X.
Specifically, the "window manager" in Win32 uses a "click to
focus" policy. That is, in order for a window to receive
focus, a mouse button must be clicked in it. Likewise, in
order for a window to loose focus, a mouse button must be
clicked outside the window (or in another window).
Therefore, the Enter and Leave notification provided by GLUT
may behave differently in the Win32 and in X11 versions.
There is a viable workaround for this. A program called
"Tweak UI" is provided by Microsoft which can be used to
change the focus policy in Win32 to "focus follows mouse".
It is available from the Microsoft Web Pages:
http://www.microsoft.com/windows/software/PowerToy.htm
o glutCopyColormap:
GLUT for Win32 always copies the colormap. There is never
any sharing of colormaps. This is probably okay, since
Win32 merges the logical palette and the physical palette
anyway, so even if there are two windows with totally
different colors in their colormaps, Win32 will find a
(hopefully) good match between them.
o glutIdleFunc + menus:
The glut idle function will NOT be called when a menu is
active. This causes all animation to stop when a menu is
active (in general, this is probably okay). Timer
functions will still fire, however. If the timer callback
draws into the rendering context, the drawing will not show
up until after the menu has finished, though.
UNSUPPORTED/BUGS:
o glutAttachMenu:
Win32 only likes to work with left and right mouse buttons.
Especially so with popup menus. Therefore, when attaching
the menu to the middle mouse button, the LEFT mouse button
must be used to select from the menu.
o glutSpaceball*, glutButtonBox*, glutTablet*, glutDials*:
None of the special input devices are supported at this
time.
o When resizing or moving a GLUT for Win32
- 1
- 2
前往页