From: Elias N. <eli...@us...> - 2002-12-11 07:16:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv22313/win32 Modified Files: org_lwjgl_opengl_BaseGL.cpp Log Message: Switched to dynamic loading of gl functions and libs Index: org_lwjgl_opengl_BaseGL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_BaseGL.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_BaseGL.cpp 24 Nov 2002 17:13:33 -0000 1.4 +++ org_lwjgl_opengl_BaseGL.cpp 11 Dec 2002 07:16:31 -0000 1.5 @@ -108,7 +108,8 @@ printf("Failed to set pixel format\n"); return JNI_FALSE; } - + if (extgl_Open() != 0) + return JNI_FALSE; // Create a rendering context hglrc = wglCreateContext(hdc); if (hglrc == NULL) { @@ -119,6 +120,11 @@ // Automatically make it the current context wglMakeCurrent(hdc, hglrc); + if (extgl_Initialize() != 0) { + printf("Failed to initialize GL\n"); + return JNI_FALSE; + } + char * p = (char *) glGetString(GL_EXTENSIONS); if (NULL == p) { printf("NO extensions available\n"); @@ -126,11 +132,6 @@ printf("Available extensions:\n%s\n", p); } - if (extgl_Initialize() != 0) { - printf("Failed to initialize GL\n"); - return JNI_FALSE; - } - return JNI_TRUE; } @@ -147,7 +148,7 @@ // Delete the rendering context if (hglrc != NULL) wglDeleteContext(hglrc); - + extgl_Close(); } /* |