Fixed a bug that made extensions unavailable

This commit is contained in:
Elias Naur 2002-11-21 11:00:40 +00:00
parent d77551e685
commit d7e9a66338
1 changed files with 6 additions and 1 deletions

View File

@ -47,6 +47,10 @@ extern XVisualInfo * vis_info;
extern Window win; extern Window win;
extern Display * disp; extern Display * disp;
void makeCurrent(void) {
glXMakeCurrent(disp, win, context);
}
/* /*
* Class: org_lwjgl_opengl_BaseGL * Class: org_lwjgl_opengl_BaseGL
* Method: nCreate * Method: nCreate
@ -70,6 +74,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate
return JNI_FALSE; return JNI_FALSE;
} }
makeCurrent();
if (extgl_Initialize() != 0) { if (extgl_Initialize() != 0) {
#ifdef _DEBUG #ifdef _DEBUG
printf("Could not init gl function pointers\n"); printf("Could not init gl function pointers\n");
@ -112,6 +117,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_swapBuffers(JNIEnv * env, jo
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nMakeCurrent JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nMakeCurrent
(JNIEnv * env, jobject obj) (JNIEnv * env, jobject obj)
{ {
glXMakeCurrent(disp, win, context); makeCurrent();
} }