Changes to Freeglut: Before and on October 22, 2002: (1) Many trivial changes (changing floating-point numbers to integers, for example) to reduce the number of compiler warnings (2) Removing "strlen" calls from for-loop headers to make things execute ever-so-slightly faster (3) Slight changes to the "glutSolidSphere" and "glutWireSphere" functions to reduce the number of calls to the sine and cosine functions and otherwise make it slightly more efficient (4) Added wire and solid torus, wire and solid dodecahedron, wire and solid octahedron, wire and solid tetrahedron, and wire and solid icosahedron (5) Fixed a bug by which the GLUT menu now draws even when nothing else is happening in the window (6) Fixed a bug by which freeglut now tracks which window text is being entered into (7) Added code to adjust for the thickness of the window borders and header bar when resizing and repositioning a window October 23, 2002: (8) Added a window destroy callback for freeglut to call the application when a window is closed. Made freeglut call "exit" if there is no window destroy callback. October 24, 2002: (8b) Also started working on the code to implement the other behaviors when the user clicks on the "x" on the window header bar. (9) Added the "glutSetOption" function, the "GLUT_ACTION_ON_WINDOW_CLOSE" enumeration, and its allowed values (10) Added code to check whether a window is a subwindow in the reposition and reshape functions. If it is a subwindow, do not adjust the position and size for the window border. (11) Added code to fix the drawing of subwindows inside of windows. The Windows implementation uses "GetWindowRect" which uses coordinates relative to the screen corner, not the parent window corner. (12) Modified the code to open a window so that the freeglut window now matches the GLUT window. (13) Added an ugly hack to the main loop function to call each window's visibility callback before jumping into the main loop. This fixes the behaviour of several of the demo programs. ******************************************************************************************* * Sent a copy of the files to Steve Baker 10/24/02. ******************************************************************************************* (14) Reworked the "freeglut_font.c" file pretty thoroughly to speed things up a bit, to add the "glutStrokeString" function, and to make the "glutStrokeLength" function return an accurate value for long strings. Also allowed the string functions to handle character strings containing carriage returns. (15) Moved the "fgState" structure initialization in "freeglut_init.c" out of "fgInitialize" to set them at compile time. Also added it to "fgDeinitialize" to reset the state. (16) Recoded a bit in "glutInit" to speed things up slightly (17) Added "#pragma warning ( once: 4305 )" directives to the stroke font files so that I don't get 4000 compiler warnings about assigning double precision constants to single precision variables (18) Added a state enumeration (initializing, running, stopping) and flag to the "fgState" structure. Modified the window closure and main loop code to use the enumeration instead of local variables. (19) Fixed the "glutPositionWindow" so that if you get and retrieve the window position twenty times in a row the window won't slide down the screen. (20) Recoded the "glut*Cone" functions so that they have normals on the curved surface and so that the "base" argument is really the radius of the base of the cone. (21) Added code to render a rhombic dodecahedron in the geometry library. (22) Started work on a "glutInitDisplayString" function. I have provided a framework; I will need some serious help in interpreting the results. (23) Modified the "fgDisplayMenu" so that the matrix mode is GL_MODELVIEW instead of GL_PROJECTION when execution returns to its calling function. I have no idea why, but this fixes some display problems in some of the demos. Part (or all) of the display was blanking out when the user brought up a menu. (24) Added four "pragma comment" lines to "freeglut.h" so that freeglut will automatically (under Windows) include "winmm.lib", "opengl32.lib", "glu32.lib", and "freeglut.lib". This way the application doesn't have to do this by hand. (25) Fixed the window positioning code so that if the border is going to extend above the top of the screen, it gets set to the top of the screen. (26) Added right-arrows to menu entries which have submenus. Also modified the submenu position so that it comes down to the right or to the left of the parent menu. (27) Recoded a good bit of the menu processing to make the menus behave more like GLUT menus. ******************************************************************************************* * Sent a copy of the files to Steve Baker 10/31/02. Also posted these on the reflector. ******************************************************************************************* (28) Added parentheses to the Windows version of setting the "State.Modifiers" to allow for precedence of operators. Also modified the code so that it follows the "getKeyState" return value specification. (29) Made the window event handler check for the existence of a window for all messages except the "create" message (30) Changed the order of events in the window closure function so that the window would still be in the windows structure when the closure message to Windows was sent. (31) Made some more changes to the window closure code so that it works from both clicking on the "x" and from a "glutDestroyWindow" call ******************************************************************************************* * Sent a copy of the files to Steve Baker 10/31/02 as an update. Also posted these on the reflector. ******************************************************************************************* (32) Added "glutLeaveMainLoop" function. (33) Added "glutMainLoopEvent" function. This processes a single iteration through the "glutMainLoop" and is (theoretically) usable for re-entrant GLUT code. (34) Implemented the "WM_KEYUP" and "WM_SPECIALKEYUP" callbacks in the Windows version. (35) Added normals to the "glutWireCube" function (36) Recoded "glutGetExtension" to remove a "goto" statement from the code. (37) Marked the "glutSetKeyRepeat" function as deprecated. (38) Implemented most of the Windows version of the "fghGetConfig" function. ******************************************************************************************* * Took up the project again November 19. ******************************************************************************************* (39) Added two missing characters to each of the bitmapped fonts. (40) Added "glutSierpinskiSponge" to the geometry file. I can take it out if people object. (41) Added a linked list of windows to close so that if you destroy a window from within its callback the program won't terminate on error. (42) Added a call to "free" in the joystick code so we wouldn't have a memory leak. Also fixed another memory leak. (43) Fixed the bitmapped Helvetica 12 and Helvetica 18 fonts so they now match the GLUT fonts. ******************************************************************************************* * Sent the files to Don Heyse on November 27 for inclusion in CVS. ******************************************************************************************* (44) Fixed the other bitmapped fonts so they now match the GLUT fonts. There are some differences in the placement of the bit patterns within the characters, but the greatest difference is only a pixel or two. (45) Added DLL capability. Changed the names of the outputs so that the static library is "freeglut_static.lib" and the names of the DLL file and its interface file are "freeglut.dll" and "freeglut.lib". (46) Moved the "freeglut_internal.h" file from the public include directory to the private source code directory. (47) Split the "freeglut.h" file into a "glut.h" file that is compatible with GLUT and a "freeglut_ext.h" file that contains the new extensions. ******************************************************************************************* * Changes starting in May 2003 ******************************************************************************************* (48) Changed "freeglut_main.c" to allow the Windows version to pass the mouse position to the keystroke callbacks (49) Changed "freeglut_main.c" in the Unix section to move the call to find the event's window to before the "switch" statement. (50) Changed "freeglut_main.c" in the Unix section to modify the window closure sequence of events slightly. (51) Changed "freeglut_state.c" so the "glutGet" calls with window position and size don't move the windows down and to the right one pixel. (52) Implement single-buffered rendering (or its emulation) in Windows. (53) Implement Eero Pajarre's "GLUT_ICON" code. (54) Fixes for the window positioning problem. (55) Fixed a couple of compiler warnings and other bugs. Changed "freeglut_main.c" to remove a compiler warning. Changed "freeglut_structure.c" to set the current window before calling the window closure callback. ******************************************************************************************* * Changes on 17-19 June 2003 ******************************************************************************************* (56) Added glutGetProcAddress() (57) Added GLUT_FPS env var. (58) Implemented Aleksandar Donev's user data changes: added user data fields to window and menu structures and implemented functions to get and set them (59) Added a "MenuDestroy" callback which sets a function that "freeglut" calls when a menu is destroyed. ******************************************************************************************* * Changes on 20 June 2003 ******************************************************************************************* (60) Added autogen.sh (#30 from todo.txt) (70) Updated aclocal.m4 with aclocal 1.7.3 (was created with aclocal 1.5) (71) Changed all references to the 'freeglut-1.3' directory to 'src', copied 'freeglut-1.3' to 'src' and added all files to the repository (TODO #34). ******************************************************************************************* * Changes on 24 June 2003 ******************************************************************************************* (80) Fixed autogen.sh and removed aclocal.m4 (81) Added 'freeglut.kdevelop' (Gideon [Kdevelop 3.0]) project file ******************************************************************************************* * Changes on 24 June 2003 ******************************************************************************************* (82) Added 'freeglut_ext.c' to the project files 'freeglut.dsp' and 'freeglut_static.dsp' (New list #10) ******************************************************************************************* * Changes on 27 June 2003 ******************************************************************************************* (83) Now installs freeglut_ext.h and glut.h to /usr/include/GL (was missing before) ******************************************************************************************* * Changes on 01 July 2003 ******************************************************************************************* (84) Fixed the 'ptr + len' problem in freeglut_misc.c:90 ******************************************************************************************* * Changes on 02 July 2003 ******************************************************************************************* (85) Removed genfonts/genstrokes code, updated configure.in and Makefile.in (86) Moved tests/one.c into progs/demos/One/one.c, updated configure.in and Makefile.in (87) Removed tests directory ******************************************************************************************* * Changes on 03 July 2003 ******************************************************************************************* (88) Removed unused char *ptr from freeglut_misc.c ******************************************************************************************* * Changes on 17 July 2003 ******************************************************************************************* (89) Changed the overlay (freeglut_state.c:662) to return FALSE, as it's not implemented yet. (90) Applied John F. Fay's fixes to freeglut.dsp and freeglut_static.dsp ******************************************************************************************* * Changes on 21 July 2003 ******************************************************************************************* (91) src/Makefile.am:38 Changed versioning to 11:0:8 thanks to Bernhard Kaindl ******************************************************************************************* * Changes on 22 July 2003 ******************************************************************************************* (92) freeglut.lsm:3 Removed 'beta' label for next release, thanks to Bernhard Kaindl. ******************************************************************************************* * Changes on 23 July 2003 ******************************************************************************************* (93) doc/Makefile.am:4 Removed trailing backslash and added an empty last line (94) src/freeglut_window.c Windowing fixes from John F. ******************************************************************************************* * Changes on 23 July 2003 ******************************************************************************************* (95) src/freeglut_initial.c:91 Added check for SOLARIS OS (Dave Reed) (96) src/freeglut_window.c:551 Removed extra carriage return for Windows users (John F. Fay) ******************************************************************************************* * Changes on 05 August 2003 ******************************************************************************************* (97) src/freeglut_main.c:816 and :1571, set the current window (John F. Fay)