From 3583101e586a6fe3306f84d4d34ee764596e0632 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 24 Jul 2001 12:07:18 +0000 Subject: optimized context switching --- CNativeCode/OpenGL_misc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'CNativeCode/OpenGL_misc.c') diff --git a/CNativeCode/OpenGL_misc.c b/CNativeCode/OpenGL_misc.c index fabd968..ff00cce 100644 --- a/CNativeCode/OpenGL_misc.c +++ b/CNativeCode/OpenGL_misc.c @@ -6,6 +6,7 @@ #include #include #include "glxtool.h" + #include #endif #ifdef _WIN32_ @@ -863,17 +864,17 @@ Java_gl4java_GLContext_gljTestGLProc ( } -JNIEXPORT jint JNICALL +JNIEXPORT jlong JNICALL Java_gl4java_GLContext_gljGetCurrentContext( JNIEnv *env, jobject obj ) { #ifdef _WIN32_ - return (jint) disp__wglGetCurrentContext(); + return (jlong) ((PointerHolder)disp__wglGetCurrentContext()); #else #ifdef _MAC_OS9_ - return (jint) aglGetCurrentContext(); + return (jlong) ((PointerHolder)aglGetCurrentContext()); #else - return (jint) disp__glXGetCurrentContext(); + return (jlong) ((PointerHolder)disp__glXGetCurrentContext()); #endif #endif } -- cgit v1.2.3