diff --git a/freeglut/freeglut/doc/freeglut_user_interface.html b/freeglut/freeglut/doc/freeglut_user_interface.html index 2363341..77645ac 100644 --- a/freeglut/freeglut/doc/freeglut_user_interface.html +++ b/freeglut/freeglut/doc/freeglut_user_interface.html @@ -1065,7 +1065,7 @@ is not implemented in freeglut.
-The following state variables may be queried with glutGet. +The following state variables may be queried with "glutGet". The returned value is an integer.
@@ -1134,7 +1134,7 @@ These queries do not depend on the current window.glutGetProcAddress returns -a pointer to a named GL or freeglut function.
+a pointer to a named GL or freeglut function.Usage
void *glutGetProcAddress ( const char *procName ) ;
@@ -1150,8 +1150,11 @@ the application will avoid this hard dependency and be more portable and interop better with various implementations of OpenGL.Both OpenGL functions and freeglut functions can be queried with this function.
-NOTE: this function is not supported -in GLUT.
+Changes From GLUT
+ +GLUT does not include this function. +
+-freeglut users should normally just include GL/glut.h in their programs. -Programs which need freeglut-specific functions should also include -GL/freeglut_ext.h as follows: +Application programmers who are porting their GLUT programs to freeglut may continue +to include <GL/glut.h> in their programs. +Programs which use the freeglut-specific extensions to GLUT should include +<GL/freeglut.h>. One possible arrangement is as follows:
-#include <GL/glut.h> #ifdef FREEGLUT #include <GL/freeglut_ext.h> +#else +#include <GL/glut.h> #endifdiff --git a/freeglut/freeglut/freeglut-1.3/freeglut_display.c b/freeglut/freeglut/freeglut-1.3/freeglut_display.c index 834cbc6..de19841 100644 --- a/freeglut/freeglut/freeglut-1.3/freeglut_display.c +++ b/freeglut/freeglut/freeglut-1.3/freeglut_display.c @@ -100,7 +100,7 @@ void FGAPIENTRY glutSwapBuffers( void ) if (fgState.SwapTime == 0) fgState.SwapTime = t; else if (t - fgState.SwapTime > fgState.FPSInterval) { - float time = 0.001 * (t - fgState.SwapTime); + float time = 0.001f * (t - fgState.SwapTime); float fps = (float) fgState.SwapCount / time; fprintf(stderr, "freeglut: %d frames in %.2f seconds = %.2f FPS\n", fgState.SwapCount, time, fps); diff --git a/freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c b/freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c index e9e9276..d6c6a25 100644 --- a/freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c +++ b/freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c @@ -75,7 +75,7 @@ void fghRememberState( void ) #elif TARGET_HOST_WIN32 - DEVMODE devMode; +/* DEVMODE devMode; */ /* * Grab the current desktop settings... @@ -250,7 +250,7 @@ GLboolean fghChangeDisplayMode( GLboolean haveToTest ) unsigned int displayModes = 0, mode = 0xffffffff; GLboolean success = FALSE; - HDC desktopDC; +/* HDC desktopDC; */ DEVMODE devMode; /* @@ -278,33 +278,33 @@ GLboolean fghChangeDisplayMode( GLboolean haveToTest ) displayModes++; } - if( mode == 0xffffffff ) + if ( mode == 0xffffffff ) { /* then try without Display Frequency */ - displayModes=0; + displayModes = 0; /* * Enumerate the available display modes */ while( EnumDisplaySettings( NULL, displayModes, &devMode ) == TRUE ) - { - /* then try without Display Frequency */ + { + /* then try without Display Frequency */ + + if( fghCheckDisplayMode( devMode.dmPelsWidth, devMode.dmPelsHeight, + devMode.dmBitsPerPel, fgState.GameModeRefresh)) + { + /* + * OKi, we've found a matching display mode, remember its number and break + */ + mode = displayModes; + break; + } - if( fghCheckDisplayMode( devMode.dmPelsWidth, devMode.dmPelsHeight, - devMode.dmBitsPerPel, fgState.GameModeRefresh)) - { - /* - * OKi, we've found a matching display mode, remember its number and break - */ - mode = displayModes; - break; - } - - /* - * Switch to the next display mode, if any - */ - displayModes++; - } + /* + * Switch to the next display mode, if any + */ + displayModes++; + } } /* diff --git a/freeglut/freeglut/freeglut-1.3/freeglut_geometry.c b/freeglut/freeglut/freeglut-1.3/freeglut_geometry.c index 5fae579..ad21c8c 100644 --- a/freeglut/freeglut/freeglut-1.3/freeglut_geometry.c +++ b/freeglut/freeglut/freeglut-1.3/freeglut_geometry.c @@ -71,10 +71,10 @@ */ void FGAPIENTRY glutWireCube( GLdouble dSize ) { - float size = (float) dSize * 0.5f; + double size = dSize * 0.5; -# define V(a,b,c) glVertex3f( a size, b size, c size ); -# define N(a,b,c) glNormal3f( a, b, c ); +# define V(a,b,c) glVertex3d( a size, b size, c size ); +# define N(a,b,c) glNormal3d( a, b, c ); /* * PWO: I dared to convert the code to use macros... @@ -95,10 +95,10 @@ void FGAPIENTRY glutWireCube( GLdouble dSize ) */ void FGAPIENTRY glutSolidCube( GLdouble dSize ) { - float size = (float) dSize * 0.5f; + double size = dSize * 0.5; -# define V(a,b,c) glVertex3f( a size, b size, c size ); -# define N(a,b,c) glNormal3f( a, b, c ); +# define V(a,b,c) glVertex3d( a size, b size, c size ); +# define N(a,b,c) glNormal3d( a, b, c ); /* * PWO: Again, I dared to convert the code to use macros... @@ -121,18 +121,18 @@ void FGAPIENTRY glutSolidCube( GLdouble dSize ) */ void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks ) { - float radius = (float) dRadius, phi, psi, dpsi, dphi; - float* vertex; + double radius = dRadius, phi, psi, dpsi, dphi; + double *vertex; int i, j; - float cphi, sphi, cpsi, spsi ; + double cphi, sphi, cpsi, spsi ; /* * Allocate the vertices array */ - vertex = calloc( sizeof(float), 3 * slices * (stacks - 1) ); + vertex = calloc( sizeof(double), 3 * slices * (stacks - 1) ); glPushMatrix(); - glScalef( radius, radius, radius ); + glScaled( radius, radius, radius ); dpsi = M_PI / (stacks + 1); dphi = 2 * M_PI / slices; @@ -140,15 +140,15 @@ void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks ) for( j=0; j