From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv22313/common Modified Files: checkGLerror.h extgl.c extgl.h org_lwjgl_opengl_GLU.cpp Log Message: Switched to dynamic loading of gl functions and libs Index: checkGLerror.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/checkGLerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkGLerror.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- checkGLerror.h 26 Nov 2002 17:34:26 -0000 1.5 +++ checkGLerror.h 11 Dec 2002 07:16:31 -0000 1.6 @@ -14,7 +14,6 @@ #include <jni.h> #include "extgl.h" -#include <GL/glu.h> #define CHECK_GL_ERROR \ { \ Index: extgl.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extgl.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl.c 19 Nov 2002 07:42:54 -0000 1.1 +++ extgl.c 11 Dec 2002 07:16:31 -0000 1.2 @@ -37,18 +37,472 @@ #include <stdio.h> #include <string.h> -#ifndef _WIN32 -#include <GL/glx.h> -#endif /* _WIN32 */ - /* turn off the warning for the borland compiler*/ #ifdef __BORLANDC__ #pragma warn -8064 #pragma warn -8065 [...1546 lines suppressed...] + lib_glu_handle = LoadLibrary("glu32.dll"); + if (lib_glu_handle == NULL) + return 1; +#endif + + return 0; +} + +void extgl_Close(void) +{ +#ifndef _WIN32 + dlclose(lib_glu_handle); + dlclose(lib_gl_handle); +#else + FreeLibrary(lib_gl_handle); + FreeLibrary(lib_glu_handle); +#endif } /* deprecated function please do not use it, use extgl_Initialize() instead */ Index: extgl.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extgl.h 19 Nov 2002 07:42:54 -0000 1.1 +++ extgl.h 11 Dec 2002 07:16:31 -0000 1.2 @@ -1,4997 +1,5673 @@ -/* Small parts were taken from glext.h, here's the lisence: */ - -/* -** License Applicability. Except to the extent portions of this file are -** made subject to an alternative license as permitted in the SGI Free -** Software License B, Version 1.1 (the "License"), the contents of this -** file are subject only to the provisions of the License. You may not use -** this file except in compliance with the License. You may obtain a copy -** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 -** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: -** [...10620 lines suppressed...] + int OpenGL13; + int OpenGL14; +}; + +extern struct ExtensionTypes extgl_Extensions; + +extern struct ExtensionTypes SupportedExtensions; /* deprecated, please do not use */ + +/* initializes everything, call this right after the rc is created. the function returns 0 if successful */ +int extgl_Initialize(); +int extgl_Open(void); +void extgl_Close(void); + +int glInitialize(); /* deprecated, please do not use */ + +#ifdef __cplusplus +} +#endif + +#endif /* __EXTGL_H__ */ Index: org_lwjgl_opengl_GLU.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_GLU.cpp 30 Nov 2002 03:40:47 -0000 1.4 +++ org_lwjgl_opengl_GLU.cpp 11 Dec 2002 07:16:31 -0000 1.5 @@ -39,14 +39,9 @@ * @version $Revision$ */ -#ifdef _WIN32 -#include <windows.h> -#endif - #include "org_lwjgl_opengl_GLU.h" #include "extgl.h" #include "checkGLerror.h" -#include "GL/glu.h" #include "callbacks/GLUQuadricCallbacks.h" |