From d7e9a66338b9183ac9cd20743d38b1d8b3e95fa7 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 21 Nov 2002 11:00:40 +0000 Subject: [PATCH] Fixed a bug that made extensions unavailable --- src/native/linux/org_lwjgl_opengl_BaseGL.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/native/linux/org_lwjgl_opengl_BaseGL.cpp b/src/native/linux/org_lwjgl_opengl_BaseGL.cpp index a601c3c3..32ff5696 100644 --- a/src/native/linux/org_lwjgl_opengl_BaseGL.cpp +++ b/src/native/linux/org_lwjgl_opengl_BaseGL.cpp @@ -47,6 +47,10 @@ extern XVisualInfo * vis_info; extern Window win; extern Display * disp; +void makeCurrent(void) { + glXMakeCurrent(disp, win, context); +} + /* * Class: org_lwjgl_opengl_BaseGL * Method: nCreate @@ -70,6 +74,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate return JNI_FALSE; } + makeCurrent(); if (extgl_Initialize() != 0) { #ifdef _DEBUG 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 (JNIEnv * env, jobject obj) { - glXMakeCurrent(disp, win, context); + makeCurrent(); }