GLFW v2.4.1
Euphoria Distribution
1. Introduction
Welcome to version 2.4.1 of the GLFW OpenGL framework. GLFW is
a free, open source, portable framework for OpenGL application
development. In short, it is a library that constitutes a
powerful API for handling operating system specific tasks, such
as opening an OpenGL window, reading keyboard and mouse input,
creating threads, and much more. You will need some sort of
interface to the OpenGL libraries. Included in this zip are
modified versions of mic's OpenGL wrappers. If you are more
comfortable with something else, simple include it instead. The
GLFW include does not depend on it, only the examples do.
2. Using GLFW
How does the GLFW API work?
This point is covered in the GLFW
Users Guide and the GLFW
Reference Manual, and I suggest that you read at least the
Users Guide, since it is a good introduction to the GLFW API.
Designing and compiling programs that use GLFW is not very
difficult. A few rules for successfully designing GLFW-based
programs are presented in the following sections.
2.1 Include GL/glfw.e
In your program, your first included file (and sometimes the
only included file) should be GL/glfw.e. This include file
defines all the necessary constants, types and prototypes that
are used to interact with the GLFW API. You should also include
GL/gl.e and GL/glu.e or any suitable version which you are
comfortable with.
3. Version History
v2.4.1
- Added AmigaOS support (preliminary)
- GLFW for the X Window System now works under Mac OS X
- Bugfix: [Win32] glfwWaitCond treated the timeout as
milliseconds instead of seconds
- Bugfix: [X11] GLFW should now compile under IRIX v5.3
- Bugfix: [X11] GLFW should now compile with Kylix
v2.4
- Major source code rearrangement - much code is now shared
between different platforms, and it should be easier to port
GLFW to new platforms
- Added a Unicode keyboard text input interface
(CharCallback)
- Keyboard key input is now slightly more internationalized:
GLFW now uses 8-bit ISO-8859-1 encoding for keys representing
printable characters (e.g. "Ö", "§", etc), as opposed
to the previous 7-bit US-ASCII encoding
- Added more key constants (F13-F25, keypad '=')
- Added an enable/disable swicth for automatic event polling
from glfwSwapBuffers
- [X11] Added support for sysctl for querying the number of
processors in the system (if POSIX sysconf is not
supported)
- Bugfix: [X11] compile.sh now works with Sun sh (and
hopefully others too)
- Bugfix: [X11] compile.sh now detects the need for -ldl when
dlopen is used
- Bugfix: [Win32] When closing a fullscreen window under Win
9x/NT4, the task bar icon now disappears properly
- Bugfix: [Win32] GLFW should now compile on a wider range of
MSVC compilers (e.g. .NET) - Thanks Tim Little!
v2.3.2
- Removed the silly limitation of 100 threads (the thread
information is now kept in a linked list)
- General source cleanup (window state is now kept in a
single struct, plus some other minor changes)
- [X11] Added Solaris gethrtime() support (not tested yet),
which should give an improved timer for Sun/Solaris
stations
- [X11] Some fixes to the 'compile.sh' script (-O for non-gcc
compilers and 'make x11-gcc' should now really force GCC)
v2.3.1
- [X11] A minimalist configuration script was added that
solves the issue with glXGetProcAddressARB, and unifies all
Unix/X11 Makefiles into one template Makefile (well, one for
GLFW, and one for the examples)
v2.3
- Added OpenGL stereo rendering support
- Added a function for parsing the OpenGL version string
(glfwGetGLVersion)
- Bugfix: [x86] Hopefully the CPU core clock dependent timer
RDTSC will never be used on CPUs with variable core frequencies
anymore
- Bugfix: [X11] GLFW could create stereo rendering capable
windows, even if it was not requested (GLFW v2.2.x did not
support selection of stereo rendering)
- Bugfix: [X11] glfwGetProcAddress returned NULL on most
systems (even on those that supported glXGetProcAddressARB).
Now GLFW assumes that glXGetProcAddressARB is supported on all
systems, which solves the bug, but may result in compiler
errors on some systems (please let me know if you have any
related problems).
v2.2.3
- Bugfix: Checking for GL_SGIS_generate_mipmap is more
robust
- Bugfix: glfwLoadTexture2D will now fail if no window is
opened
- Bugfix: [Win32] Right shift was not detected under Win
9x/ME (it is still not as good as under NT/2K/XP, but at least
you get right shifts)
- Bugfix: [X11] Visuals are now selected more accurately. For
instance, glfwOpenWindow will no longer fail if you request a
24-bit color buffer if only 16-bit color visuals are avilable
(which means that pong3d should work on 16-bit displays).
v2.2.2
- Bugfix: [Win32] Windows did not always get focus (this was
a tough one!)
- Bugfix: [Win32] glfwGetWindowParam did not work with
GLFW_ACCUM_*_BITS or GLFW_AUX_BUFFERS
- Bugfix: [X11] Linux joystick Y axis positions were
reversed
v2.2.1
- [X11] Added joystick support for Linux
v2.2
- Added joystick support (only supported under Windows so
far)
- Added joystick controls to pong3d.c (only 3 more lines of
code)
- Added glfwOpenWindowHint() function
- It is now possible to specify a desired vertical monitor
refresh rate (for fullscreen windows)
- It is now possible to request an accumulator buffer and
auxiliary buffers
- Added glfwSetTime() function
- Added a GLFW conversion of the MESA/GLUT gears.c demo to
the example programs
- [Win32] gdi32.dll and winmm.dll are now loaded dynamically
when glfwInit() is called. This means that there is no need to
link with gdi32.lib or winmm.lib when using the static version
of GLFW, which should make GLFW usage more convenient.
- Bugfix: [Win32] Greatly improved keyboard input (detect
left/right CTRL etc)
- Bugfix: [Win32] glfwExtensionSupported now detects all WGL
extensions (e.g. WGL_ARB_pbuffer)
- Bugfix: [Win32] Mouse cursor was not re-hidden when a GLFW
window was deselected and then selected again (with
ALT+TAB)
- Bugfix: [X11] Minor bug in the SGI timer - and ugly
(unintended) SGI timer debug info removed
- Bugfix: [X11] glfwGetDesktopMode and glfwGetVideoModes no
longer give segmentation faults if no X server is
available
v2.1
- Added image and texture loading capabilities (support for
the TGA file format at the moment)
- Added a new example program (mipmaps.c) for showing off the
automatic mipmap generation and texture loading capabilities of
GLFW 2.1
- Removed the separate TGA loader (tga.c in the examples
directory) since texture loading is supported natively by GLFW.
Also updated the Pong3D demo to use GLFW texture loading
instead of tga.c.
- Improved keyboard handling (e.g. numeric keypad keys can be
detected)
- Added a new example program, keytest.c
- Changed the GLFWvidmode structure and the corresponding API
functions to report pure color bits instead of the confusing
(and unportable) "BPP" field
- Changed glfwSetWindowSize so that it operates in fullscreen
mode too
- Added mouse wheel support under Windows (not Win95) and
X11
- Added window iconification functions (glfwInconifyWindow
and glfwRestoreWindow)
- Improved iconification and deactivation handling under both
Windows and X11
- Made it possible to turn on/off key repeat (the default is
now no key repeat)
- Added SGI hardware timer support (CLOCK_SGI_CYCLE) for
improved timer resolution for SGI computers
- Added support for the free Borland C++ Builder 5.x compiler
for Windows
- Made it possible to compiler GLFW as a Windows DLL using
any of the supported compilers
- Some constants have changed names (e.g. GLFW_REDBITS is now
called GLFW_RED_BITS)
- Updated GLFW documentation (GLFW Users Guide and GLFW
Reference Manual) to reflect the changes in the API
- Bugfix: [Win32] Corrected Cygwin toplevel makefile
entry
- Bugfix: [Win32] Fixed event lag bug
- Bugfix: [Win32] Fixed Radeon 8500 crash
- Bugfix: [X11] Fixed the window close bug
- Bugfix: [X11] Iconification/deactivation is now
detected
- Bugfix: [X11] Non-OpenGL visuals are not listed
anymore
- Bugfix: [XFree86] Undesired video mode changes are now
prevented
v2.0.3
- Added precise CPU cycle based timing support (RDTSC) for
x86 CPUs (under both Windows and Unix)
- Added a makefile option for building for Windows with
Cygwin
- Corrected the CC for Unix/X11 makefiles (-Wall is usually
not a supported flag for CC, so it was removed from the CFLAGS
list)
v2.0.2
- Added a makefile option for building for X11 with 'cc'
rather than 'gcc' (useful for IRIX users for instance).
- Bugfix: [Win32] Mouse coordinates are now relative to the
window upper left corner, which also means that disabling the
mouse cursor in windowed mode should work much better.
- Bugfix: [X11] Added a bunch of more keys that are
recognized by GLFW.
- Bugfix: [X11] glfwGetNumberOfProcessors now works for IRIX
(earlier versions of GLFW would not compile under IRIX).
v2.0.1
- glfwTerminate() will now be called automatically upon
normal program termination (using atexit())
- Bugfix: [Win32] Buffer-swapping did not work if a window
lost focus.
- Bugfix: [Win32] Top level Makefile did not work under
Windows 9x.
- Bugfix: [Win32] NULL declaratoin in glfw.h was not MSVC 7.x
compatible.
- Bugfix: [X11] GLFW would not build with C++ (e.g.
g++).
v2.0
- GLFW is no longer a single source file, but an entire link
library.
- Added multi threading support.
- Added more window control.
- New distribution layout (both Win32 and X11 version in same
archive).
- Added GLFW Users Manual and GLFW Reference Manual as PDF
files.
- Some bugfixes.
v1.0.2
- Improved fullscreen functionality.
- Added fullscreen support for X11.
v1.0.1
- Added support for the X Window System.
- Fixed bugs.
v1.0.0
- First release.
- Only supported Windows.
4. Files in the GLFW Euphoria Distribution
Here is a list of the files in the GLFW source
distribution:
license.txt |
|
The GLFW license (please read it) |
readme.html |
|
This file |
|
|
|
docs/ |
|
Directory containing GLFW manuals in PDF format |
glfwug14.pdf |
|
GLFW Users Guide 1.4 (for GLFW 2.4.x) |
glfwrm14.pdf |
|
GLFW Reference Manual 1.4 (for GLFW 2.4.x) |
|
|
|
Euphoria/ |
|
Directory containing several example programs |
boing.exw |
|
An example program |
gears.exw |
|
An example program |
keytest.exw |
|
An example program |
listmodes.exw |
|
An example program |
mipmaps.exw |
|
An example program |
mipmaps.tga |
|
Texture for mipmaps.exw |
mthello.exw |
|
An example program |
splitview.exw |
|
An example program |
triangle.exw |
|
An example program |
GL/ |
|
--"-- |
glfw.e |
|
The GLFW include file |
|
|
|
5. The author
My name is Marcus Geelnard, marcus.geelnard@home.se.
Please contact me if you have any problems with GLFW, or any
questions at all concerning compiling or using GLFW.
The official GLFW web site can be found here: http://glfw.sourceforge.net/.
It contains the latest version of GLFW, news and other
information that is useful for OpenGL development.
The Euphoria wrapper was created by Elliott Sales de Andrade,
quantum_analst@hotmail.com
6. Acknowledgements
GLFW would not be what it is today without the help from:
- Keith Bauer, for his invaluable help with porting GLFW to
Mac OS X (presently X11 only, but soon native Carbon too), and
for his many ideas.
- Ozzy @
- Orkysquad, for his dedication to
GLFW, for debugging my source, and for his valuable experience
with game development.
- Jeff Molofee, the author of the excellent OpenGL tutorials
at NeHe
Productions. Much of the Windows code of GLFW was
originally based on Jeff's code.
- Douglas C. Schmidt and Irfan Pyarali, for their excellent
article Strategies
for Implementing POSIX Condition Variables on Win32, which
is the basis for the Win32 condition variable implementation in
GLFW.
- Gerald Franz, who made GLFW compile under IRIX, and
supplied patches for the X11 keyboard translation routine.
- Dmitri Shuralyov, for bug reports and testing.
- Paul R. Deppe, who helped me with Cygwin support, and made
an adaption of PLIB so that it can use GLFW
(instead of GLUT).
- Jarrod Davis, for the Delphi port of GLFW.
- Toni Jovanoski, for helping me with the MASM32 port of
GLFW, and supplying the example program and fixed OpenGL &
GLU bindings for MASM32.
- www.opengl.org, and all the people
on the discussion forums there that have provided help during
the development of GLFW.
- The MSDN Online Linrary,
which was used extensively for Windows development.
- All the feedback from GLFW users - thank you!.