aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode
diff options
context:
space:
mode:
Diffstat (limited to 'CNativeCode')
-rw-r--r--CNativeCode/GLCallbackHelperJNI.c14
-rw-r--r--CNativeCode/GLCallbackHelperJNI.h3
-rw-r--r--CNativeCode/GLDrawableFactory_X11_SunJDK13.c51
-rw-r--r--CNativeCode/OpenGLU_JauJNI12_funcs.c178
-rw-r--r--CNativeCode/OpenGLU_JauJNI12tst_funcs.c2398
-rw-r--r--CNativeCode/OpenGLU_JauJNI_funcs.c178
-rwxr-xr-xCNativeCode/OpenGL_Win32.c12
-rwxr-xr-xCNativeCode/OpenGL_Win32_common.c708
-rwxr-xr-xCNativeCode/OpenGL_Win32_common.h38
-rwxr-xr-xCNativeCode/OpenGL_Win32_jawt.c18
-rw-r--r--CNativeCode/OpenGL_X11.c59
-rw-r--r--CNativeCode/OpenGL_X11_common.c707
-rw-r--r--CNativeCode/OpenGL_X11_common.h67
-rw-r--r--CNativeCode/OpenGL_X11_jawt.c60
-rw-r--r--CNativeCode/OpenGL_misc.c583
-rw-r--r--CNativeCode/OpenGL_misc.h51
-rw-r--r--CNativeCode/jawt_misc.c4
17 files changed, 526 insertions, 4603 deletions
diff --git a/CNativeCode/GLCallbackHelperJNI.c b/CNativeCode/GLCallbackHelperJNI.c
index 2039560..ec40372 100644
--- a/CNativeCode/GLCallbackHelperJNI.c
+++ b/CNativeCode/GLCallbackHelperJNI.c
@@ -2,12 +2,14 @@
#include "GLCallbackHelperJNI.h"
#include "jnitools.h"
-#ifndef _WIN32_
- #ifdef macintosh
+#ifdef _WIN32_
+ #include "wgltool.h"
+#else
+ #ifdef _MAC_OS9_
#include <agl.h>
#include <string.h>
#else
- #include <GL/glx.h>
+ #include "glxtool.h"
#endif
#endif
@@ -225,12 +227,12 @@ void LIBAPIENTRY RemoveCallbackNodes(void *cb_obj)
jlong LIBAPIENTRY GetCurrentGLContext()
{
#ifdef _WIN32_
- return (jlong) wglGetCurrentContext();
+ return (jlong) disp__wglGetCurrentContext();
#else
- #ifdef macintosh
+ #ifdef _MAC_OS9_
return (jlong) aglGetCurrentContext();
#else
- return (jlong) glXGetCurrentContext();
+ return (jlong) disp__glXGetCurrentContext();
#endif
#endif
}
diff --git a/CNativeCode/GLCallbackHelperJNI.h b/CNativeCode/GLCallbackHelperJNI.h
index 102f65a..210271d 100644
--- a/CNativeCode/GLCallbackHelperJNI.h
+++ b/CNativeCode/GLCallbackHelperJNI.h
@@ -12,8 +12,7 @@
#include <jni.h>
- #include<GL/gl.h>
- #include <GL/glu.h>
+ #include "gltool.h"
#ifndef LIBAPIENTRY
#define LIBAPIENTRY
diff --git a/CNativeCode/GLDrawableFactory_X11_SunJDK13.c b/CNativeCode/GLDrawableFactory_X11_SunJDK13.c
index 51e204c..5d41051 100644
--- a/CNativeCode/GLDrawableFactory_X11_SunJDK13.c
+++ b/CNativeCode/GLDrawableFactory_X11_SunJDK13.c
@@ -14,10 +14,11 @@ Java_gl4java_drawable_X11SunJDK13GLDrawableFactory_glXChooseVisualID
XVisualInfo * visual=NULL;
int visualAttribList[32];
int done=0;
-
+ jboolean ok;
GLCapabilities glCaps;
+ int accumTestDone=0;
- jboolean ok = javaGLCapabilities2NativeGLCapabilities ( env,
+ ok = javaGLCapabilities2NativeGLCapabilities ( env,
capsObj, &glCaps );
if(JNI_TRUE!=ok)
@@ -50,7 +51,7 @@ Java_gl4java_drawable_X11SunJDK13GLDrawableFactory_glXChooseVisualID
printGLCapabilities ( &glCaps );
}
- visual = glXChooseVisual( disp, screen, visualAttribList );
+ visual = disp__glXChooseVisual( disp, screen, visualAttribList );
if(JNI_TRUE==verbose)
{
@@ -66,19 +67,47 @@ Java_gl4java_drawable_X11SunJDK13GLDrawableFactory_glXChooseVisualID
/**
* Falling-Back the exact (min. requirement) parameters ..
*/
- if(visual==NULL && glCaps.stereo==STEREO_ON) {
+ if(visual==NULL)
+ {
+ if(glCaps.stereo==STEREO_ON) {
glCaps.stereo=STEREO_OFF;
- } else if(visual==NULL && glCaps.stencilBits>32) {
+ } else if(glCaps.stencilBits>32) {
glCaps.stencilBits=32;
- } else if(visual==NULL && glCaps.stencilBits>16) {
+ } else if(glCaps.stencilBits>16) {
glCaps.stencilBits=16;
- } else if(visual==NULL && glCaps.stencilBits>8) {
+ } else if(glCaps.stencilBits>8) {
glCaps.stencilBits=8;
- } else if(visual==NULL && glCaps.stencilBits>0) {
+ } else if(glCaps.stencilBits>0) {
glCaps.stencilBits=0;
- } else if(visual==NULL && glCaps.buffer==BUFFER_DOUBLE) {
- glCaps.buffer=BUFFER_SINGLE;
- } else done=1; /* forget it .. */
+ } else if( glCaps.alphaBits>0 ||
+ glCaps.accumAlphaBits>0
+ )
+ {
+ glCaps.alphaBits=0;
+ glCaps.accumAlphaBits=0;
+ } else if( accumTestDone==0 &&
+ ( glCaps.accumRedBits==0 ||
+ glCaps.accumGreenBits==0 ||
+ glCaps.accumBlueBits==0
+ )
+ )
+ {
+ glCaps.accumRedBits=1;
+ glCaps.accumGreenBits=1;
+ glCaps.accumBlueBits=1;
+ } else if( glCaps.accumRedBits>0 ||
+ glCaps.accumGreenBits>0 ||
+ glCaps.accumBlueBits>0
+ )
+ {
+ glCaps.accumRedBits=0;
+ glCaps.accumGreenBits=0;
+ glCaps.accumBlueBits=0;
+ accumTestDone=1;
+ } else if(glCaps.buffer==BUFFER_DOUBLE) {
+ glCaps.buffer=BUFFER_SINGLE;
+ } else done=1; /* forget it .. */
+ }
}
if(visual==NULL)
diff --git a/CNativeCode/OpenGLU_JauJNI12_funcs.c b/CNativeCode/OpenGLU_JauJNI12_funcs.c
index 0b59881..b8a46be 100644
--- a/CNativeCode/OpenGLU_JauJNI12_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI12_funcs.c
@@ -41,7 +41,7 @@ Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluErrorString ( /* jint */ errorCode );
+ tmpString = disp__gluErrorString ( /* jint */ errorCode );
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -54,7 +54,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluGetString ( /* jint */ name);
+ tmpString = disp__gluGetString ( /* jint */ name);
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -62,7 +62,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
}
static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.5.2.0";
+static const char * _glu_lib_version_="2.7.0.0";
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
@@ -112,7 +112,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluQuadricCallback((void *)((PointerHolder)qobj),
+ disp__gluQuadricCallback((void *)((PointerHolder)qobj),
which, cbf_GLU_ERROR );
break;
default:
@@ -136,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluNurbsCallback((void *)((PointerHolder)nobj), which,
+ disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
cbf_GLU_ERROR );
break;
default:
@@ -164,62 +164,62 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_TESS_BEGIN:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN );
break;
case GLU_TESS_BEGIN_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN_DATA );
break;
case GLU_TESS_EDGE_FLAG:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG );
break;
case GLU_TESS_EDGE_FLAG_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG_DATA );
break;
case GLU_TESS_VERTEX:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX );
break;
case GLU_TESS_VERTEX_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX_DATA );
break;
case GLU_TESS_END:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END );
break;
case GLU_TESS_END_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END_DATA );
break;
case GLU_TESS_ERROR:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR );
break;
case GLU_TESS_ERROR_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR_DATA );
break;
case GLU_TESS_COMBINE:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE );
break;
case GLU_TESS_COMBINE_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE_DATA );
break;
@@ -238,7 +238,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
jlong qobj )
{
- gluDeleteQuadric((void *)((PointerHolder)qobj));
+ disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
RemoveCallbackNodes((void *)((PointerHolder)qobj));
}
@@ -246,7 +246,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
jlong nobj )
{
- gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
+ disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
RemoveCallbackNodes((void *)((PointerHolder)nobj));
}
@@ -254,30 +254,30 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
jlong tobj )
{
- gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
+ disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
RemoveCallbackNodes((void *)((PointerHolder)tobj));
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewQuadric());
+ return (jlong)((PointerHolder)disp__gluNewQuadric());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewNurbsRenderer());
+ return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewTess());
+ return (jlong)((PointerHolder)disp__gluNewTess());
}
/**
- * C2J Parser Version 1.5 Beta
+ * C2J Parser Version 2.0
* Jausoft - Sven Goethel Software Development
* Reading from file: glu-proto-auto.orig.h . . .
* Destination-Class: gl4java_GLUFuncJauJNI !
@@ -303,7 +303,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble upz)
{
- gluLookAt (
+ disp__gluLookAt (
(GLdouble) eyex,
(GLdouble) eyey,
(GLdouble) eyez,
@@ -332,7 +332,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble top)
{
- gluOrtho2D (
+ disp__gluOrtho2D (
(GLdouble) left,
(GLdouble) right,
(GLdouble) bottom,
@@ -356,7 +356,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble zFar)
{
- gluPerspective (
+ disp__gluPerspective (
(GLdouble) fovy,
(GLdouble) aspect,
(GLdouble) zNear,
@@ -387,7 +387,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr4 = (jint *) (*env)->GetPrimitiveArrayCritical(env, viewport, &isCopiedArray4);
}
- gluPickMatrix (
+ disp__gluPickMatrix (
(GLdouble) x,
(GLdouble) y,
(GLdouble) width,
@@ -456,7 +456,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, winz, &isCopiedArray8);
}
- ret = (jint) gluProject (
+ ret = (jint) disp__gluProject (
(GLdouble) objx,
(GLdouble) objy,
(GLdouble) objz,
@@ -550,7 +550,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, objz, &isCopiedArray8);
}
- ret = (jint) gluUnProject (
+ ret = (jint) disp__gluUnProject (
(GLdouble) winx,
(GLdouble) winy,
(GLdouble) winz,
@@ -622,7 +622,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, dataout, &isCopiedArray8);
}
- ret = (jint) gluScaleImage (
+ ret = (jint) disp__gluScaleImage (
(GLenum) format,
(GLsizei) widthin,
(GLsizei) heightin,
@@ -669,7 +669,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -702,7 +702,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -735,7 +735,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -768,7 +768,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -801,7 +801,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -834,7 +834,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -867,7 +867,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -908,7 +908,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -943,7 +943,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -978,7 +978,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jint *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1013,7 +1013,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1048,7 +1048,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1083,7 +1083,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1118,7 +1118,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1148,7 +1148,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint drawStyle)
{
- gluQuadricDrawStyle (
+ disp__gluQuadricDrawStyle (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) drawStyle
);
@@ -1168,7 +1168,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint orientation)
{
- gluQuadricOrientation (
+ disp__gluQuadricOrientation (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) orientation
);
@@ -1188,7 +1188,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint normals)
{
- gluQuadricNormals (
+ disp__gluQuadricNormals (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) normals
);
@@ -1208,7 +1208,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jboolean textureCoords)
{
- gluQuadricTexture (
+ disp__gluQuadricTexture (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLboolean) textureCoords
);
@@ -1232,7 +1232,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint stacks)
{
- gluCylinder (
+ disp__gluCylinder (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) baseRadius,
(GLdouble) topRadius,
@@ -1258,7 +1258,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint stacks)
{
- gluSphere (
+ disp__gluSphere (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) radius,
(GLint) slices,
@@ -1283,7 +1283,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint loops)
{
- gluDisk (
+ disp__gluDisk (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) innerRadius,
(GLdouble) outerRadius,
@@ -1311,7 +1311,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble sweepAngle)
{
- gluPartialDisk (
+ disp__gluPartialDisk (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) innerRadius,
(GLdouble) outerRadius,
@@ -1353,7 +1353,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr3 = (jint *) (*env)->GetPrimitiveArrayCritical(env, viewport, 0);
}
- gluLoadSamplingMatrices (
+ disp__gluLoadSamplingMatrices (
(GLUnurbsObj *) (PointerHolder) nobj,
(const GLfloat *) ptr1,
(const GLfloat *) ptr2,
@@ -1388,7 +1388,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jfloat value)
{
- gluNurbsProperty (
+ disp__gluNurbsProperty (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLenum) property,
(GLfloat) value
@@ -1416,7 +1416,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2);
}
- gluGetNurbsProperty (
+ disp__gluGetNurbsProperty (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLenum) property,
(GLfloat *) ptr2
@@ -1440,7 +1440,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginCurve (
+ disp__gluBeginCurve (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1458,7 +1458,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndCurve (
+ disp__gluEndCurve (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1494,7 +1494,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr4 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray4);
}
- gluNurbsCurve (
+ disp__gluNurbsCurve (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) nknots,
(GLfloat *) ptr2,
@@ -1526,7 +1526,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginSurface (
+ disp__gluBeginSurface (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1544,7 +1544,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndSurface (
+ disp__gluEndSurface (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1590,7 +1590,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr7 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, ctlarray, &isCopiedArray7);
}
- gluNurbsSurface (
+ disp__gluNurbsSurface (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) sknot_count,
(GLfloat *) ptr2,
@@ -1630,7 +1630,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginTrim (
+ disp__gluBeginTrim (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1648,7 +1648,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndTrim (
+ disp__gluEndTrim (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1676,7 +1676,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, array, &isCopiedArray2);
}
- gluPwlCurve (
+ disp__gluPwlCurve (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) count,
(GLfloat *) ptr2,
@@ -1709,7 +1709,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1732,7 +1732,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1755,7 +1755,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jint *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1778,7 +1778,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1801,7 +1801,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1824,7 +1824,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1847,7 +1847,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1870,7 +1870,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessBeginContour (
+ disp__gluTessBeginContour (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -1902,7 +1902,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jbyte *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -1937,7 +1937,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jshort *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -1972,7 +1972,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jint *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2007,7 +2007,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jfloat *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2042,7 +2042,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2077,7 +2077,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jboolean *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2112,7 +2112,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jlong *) (*env)->GetPrimitiveArrayCritical(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2140,7 +2140,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessEndContour (
+ disp__gluTessEndContour (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2158,7 +2158,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessEndPolygon (
+ disp__gluTessEndPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2178,7 +2178,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble value)
{
- gluTessProperty (
+ disp__gluTessProperty (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) which,
(GLdouble) value
@@ -2201,7 +2201,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble z)
{
- gluTessNormal (
+ disp__gluTessNormal (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble) x,
(GLdouble) y,
@@ -2230,7 +2230,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (jdouble *) (*env)->GetPrimitiveArrayCritical(env, value, &isCopiedArray2);
}
- gluGetTessProperty (
+ disp__gluGetTessProperty (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) which,
(GLdouble *) ptr2
@@ -2254,7 +2254,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluBeginPolygon (
+ disp__gluBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2273,7 +2273,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint type)
{
- gluNextContour (
+ disp__gluNextContour (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) type
);
@@ -2292,10 +2292,10 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluEndPolygon (
+ disp__gluEndPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
}
-/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */
+/* C2J Parser Version 2.0: Java program parsed successfully. */
diff --git a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
index 4c6fa7e..bc8b960 100644
--- a/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI12tst_funcs.c
@@ -41,7 +41,7 @@ Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluErrorString ( /* jint */ errorCode );
+ tmpString = disp__gluErrorString ( /* jint */ errorCode );
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -54,7 +54,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluGetString ( /* jint */ name);
+ tmpString = disp__gluGetString ( /* jint */ name);
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -62,7 +62,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
}
static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.5.2.0";
+static const char * _glu_lib_version_="2.7.0.0";
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
@@ -112,7 +112,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluQuadricCallback((void *)((PointerHolder)qobj),
+ disp__gluQuadricCallback((void *)((PointerHolder)qobj),
which, cbf_GLU_ERROR );
break;
default:
@@ -136,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluNurbsCallback((void *)((PointerHolder)nobj), which,
+ disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
cbf_GLU_ERROR );
break;
default:
@@ -164,62 +164,62 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_TESS_BEGIN:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN );
break;
case GLU_TESS_BEGIN_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN_DATA );
break;
case GLU_TESS_EDGE_FLAG:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG );
break;
case GLU_TESS_EDGE_FLAG_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG_DATA );
break;
case GLU_TESS_VERTEX:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX );
break;
case GLU_TESS_VERTEX_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX_DATA );
break;
case GLU_TESS_END:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END );
break;
case GLU_TESS_END_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END_DATA );
break;
case GLU_TESS_ERROR:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR );
break;
case GLU_TESS_ERROR_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR_DATA );
break;
case GLU_TESS_COMBINE:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE );
break;
case GLU_TESS_COMBINE_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE_DATA );
break;
@@ -238,7 +238,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
jlong qobj )
{
- gluDeleteQuadric((void *)((PointerHolder)qobj));
+ disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
RemoveCallbackNodes((void *)((PointerHolder)qobj));
}
@@ -246,7 +246,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
jlong nobj )
{
- gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
+ disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
RemoveCallbackNodes((void *)((PointerHolder)nobj));
}
@@ -254,2377 +254,25 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
jlong tobj )
{
- gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
+ disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
RemoveCallbackNodes((void *)((PointerHolder)tobj));
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewQuadric());
+ return (jlong)((PointerHolder)disp__gluNewQuadric());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewNurbsRenderer());
+ return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewTess());
+ return (jlong)((PointerHolder)disp__gluNewTess());
}
-/**
- * C2J Parser Version 1.5 Beta
- * Jausoft - Sven Goethel Software Development
- * Reading from file: glu-proto-auto.orig.h . . .
- * Destination-Class: gl4java_GLUFuncJauJNI !
- */
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluLookAt ( GLdouble eyex , GLdouble eyey , GLdouble eyez , GLdouble centerx , GLdouble centery , GLdouble centerz , GLdouble upx , GLdouble upy , GLdouble upz ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluLookAt (
- JNIEnv *env, jobject obj,
- jdouble eyex,
- jdouble eyey,
- jdouble eyez,
- jdouble centerx,
- jdouble centery,
- jdouble centerz,
- jdouble upx,
- jdouble upy,
- jdouble upz)
- {
-
- gluLookAt (
- (GLdouble) eyex,
- (GLdouble) eyey,
- (GLdouble) eyez,
- (GLdouble) centerx,
- (GLdouble) centery,
- (GLdouble) centerz,
- (GLdouble) upx,
- (GLdouble) upy,
- (GLdouble) upz
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluOrtho2D ( GLdouble left , GLdouble right , GLdouble bottom , GLdouble top ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluOrtho2D (
- JNIEnv *env, jobject obj,
- jdouble left,
- jdouble right,
- jdouble bottom,
- jdouble top)
- {
-
- gluOrtho2D (
- (GLdouble) left,
- (GLdouble) right,
- (GLdouble) bottom,
- (GLdouble) top
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluPerspective ( GLdouble fovy , GLdouble aspect , GLdouble zNear , GLdouble zFar ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluPerspective (
- JNIEnv *env, jobject obj,
- jdouble fovy,
- jdouble aspect,
- jdouble zNear,
- jdouble zFar)
- {
-
- gluPerspective (
- (GLdouble) fovy,
- (GLdouble) aspect,
- (GLdouble) zNear,
- (GLdouble) zFar
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluPickMatrix ( GLdouble x , GLdouble y , GLdouble width , GLdouble height , GLint * viewport ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluPickMatrix (
- JNIEnv *env, jobject obj,
- jdouble x,
- jdouble y,
- jdouble width,
- jdouble height,
- jintArray viewport)
- {
- jboolean isCopiedArray4 = JNI_FALSE;
- jint *ptr4 = NULL;
- static int isWarned4 = 0;
-
- if(viewport!=NULL)
- {
- ptr4 = (*env)->GetIntArrayElements(env, viewport, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluPickMatrix arg: viewport");
- }
- }
- gluPickMatrix (
- (GLdouble) x,
- (GLdouble) y,
- (GLdouble) width,
- (GLdouble) height,
- (GLint *) ptr4
- );
-
- if(viewport!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, viewport, ptr4, (isCopiedArray4 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern GLint gluProject ( GLdouble objx , GLdouble objy , GLdouble objz , const GLdouble modelMatrix [ 16 ] , const GLdouble projMatrix [ 16 ] , const GLint viewport [ 4 ] , GLdouble * winx , GLdouble * winy , GLdouble * winz ) ;
- * </pre>
- */
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluProject (
- JNIEnv *env, jobject obj,
- jdouble objx,
- jdouble objy,
- jdouble objz,
- jdoubleArray modelMatrix,
- jdoubleArray projMatrix,
- jintArray viewport,
- jdoubleArray winx,
- jdoubleArray winy,
- jdoubleArray winz)
- {
- jint ret;
-
- jboolean isCopiedArray3 = JNI_FALSE;
- jdouble *ptr3 = NULL;
- static int isWarned3 = 0;
- jboolean isCopiedArray4 = JNI_FALSE;
- jdouble *ptr4 = NULL;
- static int isWarned4 = 0;
- jboolean isCopiedArray5 = JNI_FALSE;
- jint *ptr5 = NULL;
- static int isWarned5 = 0;
- jboolean isCopiedArray6 = JNI_FALSE;
- jdouble *ptr6 = NULL;
- static int isWarned6 = 0;
- jboolean isCopiedArray7 = JNI_FALSE;
- jdouble *ptr7 = NULL;
- static int isWarned7 = 0;
- jboolean isCopiedArray8 = JNI_FALSE;
- jdouble *ptr8 = NULL;
- static int isWarned8 = 0;
-
- if(modelMatrix!=NULL)
- {
- ptr3 = (*env)->GetDoubleArrayElements(env, modelMatrix, &isCopiedArray3);
- if( isCopiedArray3 == JNI_TRUE && isWarned3==0 ) {
- isWarned3=1;
- printf("COPY by gluProject arg: modelMatrix");
- }
- }
- if(projMatrix!=NULL)
- {
- ptr4 = (*env)->GetDoubleArrayElements(env, projMatrix, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluProject arg: projMatrix");
- }
- }
- if(viewport!=NULL)
- {
- ptr5 = (*env)->GetIntArrayElements(env, viewport, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluProject arg: viewport");
- }
- }
- if(winx!=NULL)
- {
- ptr6 = (*env)->GetDoubleArrayElements(env, winx, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluProject arg: winx");
- }
- }
- if(winy!=NULL)
- {
- ptr7 = (*env)->GetDoubleArrayElements(env, winy, &isCopiedArray7);
- if( isCopiedArray7 == JNI_TRUE && isWarned7==0 ) {
- isWarned7=1;
- printf("COPY by gluProject arg: winy");
- }
- }
- if(winz!=NULL)
- {
- ptr8 = (*env)->GetDoubleArrayElements(env, winz, &isCopiedArray8);
- if( isCopiedArray8 == JNI_TRUE && isWarned8==0 ) {
- isWarned8=1;
- printf("COPY by gluProject arg: winz");
- }
- }
- ret = (jint) gluProject (
- (GLdouble) objx,
- (GLdouble) objy,
- (GLdouble) objz,
- (const GLdouble *) ptr3,
- (const GLdouble *) ptr4,
- (const GLint *) ptr5,
- (GLdouble *) ptr6,
- (GLdouble *) ptr7,
- (GLdouble *) ptr8
- );
-
- if(modelMatrix!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, modelMatrix, ptr3, JNI_ABORT);
- }
- if(projMatrix!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, projMatrix, ptr4, JNI_ABORT);
- }
- if(viewport!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, viewport, ptr5, JNI_ABORT);
- }
- if(winx!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, winx, ptr6, (isCopiedArray6 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(winy!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, winy, ptr7, (isCopiedArray7 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(winz!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, winz, ptr8, (isCopiedArray8 == JNI_TRUE)?0:JNI_ABORT);
- }
- return ret;
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern GLint gluUnProject ( GLdouble winx , GLdouble winy , GLdouble winz , const GLdouble modelMatrix [ 16 ] , const GLdouble projMatrix [ 16 ] , const GLint viewport [ 4 ] , GLdouble * objx , GLdouble * objy , GLdouble * objz ) ;
- * </pre>
- */
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluUnProject (
- JNIEnv *env, jobject obj,
- jdouble winx,
- jdouble winy,
- jdouble winz,
- jdoubleArray modelMatrix,
- jdoubleArray projMatrix,
- jintArray viewport,
- jdoubleArray objx,
- jdoubleArray objy,
- jdoubleArray objz)
- {
- jint ret;
-
- jboolean isCopiedArray3 = JNI_FALSE;
- jdouble *ptr3 = NULL;
- static int isWarned3 = 0;
- jboolean isCopiedArray4 = JNI_FALSE;
- jdouble *ptr4 = NULL;
- static int isWarned4 = 0;
- jboolean isCopiedArray5 = JNI_FALSE;
- jint *ptr5 = NULL;
- static int isWarned5 = 0;
- jboolean isCopiedArray6 = JNI_FALSE;
- jdouble *ptr6 = NULL;
- static int isWarned6 = 0;
- jboolean isCopiedArray7 = JNI_FALSE;
- jdouble *ptr7 = NULL;
- static int isWarned7 = 0;
- jboolean isCopiedArray8 = JNI_FALSE;
- jdouble *ptr8 = NULL;
- static int isWarned8 = 0;
-
- if(modelMatrix!=NULL)
- {
- ptr3 = (*env)->GetDoubleArrayElements(env, modelMatrix, &isCopiedArray3);
- if( isCopiedArray3 == JNI_TRUE && isWarned3==0 ) {
- isWarned3=1;
- printf("COPY by gluUnProject arg: modelMatrix");
- }
- }
- if(projMatrix!=NULL)
- {
- ptr4 = (*env)->GetDoubleArrayElements(env, projMatrix, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluUnProject arg: projMatrix");
- }
- }
- if(viewport!=NULL)
- {
- ptr5 = (*env)->GetIntArrayElements(env, viewport, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluUnProject arg: viewport");
- }
- }
- if(objx!=NULL)
- {
- ptr6 = (*env)->GetDoubleArrayElements(env, objx, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluUnProject arg: objx");
- }
- }
- if(objy!=NULL)
- {
- ptr7 = (*env)->GetDoubleArrayElements(env, objy, &isCopiedArray7);
- if( isCopiedArray7 == JNI_TRUE && isWarned7==0 ) {
- isWarned7=1;
- printf("COPY by gluUnProject arg: objy");
- }
- }
- if(objz!=NULL)
- {
- ptr8 = (*env)->GetDoubleArrayElements(env, objz, &isCopiedArray8);
- if( isCopiedArray8 == JNI_TRUE && isWarned8==0 ) {
- isWarned8=1;
- printf("COPY by gluUnProject arg: objz");
- }
- }
- ret = (jint) gluUnProject (
- (GLdouble) winx,
- (GLdouble) winy,
- (GLdouble) winz,
- (const GLdouble *) ptr3,
- (const GLdouble *) ptr4,
- (const GLint *) ptr5,
- (GLdouble *) ptr6,
- (GLdouble *) ptr7,
- (GLdouble *) ptr8
- );
-
- if(modelMatrix!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, modelMatrix, ptr3, JNI_ABORT);
- }
- if(projMatrix!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, projMatrix, ptr4, JNI_ABORT);
- }
- if(viewport!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, viewport, ptr5, JNI_ABORT);
- }
- if(objx!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, objx, ptr6, (isCopiedArray6 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(objy!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, objy, ptr7, (isCopiedArray7 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(objz!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, objz, ptr8, (isCopiedArray8 == JNI_TRUE)?0:JNI_ABORT);
- }
- return ret;
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern GLint gluScaleImage ( GLenum format , GLsizei widthin , GLsizei heightin , GLenum typein , const char * datain , GLsizei widthout , GLsizei heightout , GLenum typeout , char * dataout ) ;
- * </pre>
- */
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluScaleImage (
- JNIEnv *env, jobject obj,
- jint format,
- jint widthin,
- jint heightin,
- jint typein,
- jbyteArray datain,
- jint widthout,
- jint heightout,
- jint typeout,
- jbyteArray dataout)
- {
- jint ret;
-
- jboolean isCopiedArray4 = JNI_FALSE;
- jbyte *ptr4 = NULL;
- static int isWarned4 = 0;
- jboolean isCopiedArray8 = JNI_FALSE;
- jbyte *ptr8 = NULL;
- static int isWarned8 = 0;
-
- if(datain!=NULL)
- {
- ptr4 = (*env)->GetByteArrayElements(env, datain, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluScaleImage arg: datain");
- }
- }
- if(dataout!=NULL)
- {
- ptr8 = (*env)->GetByteArrayElements(env, dataout, &isCopiedArray8);
- if( isCopiedArray8 == JNI_TRUE && isWarned8==0 ) {
- isWarned8=1;
- printf("COPY by gluScaleImage arg: dataout");
- }
- }
- ret = (jint) gluScaleImage (
- (GLenum) format,
- (GLsizei) widthin,
- (GLsizei) heightin,
- (GLenum) typein,
- (const char *) ptr4,
- (GLsizei) widthout,
- (GLsizei) heightout,
- (GLenum) typeout,
- (char *) ptr8
- );
-
- if(datain!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, datain, ptr4, JNI_ABORT);
- }
- if(dataout!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, dataout, ptr8, (isCopiedArray8 == JNI_TRUE)?0:JNI_ABORT);
- }
- return ret;
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern GLint gluBuild1DMipmaps ( GLenum target , GLint components , GLint width , GLenum format , GLenum type , const void * data ) ;
- * </pre>
- */
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3B (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jbyteArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jbyte *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetByteArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3S (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jshortArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jshort *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetShortArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseShortArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3I (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jintArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jint *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetIntArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3F (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jfloatArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jfloat *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetFloatArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3D (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jdoubleArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jdouble *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetDoubleArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3Z (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jbooleanArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jboolean *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetBooleanArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseBooleanArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild1DMipmaps__IIIII_3J (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint format,
- jint type,
- jlongArray data)
- {
- jint ret;
-
- jboolean isCopiedArray5 = JNI_FALSE;
- jlong *ptr5 = NULL;
- static int isWarned5 = 0;
-
- if(data!=NULL)
- {
- ptr5 = (*env)->GetLongArrayElements(env, data, &isCopiedArray5);
- if( isCopiedArray5 == JNI_TRUE && isWarned5==0 ) {
- isWarned5=1;
- printf("COPY by gluBuild1DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild1DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr5
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseLongArrayElements(env, data, ptr5, JNI_ABORT);
- }
- return ret;
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern GLint gluBuild2DMipmaps ( GLenum target , GLint components , GLint width , GLint height , GLenum format , GLenum type , const void * data ) ;
- * </pre>
- */
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3B (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jbyteArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jbyte *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetByteArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3S (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jshortArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jshort *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetShortArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseShortArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3I (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jintArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jint *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetIntArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3F (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jfloatArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jfloat *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetFloatArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3D (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jdoubleArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jdouble *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetDoubleArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3Z (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jbooleanArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jboolean *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetBooleanArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseBooleanArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
- JNIEXPORT jint JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBuild2DMipmaps__IIIIII_3J (
- JNIEnv *env, jobject obj,
- jint target,
- jint components,
- jint width,
- jint height,
- jint format,
- jint type,
- jlongArray data)
- {
- jint ret;
-
- jboolean isCopiedArray6 = JNI_FALSE;
- jlong *ptr6 = NULL;
- static int isWarned6 = 0;
-
- if(data!=NULL)
- {
- ptr6 = (*env)->GetLongArrayElements(env, data, &isCopiedArray6);
- if( isCopiedArray6 == JNI_TRUE && isWarned6==0 ) {
- isWarned6=1;
- printf("COPY by gluBuild2DMipmaps arg: data");
- }
- }
- ret = (jint) gluBuild2DMipmaps (
- (GLenum) target,
- (GLint) components,
- (GLint) width,
- (GLint) height,
- (GLenum) format,
- (GLenum) type,
- (const void *) ptr6
- );
-
- if(data!=NULL)
- {
- (*env)->ReleaseLongArrayElements(env, data, ptr6, JNI_ABORT);
- }
- return ret;
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluQuadricDrawStyle ( GLUquadricObj * quadObject , GLenum drawStyle ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluQuadricDrawStyle (
- JNIEnv *env, jobject obj,
- jlong quadObject,
- jint drawStyle)
- {
-
- gluQuadricDrawStyle (
- (GLUquadricObj *) (PointerHolder) quadObject,
- (GLenum) drawStyle
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluQuadricOrientation ( GLUquadricObj * quadObject , GLenum orientation ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluQuadricOrientation (
- JNIEnv *env, jobject obj,
- jlong quadObject,
- jint orientation)
- {
-
- gluQuadricOrientation (
- (GLUquadricObj *) (PointerHolder) quadObject,
- (GLenum) orientation
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluQuadricNormals ( GLUquadricObj * quadObject , GLenum normals ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluQuadricNormals (
- JNIEnv *env, jobject obj,
- jlong quadObject,
- jint normals)
- {
-
- gluQuadricNormals (
- (GLUquadricObj *) (PointerHolder) quadObject,
- (GLenum) normals
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluQuadricTexture ( GLUquadricObj * quadObject , GLboolean textureCoords ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluQuadricTexture (
- JNIEnv *env, jobject obj,
- jlong quadObject,
- jboolean textureCoords)
- {
-
- gluQuadricTexture (
- (GLUquadricObj *) (PointerHolder) quadObject,
- (GLboolean) textureCoords
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluCylinder ( GLUquadricObj * qobj , GLdouble baseRadius , GLdouble topRadius , GLdouble height , GLint slices , GLint stacks ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluCylinder (
- JNIEnv *env, jobject obj,
- jlong qobj,
- jdouble baseRadius,
- jdouble topRadius,
- jdouble height,
- jint slices,
- jint stacks)
- {
-
- gluCylinder (
- (GLUquadricObj *) (PointerHolder) qobj,
- (GLdouble) baseRadius,
- (GLdouble) topRadius,
- (GLdouble) height,
- (GLint) slices,
- (GLint) stacks
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluSphere ( GLUquadricObj * qobj , GLdouble radius , GLint slices , GLint stacks ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluSphere (
- JNIEnv *env, jobject obj,
- jlong qobj,
- jdouble radius,
- jint slices,
- jint stacks)
- {
-
- gluSphere (
- (GLUquadricObj *) (PointerHolder) qobj,
- (GLdouble) radius,
- (GLint) slices,
- (GLint) stacks
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluDisk ( GLUquadricObj * qobj , GLdouble innerRadius , GLdouble outerRadius , GLint slices , GLint loops ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluDisk (
- JNIEnv *env, jobject obj,
- jlong qobj,
- jdouble innerRadius,
- jdouble outerRadius,
- jint slices,
- jint loops)
- {
-
- gluDisk (
- (GLUquadricObj *) (PointerHolder) qobj,
- (GLdouble) innerRadius,
- (GLdouble) outerRadius,
- (GLint) slices,
- (GLint) loops
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluPartialDisk ( GLUquadricObj * qobj , GLdouble innerRadius , GLdouble outerRadius , GLint slices , GLint loops , GLdouble startAngle , GLdouble sweepAngle ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluPartialDisk (
- JNIEnv *env, jobject obj,
- jlong qobj,
- jdouble innerRadius,
- jdouble outerRadius,
- jint slices,
- jint loops,
- jdouble startAngle,
- jdouble sweepAngle)
- {
-
- gluPartialDisk (
- (GLUquadricObj *) (PointerHolder) qobj,
- (GLdouble) innerRadius,
- (GLdouble) outerRadius,
- (GLint) slices,
- (GLint) loops,
- (GLdouble) startAngle,
- (GLdouble) sweepAngle
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluLoadSamplingMatrices ( GLUnurbsObj * nobj , const GLfloat modelMatrix [ 16 ] , const GLfloat projMatrix [ 16 ] , const GLint viewport [ 4 ] ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluLoadSamplingMatrices (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jfloatArray modelMatrix,
- jfloatArray projMatrix,
- jintArray viewport)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jfloat *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
- jboolean isCopiedArray3 = JNI_FALSE;
- jint *ptr3 = NULL;
- static int isWarned3 = 0;
-
- if(modelMatrix!=NULL)
- {
- ptr1 = (*env)->GetFloatArrayElements(env, modelMatrix, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluLoadSamplingMatrices arg: modelMatrix");
- }
- }
- if(projMatrix!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, projMatrix, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluLoadSamplingMatrices arg: projMatrix");
- }
- }
- if(viewport!=NULL)
- {
- ptr3 = (*env)->GetIntArrayElements(env, viewport, &isCopiedArray3);
- if( isCopiedArray3 == JNI_TRUE && isWarned3==0 ) {
- isWarned3=1;
- printf("COPY by gluLoadSamplingMatrices arg: viewport");
- }
- }
- gluLoadSamplingMatrices (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (const GLfloat *) ptr1,
- (const GLfloat *) ptr2,
- (const GLint *) ptr3
- );
-
- if(modelMatrix!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, modelMatrix, ptr1, JNI_ABORT);
- }
- if(projMatrix!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, projMatrix, ptr2, JNI_ABORT);
- }
- if(viewport!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, viewport, ptr3, JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluNurbsProperty ( GLUnurbsObj * nobj , GLenum property , GLfloat value ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluNurbsProperty (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jint property,
- jfloat value)
- {
-
- gluNurbsProperty (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (GLenum) property,
- (GLfloat) value
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluGetNurbsProperty ( GLUnurbsObj * nobj , GLenum property , GLfloat * value ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluGetNurbsProperty (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jint property,
- jfloatArray value)
- {
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(value!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, value, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluGetNurbsProperty arg: value");
- }
- }
- gluGetNurbsProperty (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (GLenum) property,
- (GLfloat *) ptr2
- );
-
- if(value!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, value, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluBeginCurve ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBeginCurve (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluBeginCurve (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluEndCurve ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluEndCurve (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluEndCurve (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluNurbsCurve ( GLUnurbsObj * nobj , GLint nknots , GLfloat * knot , GLint stride , GLfloat * ctlarray , GLint order , GLenum type ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluNurbsCurve (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jint nknots,
- jfloatArray knot,
- jint stride,
- jfloatArray ctlarray,
- jint order,
- jint type)
- {
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
- jboolean isCopiedArray4 = JNI_FALSE;
- jfloat *ptr4 = NULL;
- static int isWarned4 = 0;
-
- if(knot!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, knot, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluNurbsCurve arg: knot");
- }
- }
- if(ctlarray!=NULL)
- {
- ptr4 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluNurbsCurve arg: ctlarray");
- }
- }
- gluNurbsCurve (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (GLint) nknots,
- (GLfloat *) ptr2,
- (GLint) stride,
- (GLfloat *) ptr4,
- (GLint) order,
- (GLenum) type
- );
-
- if(knot!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, knot, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(ctlarray!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, ctlarray, ptr4, (isCopiedArray4 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluBeginSurface ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBeginSurface (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluBeginSurface (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluEndSurface ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluEndSurface (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluEndSurface (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluNurbsSurface ( GLUnurbsObj * nobj , GLint sknot_count , GLfloat * sknot , GLint tknot_count , GLfloat * tknot , GLint s_stride , GLint t_stride , GLfloat * ctlarray , GLint sorder , GLint torder , GLenum type ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluNurbsSurface (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jint sknot_count,
- jfloatArray sknot,
- jint tknot_count,
- jfloatArray tknot,
- jint s_stride,
- jint t_stride,
- jfloatArray ctlarray,
- jint sorder,
- jint torder,
- jint type)
- {
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
- jboolean isCopiedArray4 = JNI_FALSE;
- jfloat *ptr4 = NULL;
- static int isWarned4 = 0;
- jboolean isCopiedArray7 = JNI_FALSE;
- jfloat *ptr7 = NULL;
- static int isWarned7 = 0;
-
- if(sknot!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, sknot, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluNurbsSurface arg: sknot");
- }
- }
- if(tknot!=NULL)
- {
- ptr4 = (*env)->GetFloatArrayElements(env, tknot, &isCopiedArray4);
- if( isCopiedArray4 == JNI_TRUE && isWarned4==0 ) {
- isWarned4=1;
- printf("COPY by gluNurbsSurface arg: tknot");
- }
- }
- if(ctlarray!=NULL)
- {
- ptr7 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray7);
- if( isCopiedArray7 == JNI_TRUE && isWarned7==0 ) {
- isWarned7=1;
- printf("COPY by gluNurbsSurface arg: ctlarray");
- }
- }
- gluNurbsSurface (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (GLint) sknot_count,
- (GLfloat *) ptr2,
- (GLint) tknot_count,
- (GLfloat *) ptr4,
- (GLint) s_stride,
- (GLint) t_stride,
- (GLfloat *) ptr7,
- (GLint) sorder,
- (GLint) torder,
- (GLenum) type
- );
-
- if(sknot!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, sknot, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(tknot!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, tknot, ptr4, (isCopiedArray4 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(ctlarray!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, ctlarray, ptr7, (isCopiedArray7 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluBeginTrim ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBeginTrim (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluBeginTrim (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluEndTrim ( GLUnurbsObj * nobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluEndTrim (
- JNIEnv *env, jobject obj,
- jlong nobj)
- {
-
- gluEndTrim (
- (GLUnurbsObj *) (PointerHolder) nobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluPwlCurve ( GLUnurbsObj * nobj , GLint count , GLfloat * array , GLint stride , GLenum type ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluPwlCurve (
- JNIEnv *env, jobject obj,
- jlong nobj,
- jint count,
- jfloatArray array,
- jint stride,
- jint type)
- {
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(array!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, array, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluPwlCurve arg: array");
- }
- }
- gluPwlCurve (
- (GLUnurbsObj *) (PointerHolder) nobj,
- (GLint) count,
- (GLfloat *) ptr2,
- (GLint) stride,
- (GLenum) type
- );
-
- if(array!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, array, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginPolygon ( GLUtesselator * tobj , void * polygon_data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3B (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jbyteArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jbyte *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetByteArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3S (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jshortArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jshort *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetShortArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseShortArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3I (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jintArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jint *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetIntArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3F (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jfloatArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jfloat *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetFloatArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3D (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3Z (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jbooleanArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jboolean *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetBooleanArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseBooleanArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginPolygon__J_3J (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jlongArray polygon_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jlong *ptr1 = NULL;
- static int isWarned1 = 0;
-
- if(polygon_data!=NULL)
- {
- ptr1 = (*env)->GetLongArrayElements(env, polygon_data, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessBeginPolygon arg: polygon_data");
- }
- }
- gluTessBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj,
- (void *) ptr1
- );
-
- if(polygon_data!=NULL)
- {
- (*env)->ReleaseLongArrayElements(env, polygon_data, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessBeginContour ( GLUtesselator * tobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessBeginContour (
- JNIEnv *env, jobject obj,
- jlong tobj)
- {
-
- gluTessBeginContour (
- (GLUtesselator *) (PointerHolder) tobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessVertex ( GLUtesselator * tobj , GLdouble coords [ 3 ] , void * vertex_data ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3B (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jbyteArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jbyte *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetByteArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseByteArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3S (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jshortArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jshort *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetShortArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseShortArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3I (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jintArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jint *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetIntArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseIntArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3F (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jfloatArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jfloat *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetFloatArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseFloatArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3D (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jdoubleArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jdouble *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetDoubleArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3Z (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jbooleanArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jboolean *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetBooleanArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseBooleanArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessVertex__J_3D_3J (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdoubleArray coords,
- jlongArray vertex_data)
- {
- jboolean isCopiedArray1 = JNI_FALSE;
- jdouble *ptr1 = NULL;
- static int isWarned1 = 0;
- jboolean isCopiedArray2 = JNI_FALSE;
- jlong *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(coords!=NULL)
- {
- ptr1 = (*env)->GetDoubleArrayElements(env, coords, &isCopiedArray1);
- if( isCopiedArray1 == JNI_TRUE && isWarned1==0 ) {
- isWarned1=1;
- printf("COPY by gluTessVertex arg: coords");
- }
- }
- if(vertex_data!=NULL)
- {
- ptr2 = (*env)->GetLongArrayElements(env, vertex_data, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluTessVertex arg: vertex_data");
- }
- }
- gluTessVertex (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble *) ptr1,
- (void *) ptr2
- );
-
- if(coords!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, coords, ptr1, (isCopiedArray1 == JNI_TRUE)?0:JNI_ABORT);
- }
- if(vertex_data!=NULL)
- {
- (*env)->ReleaseLongArrayElements(env, vertex_data, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndContour ( GLUtesselator * tobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessEndContour (
- JNIEnv *env, jobject obj,
- jlong tobj)
- {
-
- gluTessEndContour (
- (GLUtesselator *) (PointerHolder) tobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessEndPolygon ( GLUtesselator * tobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessEndPolygon (
- JNIEnv *env, jobject obj,
- jlong tobj)
- {
-
- gluTessEndPolygon (
- (GLUtesselator *) (PointerHolder) tobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessProperty ( GLUtesselator * tobj , GLenum which , GLdouble value ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessProperty (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jint which,
- jdouble value)
- {
-
- gluTessProperty (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLenum) which,
- (GLdouble) value
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluTessNormal ( GLUtesselator * tobj , GLdouble x , GLdouble y , GLdouble z ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluTessNormal (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jdouble x,
- jdouble y,
- jdouble z)
- {
-
- gluTessNormal (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLdouble) x,
- (GLdouble) y,
- (GLdouble) z
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluGetTessProperty ( GLUtesselator * tobj , GLenum which , GLdouble * value ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluGetTessProperty (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jint which,
- jdoubleArray value)
- {
- jboolean isCopiedArray2 = JNI_FALSE;
- jdouble *ptr2 = NULL;
- static int isWarned2 = 0;
-
- if(value!=NULL)
- {
- ptr2 = (*env)->GetDoubleArrayElements(env, value, &isCopiedArray2);
- if( isCopiedArray2 == JNI_TRUE && isWarned2==0 ) {
- isWarned2=1;
- printf("COPY by gluGetTessProperty arg: value");
- }
- }
- gluGetTessProperty (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLenum) which,
- (GLdouble *) ptr2
- );
-
- if(value!=NULL)
- {
- (*env)->ReleaseDoubleArrayElements(env, value, ptr2, (isCopiedArray2 == JNI_TRUE)?0:JNI_ABORT);
- }
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluBeginPolygon ( GLUtesselator * tobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluBeginPolygon (
- JNIEnv *env, jobject obj,
- jlong tobj)
- {
-
- gluBeginPolygon (
- (GLUtesselator *) (PointerHolder) tobj
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluNextContour ( GLUtesselator * tobj , GLenum type ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluNextContour (
- JNIEnv *env, jobject obj,
- jlong tobj,
- jint type)
- {
-
- gluNextContour (
- (GLUtesselator *) (PointerHolder) tobj,
- (GLenum) type
- );
-
- }
-
-/**
- * Original Function-Prototype :
- * <pre>
- extern void gluEndPolygon ( GLUtesselator * tobj ) ;
- * </pre>
- */
- JNIEXPORT void JNICALL
- Java_gl4java_GLUFuncJauJNI_gluEndPolygon (
- JNIEnv *env, jobject obj,
- jlong tobj)
- {
-
- gluEndPolygon (
- (GLUtesselator *) (PointerHolder) tobj
- );
-
- }
-
-/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */
diff --git a/CNativeCode/OpenGLU_JauJNI_funcs.c b/CNativeCode/OpenGLU_JauJNI_funcs.c
index 8b2f135..56928ab 100644
--- a/CNativeCode/OpenGLU_JauJNI_funcs.c
+++ b/CNativeCode/OpenGLU_JauJNI_funcs.c
@@ -41,7 +41,7 @@ Java_gl4java_GLUFuncJauJNI_gluErrorString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluErrorString ( /* jint */ errorCode );
+ tmpString = disp__gluErrorString ( /* jint */ errorCode );
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -54,7 +54,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
{
const char *tmpString=0;
- tmpString = gluGetString ( /* jint */ name);
+ tmpString = disp__gluGetString ( /* jint */ name);
if(tmpString==NULL)
tmpString=_glu_n_a_string;
@@ -62,7 +62,7 @@ Java_gl4java_GLUFuncJauJNI_gluGetString ( JNIEnv *env, jobject obj,
}
static const char * _glu_lib_vendor_="Jausoft - Sven Goethel Software Development";
-static const char * _glu_lib_version_="2.5.2.0";
+static const char * _glu_lib_version_="2.7.0.0";
JNIEXPORT jstring JNICALL
Java_gl4java_GLUFuncJauJNI_getNativeVendor ( JNIEnv *env, jobject obj )
@@ -112,7 +112,7 @@ Java_gl4java_GLUFuncJauJNI_gluQuadricCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluQuadricCallback((void *)((PointerHolder)qobj),
+ disp__gluQuadricCallback((void *)((PointerHolder)qobj),
which, cbf_GLU_ERROR );
break;
default:
@@ -136,7 +136,7 @@ Java_gl4java_GLUFuncJauJNI_gluNurbsCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_ERROR:
- gluNurbsCallback((void *)((PointerHolder)nobj), which,
+ disp__gluNurbsCallback((void *)((PointerHolder)nobj), which,
cbf_GLU_ERROR );
break;
default:
@@ -164,62 +164,62 @@ Java_gl4java_GLUFuncJauJNI_gluTessCallback( JNIEnv *env, jobject obj,
switch(which)
{
case GLU_TESS_BEGIN:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN );
break;
case GLU_TESS_BEGIN_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_BEGIN_DATA );
break;
case GLU_TESS_EDGE_FLAG:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG );
break;
case GLU_TESS_EDGE_FLAG_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_EDGE_FLAG_DATA );
break;
case GLU_TESS_VERTEX:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX );
break;
case GLU_TESS_VERTEX_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_VERTEX_DATA );
break;
case GLU_TESS_END:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END );
break;
case GLU_TESS_END_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_END_DATA );
break;
case GLU_TESS_ERROR:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR );
break;
case GLU_TESS_ERROR_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_ERROR_DATA );
break;
case GLU_TESS_COMBINE:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE );
break;
case GLU_TESS_COMBINE_DATA:
- gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
+ disp__gluTessCallback((GLUtesselator *)((PointerHolder)tobj),
which,
cbf_GLU_TESS_COMBINE_DATA );
break;
@@ -238,7 +238,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteQuadric( JNIEnv *env, jobject obj,
jlong qobj )
{
- gluDeleteQuadric((void *)((PointerHolder)qobj));
+ disp__gluDeleteQuadric((void *)((PointerHolder)qobj));
RemoveCallbackNodes((void *)((PointerHolder)qobj));
}
@@ -246,7 +246,7 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteNurbsRenderer( JNIEnv *env, jobject obj,
jlong nobj )
{
- gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
+ disp__gluDeleteNurbsRenderer((void *)((PointerHolder)nobj));
RemoveCallbackNodes((void *)((PointerHolder)nobj));
}
@@ -254,30 +254,30 @@ JNIEXPORT void JNICALL
Java_gl4java_GLUFuncJauJNI_gluDeleteTess( JNIEnv *env, jobject obj,
jlong tobj )
{
- gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
+ disp__gluDeleteTess((GLUtesselator *)((PointerHolder)tobj));
RemoveCallbackNodes((void *)((PointerHolder)tobj));
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewQuadric( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewQuadric());
+ return (jlong)((PointerHolder)disp__gluNewQuadric());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewNurbsRenderer( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewNurbsRenderer());
+ return (jlong)((PointerHolder)disp__gluNewNurbsRenderer());
}
JNIEXPORT jlong JNICALL
Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
- return (jlong)((PointerHolder)gluNewTess());
+ return (jlong)((PointerHolder)disp__gluNewTess());
}
/**
- * C2J Parser Version 1.5 Beta
+ * C2J Parser Version 2.0
* Jausoft - Sven Goethel Software Development
* Reading from file: glu-proto-auto.orig.h . . .
* Destination-Class: gl4java_GLUFuncJauJNI !
@@ -303,7 +303,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble upz)
{
- gluLookAt (
+ disp__gluLookAt (
(GLdouble) eyex,
(GLdouble) eyey,
(GLdouble) eyez,
@@ -332,7 +332,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble top)
{
- gluOrtho2D (
+ disp__gluOrtho2D (
(GLdouble) left,
(GLdouble) right,
(GLdouble) bottom,
@@ -356,7 +356,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble zFar)
{
- gluPerspective (
+ disp__gluPerspective (
(GLdouble) fovy,
(GLdouble) aspect,
(GLdouble) zNear,
@@ -387,7 +387,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr4 = (*env)->GetIntArrayElements(env, viewport, &isCopiedArray4);
}
- gluPickMatrix (
+ disp__gluPickMatrix (
(GLdouble) x,
(GLdouble) y,
(GLdouble) width,
@@ -456,7 +456,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (*env)->GetDoubleArrayElements(env, winz, &isCopiedArray8);
}
- ret = (jint) gluProject (
+ ret = (jint) disp__gluProject (
(GLdouble) objx,
(GLdouble) objy,
(GLdouble) objz,
@@ -550,7 +550,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (*env)->GetDoubleArrayElements(env, objz, &isCopiedArray8);
}
- ret = (jint) gluUnProject (
+ ret = (jint) disp__gluUnProject (
(GLdouble) winx,
(GLdouble) winy,
(GLdouble) winz,
@@ -622,7 +622,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr8 = (*env)->GetByteArrayElements(env, dataout, &isCopiedArray8);
}
- ret = (jint) gluScaleImage (
+ ret = (jint) disp__gluScaleImage (
(GLenum) format,
(GLsizei) widthin,
(GLsizei) heightin,
@@ -669,7 +669,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetByteArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -702,7 +702,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetShortArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -735,7 +735,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetIntArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -768,7 +768,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetFloatArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -801,7 +801,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetDoubleArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -834,7 +834,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetBooleanArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -867,7 +867,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr5 = (*env)->GetLongArrayElements(env, data, 0);
}
- ret = (jint) gluBuild1DMipmaps (
+ ret = (jint) disp__gluBuild1DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -908,7 +908,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetByteArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -943,7 +943,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetShortArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -978,7 +978,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetIntArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1013,7 +1013,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetFloatArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1048,7 +1048,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetDoubleArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1083,7 +1083,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetBooleanArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1118,7 +1118,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr6 = (*env)->GetLongArrayElements(env, data, 0);
}
- ret = (jint) gluBuild2DMipmaps (
+ ret = (jint) disp__gluBuild2DMipmaps (
(GLenum) target,
(GLint) components,
(GLint) width,
@@ -1148,7 +1148,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint drawStyle)
{
- gluQuadricDrawStyle (
+ disp__gluQuadricDrawStyle (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) drawStyle
);
@@ -1168,7 +1168,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint orientation)
{
- gluQuadricOrientation (
+ disp__gluQuadricOrientation (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) orientation
);
@@ -1188,7 +1188,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint normals)
{
- gluQuadricNormals (
+ disp__gluQuadricNormals (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLenum) normals
);
@@ -1208,7 +1208,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jboolean textureCoords)
{
- gluQuadricTexture (
+ disp__gluQuadricTexture (
(GLUquadricObj *) (PointerHolder) quadObject,
(GLboolean) textureCoords
);
@@ -1232,7 +1232,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint stacks)
{
- gluCylinder (
+ disp__gluCylinder (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) baseRadius,
(GLdouble) topRadius,
@@ -1258,7 +1258,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint stacks)
{
- gluSphere (
+ disp__gluSphere (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) radius,
(GLint) slices,
@@ -1283,7 +1283,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint loops)
{
- gluDisk (
+ disp__gluDisk (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) innerRadius,
(GLdouble) outerRadius,
@@ -1311,7 +1311,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble sweepAngle)
{
- gluPartialDisk (
+ disp__gluPartialDisk (
(GLUquadricObj *) (PointerHolder) qobj,
(GLdouble) innerRadius,
(GLdouble) outerRadius,
@@ -1353,7 +1353,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr3 = (*env)->GetIntArrayElements(env, viewport, 0);
}
- gluLoadSamplingMatrices (
+ disp__gluLoadSamplingMatrices (
(GLUnurbsObj *) (PointerHolder) nobj,
(const GLfloat *) ptr1,
(const GLfloat *) ptr2,
@@ -1388,7 +1388,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jfloat value)
{
- gluNurbsProperty (
+ disp__gluNurbsProperty (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLenum) property,
(GLfloat) value
@@ -1416,7 +1416,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetFloatArrayElements(env, value, &isCopiedArray2);
}
- gluGetNurbsProperty (
+ disp__gluGetNurbsProperty (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLenum) property,
(GLfloat *) ptr2
@@ -1440,7 +1440,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginCurve (
+ disp__gluBeginCurve (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1458,7 +1458,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndCurve (
+ disp__gluEndCurve (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1494,7 +1494,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr4 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray4);
}
- gluNurbsCurve (
+ disp__gluNurbsCurve (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) nknots,
(GLfloat *) ptr2,
@@ -1526,7 +1526,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginSurface (
+ disp__gluBeginSurface (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1544,7 +1544,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndSurface (
+ disp__gluEndSurface (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1590,7 +1590,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr7 = (*env)->GetFloatArrayElements(env, ctlarray, &isCopiedArray7);
}
- gluNurbsSurface (
+ disp__gluNurbsSurface (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) sknot_count,
(GLfloat *) ptr2,
@@ -1630,7 +1630,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluBeginTrim (
+ disp__gluBeginTrim (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1648,7 +1648,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong nobj)
{
- gluEndTrim (
+ disp__gluEndTrim (
(GLUnurbsObj *) (PointerHolder) nobj
);
@@ -1676,7 +1676,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetFloatArrayElements(env, array, &isCopiedArray2);
}
- gluPwlCurve (
+ disp__gluPwlCurve (
(GLUnurbsObj *) (PointerHolder) nobj,
(GLint) count,
(GLfloat *) ptr2,
@@ -1709,7 +1709,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetByteArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1732,7 +1732,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetShortArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1755,7 +1755,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetIntArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1778,7 +1778,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetFloatArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1801,7 +1801,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetDoubleArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1824,7 +1824,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetBooleanArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1847,7 +1847,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr1 = (*env)->GetLongArrayElements(env, polygon_data, &isCopiedArray1);
}
- gluTessBeginPolygon (
+ disp__gluTessBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj,
(void *) ptr1
);
@@ -1870,7 +1870,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessBeginContour (
+ disp__gluTessBeginContour (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -1902,7 +1902,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetByteArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -1937,7 +1937,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetShortArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -1972,7 +1972,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetIntArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2007,7 +2007,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetFloatArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2042,7 +2042,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetDoubleArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2077,7 +2077,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetBooleanArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2112,7 +2112,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetLongArrayElements(env, vertex_data, &isCopiedArray2);
}
- gluTessVertex (
+ disp__gluTessVertex (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble *) ptr1,
(void *) ptr2
@@ -2140,7 +2140,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessEndContour (
+ disp__gluTessEndContour (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2158,7 +2158,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluTessEndPolygon (
+ disp__gluTessEndPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2178,7 +2178,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble value)
{
- gluTessProperty (
+ disp__gluTessProperty (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) which,
(GLdouble) value
@@ -2201,7 +2201,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jdouble z)
{
- gluTessNormal (
+ disp__gluTessNormal (
(GLUtesselator *) (PointerHolder) tobj,
(GLdouble) x,
(GLdouble) y,
@@ -2230,7 +2230,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
{
ptr2 = (*env)->GetDoubleArrayElements(env, value, &isCopiedArray2);
}
- gluGetTessProperty (
+ disp__gluGetTessProperty (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) which,
(GLdouble *) ptr2
@@ -2254,7 +2254,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluBeginPolygon (
+ disp__gluBeginPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
@@ -2273,7 +2273,7 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jint type)
{
- gluNextContour (
+ disp__gluNextContour (
(GLUtesselator *) (PointerHolder) tobj,
(GLenum) type
);
@@ -2292,10 +2292,10 @@ Java_gl4java_GLUFuncJauJNI_gluNewTess( JNIEnv *env, jobject obj)
jlong tobj)
{
- gluEndPolygon (
+ disp__gluEndPolygon (
(GLUtesselator *) (PointerHolder) tobj
);
}
-/* C2J Parser Version 1.5 Beta: Java program parsed successfully. */
+/* C2J Parser Version 2.0: Java program parsed successfully. */
diff --git a/CNativeCode/OpenGL_Win32.c b/CNativeCode/OpenGL_Win32.c
index df4ad2d..6213fdd 100755
--- a/CNativeCode/OpenGL_Win32.c
+++ b/CNativeCode/OpenGL_Win32.c
@@ -258,7 +258,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
fflush(stderr);
}
- wglMakeCurrent(NULL, NULL);
+ disp__wglMakeCurrent(NULL, NULL);
/**
* with version jdk1.1.6 and later, we are able to use
@@ -351,7 +351,7 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj,
return JNI_FALSE;
}
- if ( ret==JNI_TRUE && !wglMakeCurrent((HDC)((PointerHolder)thisWin),
+ if ( ret==JNI_TRUE && !disp__wglMakeCurrent((HDC)((PointerHolder)thisWin),
(HGLRC)((PointerHolder)glContext)) )
{
return JNI_FALSE;
@@ -372,7 +372,7 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj,
(void)disp;
(void)canvas;
- if ( ! wglMakeCurrent( NULL, NULL ) )
+ if ( ! disp__wglMakeCurrent( NULL, NULL ) )
{
fprintf(stderr, "gljFree failed\n");
fflush(stderr);
@@ -454,7 +454,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
}
}
- if ( ! wglMakeCurrent( NULL, NULL ) )
+ if ( ! disp__wglMakeCurrent( NULL, NULL ) )
{
fprintf(stderr, "gljDestroy failed (free)\n");
fflush(stderr);
@@ -463,7 +463,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE)
{
if(gc!=0)
- wglDeleteContext(gc);
+ disp__wglDeleteContext(gc);
if(pix!=0)
{
@@ -536,7 +536,7 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
return JNI_FALSE;
}
} else {
- glFlush();
+ disp__glFlush();
}
return ret;
}
diff --git a/CNativeCode/OpenGL_Win32_common.c b/CNativeCode/OpenGL_Win32_common.c
index 8368677..9b44a34 100755
--- a/CNativeCode/OpenGL_Win32_common.c
+++ b/CNativeCode/OpenGL_Win32_common.c
@@ -17,281 +17,6 @@
#include "OpenGL_Win32_common.h"
-HGLRC LIBAPIENTRY get_GC( HDC * hDC, GLCapabilities *glCaps,
- HGLRC shareWith,
- jboolean offScreenRenderer,
- int width, int height, HBITMAP *pix,
- jboolean verbose)
-
-{
- const char * text=0;
- HDC hDCOrig = 0;
-
- // Color Palette handle
- HPALETTE hPalette = NULL;
- HGLRC tempRC=0;
-
- if( *hDC == 0 && !offScreenRenderer)
- printf( "get_GC: Error, HDC is zero\n");
-
- // Select the pixel format
- if(offScreenRenderer)
- {
- hDCOrig = *hDC;
- *hDC = CreateCompatibleDC(hDCOrig);
- // setupDIB(*hDC, pix, width, height);
- setupDIB(hDCOrig, *hDC, pix, width, height);
- /* SetDCPixelFormat(hDCOffScr, doubleBuffer, stereo, stencilBits, offScreenRenderer); */
- /* setupPalette(hDC); USE MY PROC */
- }
-
- SetDCPixelFormat(*hDC, glCaps, offScreenRenderer, verbose);
-
- // Create palette if needed
- hPalette = GetOpenGLPalette(*hDC);
-
- tempRC = wglCreateContext( *hDC );
-
- if(verbose==JNI_TRUE)
- {
- fprintf(stderr,"\n\nPIXELFORMAT OF GL-Context SETTINGS:\n");
- text=GetTextualPixelFormatByHDC(*hDC);
- fprintf(stderr,text);
- }
-
- /* check if the context could be created */
- if( tempRC == NULL ) {
- fprintf(stderr, "getGC context could NOT be created \n");
- return( 0 );
- }
-
- /* associated the context with the X window */
- if( wglMakeCurrent( *hDC, tempRC ) == FALSE) {
- fprintf(stderr,"wglMakeCurrent(%d,%d) failed on new context!!!\n",(int)*hDC,(int)tempRC);
- fprintf(stderr,"Error code = %d\n",(int)GetLastError());
- wglMakeCurrent(NULL, NULL);
- wglDeleteContext( tempRC );
- return( 0 );
- }
-
- if(shareWith!=NULL && wglShareLists(shareWith, tempRC)==FALSE)
- {
- fprintf(stderr,"\nERROR: Could not share lists between the new and the given GLContext (Win32Native)!\n");
- fprintf(stderr,"Error code = %d\n",(int)GetLastError());
- wglMakeCurrent(NULL, NULL);
- wglDeleteContext( tempRC );
- return( 0 );
- }
-
- if(JNI_TRUE==verbose)
- printf( "HGLRC (glContext) created: %d\n", tempRC );
-
- return tempRC;
-}
-
-void LIBAPIENTRY setPixelFormatByGLCapabilities(
- PIXELFORMATDESCRIPTOR *pfd,
- GLCapabilities *glCaps,
- jboolean offScreenRenderer,
- HDC hdc)
-{
-
- int colorBits = glCaps->redBits + glCaps->greenBits + glCaps->blueBits;
-
- pfd->nSize=sizeof(PIXELFORMATDESCRIPTOR);
- pfd->nVersion=1;
- pfd->dwFlags=PFD_SUPPORT_OPENGL | PFD_GENERIC_ACCELERATED; /* refined later */
- pfd->iPixelType=0;
- pfd->cColorBits=0;
- pfd->cRedBits=0;
- pfd->cRedShift=0;
- pfd->cGreenBits=0;
- pfd->cGreenShift=0;
- pfd->cBlueBits=0;
- pfd->cBlueShift=0;
- pfd->cAlphaBits=0;
- pfd->cAlphaShift=0;
- pfd->cAccumBits=0;
- pfd->cAccumRedBits=0;
- pfd->cAccumGreenBits=0;
- pfd->cAccumBlueBits=0;
- pfd->cAccumAlphaBits=0;
- pfd->cDepthBits=32;
- pfd->cStencilBits=0;
- pfd->cAuxBuffers=0;
- pfd->iLayerType=PFD_MAIN_PLANE;
- pfd->bReserved=0;
- pfd->dwLayerMask=0;
- pfd->dwVisibleMask=0;
- pfd->dwDamageMask=0;
-
- if(COLOR_RGBA == glCaps->color)
- pfd->iPixelType=PFD_TYPE_RGBA;
- else
- pfd->iPixelType=PFD_TYPE_COLORINDEX;
-
- if(offScreenRenderer)
- pfd->dwFlags |= PFD_DRAW_TO_BITMAP; // Draw to Bitmap
- else
- pfd->dwFlags |= PFD_DRAW_TO_WINDOW; // Draw to Window (not to bitmap)
-
-
- if(BUFFER_DOUBLE==glCaps->buffer)
- pfd->dwFlags |= PFD_DOUBLEBUFFER ; // Double buffered is optional
-
- if(STEREO_ON==glCaps->stereo)
- pfd->dwFlags |= PFD_STEREO ; // Stereo is optional
-
- if(hdc!=NULL && GetDeviceCaps(hdc, BITSPIXEL)<colorBits)
- pfd->cColorBits = GetDeviceCaps(hdc, BITSPIXEL);
- else
- pfd->cColorBits = (BYTE)colorBits;
-
- pfd->cStencilBits = (BYTE) glCaps->stencilBits;
-}
-
-
-void LIBAPIENTRY SetDCPixelFormat(HDC hDC, GLCapabilities *glCaps,
- jboolean offScreenRenderer, jboolean verbose)
-{
- int nPixelFormat=-1;
- const char * text=0;
-
- PIXELFORMATDESCRIPTOR pfd ;
-
- if(verbose==JNI_TRUE)
- {
- fprintf(stdout, "GL4Java SetDCPixelFormat: input capabilities:\n");
- printGLCapabilities ( glCaps );
- }
-
- if(glCaps->nativeVisualID>=0)
- {
- if ( 0 < DescribePixelFormat( hDC, (int)(glCaps->nativeVisualID),
- sizeof(pfd), &pfd ) )
- {
- nPixelFormat=(int)(glCaps->nativeVisualID);
- if(verbose==JNI_TRUE)
- {
- fprintf(stderr,"\n\nUSER found stored PIXELFORMAT number: %ld\n",
- nPixelFormat);
- fflush(stderr);
- }
- } else {
- fprintf(stderr,"\n\nUSER no stored PIXELFORMAT number found !!\n");
- nPixelFormat = -1;
- fflush(stderr);
- }
- }
-
- if(nPixelFormat<0)
- setPixelFormatByGLCapabilities( &pfd, glCaps, offScreenRenderer, hDC);
-
- if(verbose==JNI_TRUE)
- {
- fprintf(stderr,"\n\nUSER CHOOSED PIXELFORMAT (TRYING):\n");
- text=GetTextualPixelFormatByPFD(&pfd, nPixelFormat);
- fprintf(stderr,text);
- fflush(stderr);
- }
-
- // Choose a pixel format that best matches that described in pfd
- if( hDC == 0 )
- printf( "SetDCPixelFormat: Error, no HDC-Contex is given\n");
- else if(nPixelFormat<0)
- nPixelFormat = ChoosePixelFormat(hDC, &pfd);
-
- if( nPixelFormat == 0 )
- printf( "SetDCPixelFormat: Error with PixelFormat\n" );
-
- // Set the pixel format for the device context
- if( SetPixelFormat(hDC, nPixelFormat, &pfd) == FALSE)
- printf( "setpixel failed\n" );
- else {
- (void) setGLCapabilities ( hDC, nPixelFormat, glCaps );
- if(verbose==JNI_TRUE)
- {
- fprintf(stdout, "GL4Java SetDCPixelFormat: used capabilities:\n");
- printGLCapabilities ( glCaps );
- }
- }
- fflush(stdout);
- fflush(stderr);
-}
-
-
-// If necessary, creates a 3-3-2 palette for the device context listed.
-HPALETTE LIBAPIENTRY GetOpenGLPalette(HDC hDC)
-{
- HPALETTE hRetPal = NULL; // Handle to palette to be created
- PIXELFORMATDESCRIPTOR pfd; // Pixel Format Descriptor
- LOGPALETTE *pPal=0; // Pointer to memory for logical palette
- int nPixelFormat=0; // Pixel format index
- int nColors=0; // Number of entries in palette
- int i=0; // Counting variable
- BYTE RedRange=0,GreenRange=0,BlueRange=0;
- // Range for each color entry (7,7,and 3)
-
-
- // Get the pixel format index and retrieve the pixel format description
- nPixelFormat = GetPixelFormat(hDC);
- DescribePixelFormat(hDC, nPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
-
- // Does this pixel format require a palette? If not, do not create a
- // palette and just return NULL
- if(!(pfd.dwFlags & PFD_NEED_PALETTE))
- return NULL;
-
- // Number of entries in palette. 8 bits yeilds 256 entries
- nColors = 1 << pfd.cColorBits;
-
- // Allocate space for a logical palette structure plus all the palette entries
- pPal = (LOGPALETTE*)malloc(sizeof(LOGPALETTE) + nColors*sizeof(PALETTEENTRY));
-
- // Fill in palette header
- pPal->palVersion = 0x300; // Windows 3.0
- pPal->palNumEntries = nColors; // table size
-
- // Build mask of all 1's. This creates a number represented by having
- // the low order x bits set, where x = pfd.cRedBits, pfd.cGreenBits, and
- // pfd.cBlueBits.
- RedRange = (1 << pfd.cRedBits) -1;
- GreenRange = (1 << pfd.cGreenBits) - 1;
- BlueRange = (1 << pfd.cBlueBits) -1;
-
- // Loop through all the palette entries
- for(i = 0; i < nColors; i++)
- {
- // Fill in the 8-bit equivalents for each component
- pPal->palPalEntry[i].peRed = (i >> pfd.cRedShift) & RedRange;
- pPal->palPalEntry[i].peRed = (unsigned char)(
- (double) pPal->palPalEntry[i].peRed * 255.0 / RedRange);
-
- pPal->palPalEntry[i].peGreen = (i >> pfd.cGreenShift) & GreenRange;
- pPal->palPalEntry[i].peGreen = (unsigned char)(
- (double)pPal->palPalEntry[i].peGreen * 255.0 / GreenRange);
-
- pPal->palPalEntry[i].peBlue = (i >> pfd.cBlueShift) & BlueRange;
- pPal->palPalEntry[i].peBlue = (unsigned char)(
- (double)pPal->palPalEntry[i].peBlue * 255.0 / BlueRange);
-
- pPal->palPalEntry[i].peFlags = (unsigned char) NULL;
- }
-
-
- // Create the palette
- hRetPal = CreatePalette(pPal);
-
- // Go ahead and select and realize the palette for this device context
- SelectPalette(hDC,hRetPal,FALSE);
- RealizePalette(hDC);
-
- // Free the memory used for the logical palette structure
- free(pPal);
-
- // Return the handle to the new palette
- return hRetPal;
-}
jboolean LIBAPIENTRY testWin32Java()
@@ -329,436 +54,3 @@ jboolean LIBAPIENTRY testWin32Java()
}
-
-static void
-PrintMessage( const char *Format, ... )
-{
- va_list ArgList;
- char Buffer[256];
-
- va_start(ArgList, Format);
- vsprintf(Buffer, Format, ArgList);
- va_end(ArgList);
-
- fprintf(stderr, Buffer);
-}
-
-
-int LIBAPIENTRY
-PixelFormatDescriptorFromDc( HDC Dc, PIXELFORMATDESCRIPTOR *Pfd )
-{
- int PfdIndex;
-
- if ( 0 < (PfdIndex = GetPixelFormat( Dc )) )
- {
- if ( 0 < DescribePixelFormat( Dc, PfdIndex, sizeof(*Pfd), Pfd ) )
- {
- return(PfdIndex);
- }
- else
- {
- PrintMessage("Could not get a description of pixel format %d\n",
- PfdIndex );
- }
- }
- else
- {
- PrintMessage("Could not get pixel format for Dc 0x%08lX\n", Dc );
- }
- return( 0 );
-}
-
-
-const char * LIBAPIENTRY
-GetTextualPixelFormatByPFD(PIXELFORMATDESCRIPTOR *ppfd, int format)
-{
- static char buffer[2000];
- char line[200];
-
- sprintf(buffer,"Pixel format %d\n", format);
- sprintf(line," dwFlags - 0x%x\n", ppfd->dwFlags);
- if (ppfd->dwFlags & PFD_DOUBLEBUFFER) { strcat(buffer, line); sprintf(line,"\tPFD_DOUBLEBUFFER\n "); }
- if (ppfd->dwFlags & PFD_STEREO) { strcat(buffer, line); sprintf(line,"\tPFD_STEREO\n "); }
- if (ppfd->dwFlags & PFD_DRAW_TO_WINDOW) { strcat(buffer, line); sprintf(line,"\tPFD_DRAW_TO_WINDOW\n "); }
- if (ppfd->dwFlags & PFD_DRAW_TO_BITMAP) { strcat(buffer, line); sprintf(line,"\tPFD_DRAW_TO_BITMAP\n "); }
- if (ppfd->dwFlags & PFD_SUPPORT_GDI) { strcat(buffer, line); sprintf(line,"\tPFD_SUPPORT_GDI\n "); }
- if (ppfd->dwFlags & PFD_SUPPORT_OPENGL) { strcat(buffer, line); sprintf(line,"\tPFD_SUPPORT_OPENGL\n "); }
- if (ppfd->dwFlags & PFD_GENERIC_ACCELERATED) { strcat(buffer, line); sprintf(line,"\tPFD_GENERIC_ACCELERATED\n "); }
- if (ppfd->dwFlags & PFD_GENERIC_FORMAT) { strcat(buffer, line); sprintf(line,"\tPFD_GENERIC_FORMAT\n "); }
- if (ppfd->dwFlags & PFD_NEED_PALETTE) { strcat(buffer, line); sprintf(line,"\tPFD_NEED_PALETTE\n "); }
- if (ppfd->dwFlags & PFD_NEED_SYSTEM_PALETTE) { strcat(buffer, line); sprintf(line,"\tPFD_NEED_SYSTEM_PALETTE\n "); }
- strcat(buffer, line); sprintf(line,"\n");
- strcat(buffer, line); sprintf(line," iPixelType - %d\n", ppfd->iPixelType);
- if (ppfd->iPixelType == PFD_TYPE_RGBA) { strcat(buffer, line); sprintf(line,"\tPGD_TYPE_RGBA\n"); }
- if (ppfd->iPixelType == PFD_TYPE_COLORINDEX) { strcat(buffer, line); sprintf(line,"\tPGD_TYPE_COLORINDEX\n"); }
- strcat(buffer, line); sprintf(line," cColorBits - %d\n", ppfd->cColorBits);
- strcat(buffer, line); sprintf(line," cRedBits - %d\n", ppfd->cRedBits);
- strcat(buffer, line); sprintf(line," cRedShift - %d\n", ppfd->cRedShift);
- strcat(buffer, line); sprintf(line," cGreenBits - %d\n", ppfd->cGreenBits);
- strcat(buffer, line); sprintf(line," cGreenShift - %d\n", ppfd->cGreenShift);
- strcat(buffer, line); sprintf(line," cBlueBits - %d\n", ppfd->cBlueBits);
- strcat(buffer, line); sprintf(line," cBlueShift - %d\n", ppfd->cBlueShift);
- strcat(buffer, line); sprintf(line," cAlphaBits - %d (N.A.)\n", ppfd->cAlphaBits);
- strcat(buffer, line); sprintf(line," cAlphaShift - 0x%x (N.A.)\n", ppfd->cAlphaShift);
- strcat(buffer, line); sprintf(line," cAccumBits - %d\n", ppfd->cAccumBits);
- strcat(buffer, line); sprintf(line," cAccumRedBits - %d\n", ppfd->cAccumRedBits);
- strcat(buffer, line); sprintf(line," cAccumGreenBits - %d\n", ppfd->cAccumGreenBits);
- strcat(buffer, line); sprintf(line," cAccumBlueBits - %d\n", ppfd->cAccumBlueBits);
- strcat(buffer, line); sprintf(line," cAccumAlphaBits - %d\n", ppfd->cAccumAlphaBits);
- strcat(buffer, line); sprintf(line," cDepthBits - %d\n", ppfd->cDepthBits);
- strcat(buffer, line); sprintf(line," cStencilBits - %d\n", ppfd->cStencilBits);
- strcat(buffer, line); sprintf(line," cAuxBuffers - %d\n", ppfd->cAuxBuffers);
- strcat(buffer, line); sprintf(line," iLayerType - %d\n", ppfd->iLayerType);
- strcat(buffer, line); sprintf(line," bReserved - %d\n", ppfd->bReserved);
- strcat(buffer, line); sprintf(line," dwLayerMask - 0x%x\n", ppfd->dwLayerMask);
- strcat(buffer, line); sprintf(line," dwVisibleMask - 0x%x\n", ppfd->dwVisibleMask);
- strcat(buffer, line); sprintf(line," dwDamageMask - 0x%x\n", ppfd->dwDamageMask);
- strcat(buffer, line);
- return buffer;
-}
-
-const char * LIBAPIENTRY GetTextualPixelFormatByHDC(HDC hdc)
-{
- PIXELFORMATDESCRIPTOR pfd, *ppfd=0;
- int format=0;
-
- ppfd = &pfd;
- format = PixelFormatDescriptorFromDc( hdc, ppfd );
-
- return GetTextualPixelFormatByPFD(ppfd, format);
-}
-
-/*****************************************************************/
-
-/* Struct used to manage color ramps */
-typedef struct {
- GLfloat amb[3]; /* ambient color / bottom of ramp */
- GLfloat diff[3]; /* diffuse color / middle of ramp */
- GLfloat spec[3]; /* specular color / top of ramp */
- GLfloat ratio; /* ratio of diffuse to specular in ramp */
- GLint indexes[3]; /* where ramp was placed in palette */
-} colorIndexState ;
-
-#define NUM_COLORS (sizeof(colors) / sizeof(colors[0]))
-
-void LIBAPIENTRY
-setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, int width, int height)
-{
- BITMAPINFO *bmInfo=0;
- BITMAPINFOHEADER *bmHeader=0;
- UINT usage=0;
- VOID *base=0;
- int bmiSize=0;
- int bitsPerPixel=0;
- HBITMAP hOldBitmap=0;
-
- bmiSize = sizeof(*bmInfo);
- bitsPerPixel = GetDeviceCaps(hDC, BITSPIXEL);
-
- switch (bitsPerPixel) {
- case 8:
- // bmiColors is 256 WORD palette indices
- bmiSize += (256 * sizeof(WORD)) - sizeof(RGBQUAD);
- break;
- case 16:
- // bmiColors is 3 WORD component masks
- bmiSize += (3 * sizeof(DWORD)) - sizeof(RGBQUAD);
- break;
- case 24:
- case 32:
- default:
- // bmiColors not used
- break;
- }
-
- bmInfo = (BITMAPINFO *) calloc(1, bmiSize);
- bmHeader = &bmInfo->bmiHeader;
-
- bmHeader->biSize = sizeof(*bmHeader);
- bmHeader->biWidth = width;
- bmHeader->biHeight = height;
- bmHeader->biPlanes = 1; // must be 1
- bmHeader->biBitCount = bitsPerPixel;
- bmHeader->biXPelsPerMeter = 0;
- bmHeader->biYPelsPerMeter = 0;
- bmHeader->biClrUsed = 0; // all are used
- bmHeader->biClrImportant = 0; // all are important
-
- switch (bitsPerPixel) {
- case 8:
- bmHeader->biCompression = BI_RGB;
- bmHeader->biSizeImage = 0;
- usage = DIB_PAL_COLORS;
- // bmiColors is 256 WORD palette indices
- {
- WORD *palIndex = (WORD *) &bmInfo->bmiColors[0];
- int i;
-
- for (i=0; i<256; i++) {
- palIndex[i] = i;
- }
- }
- break;
- case 16:
- bmHeader->biCompression = BI_RGB;
- bmHeader->biSizeImage = 0;
- usage = DIB_RGB_COLORS;
- // bmiColors is 3 WORD component masks
- {
- DWORD *compMask = (DWORD *) &bmInfo->bmiColors[0];
-
- compMask[0] = 0xF800;
- compMask[1] = 0x07E0;
- compMask[2] = 0x001F;
- }
- break;
- case 24:
- case 32:
- default:
- bmHeader->biCompression = BI_RGB;
- bmHeader->biSizeImage = 0;
- usage = DIB_RGB_COLORS;
- // bmiColors not used
- break;
- }
-
- *hBitmap = CreateDIBSection(hDC, bmInfo, usage, &base, NULL, 0);
- if (*hBitmap == NULL) {
- (void) MessageBox(WindowFromDC(hDC),
- "Failed to create DIBSection.",
- "OpenGL application error",
- MB_ICONERROR | MB_OK);
- exit(1);
- }
-
- hOldBitmap = SelectObject(hDC, *hBitmap);
- if(hOldBitmap!=0)
- DeleteObject(hOldBitmap);
-
- free(bmInfo);
-}
-
-
-/*
-static void
-setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap, int width, int height)
-{
- HBITMAP hOldBitmap=0;
-
- *hBitmap = CreateCompatibleBitmap( hDCOrig, width, height );
- if (*hBitmap == NULL) {
- fprintf(stderr,"Failed to create CreateCompatibleBitmap! \n");
- fflush(stderr);
- return;
- }
-
- hOldBitmap = SelectObject(hDC, *hBitmap);
- if(hOldBitmap!=0)
- DeleteObject(hOldBitmap);
-}
-*/
-
-
-void LIBAPIENTRY resizeDIB(HDC hDC, HBITMAP *hOldBitmap, HBITMAP *hBitmap)
-{
- /*
- SelectObject(hDC, *hOldBitmap);
- DeleteObject(*hBitmap);
- setupDIB(hDC, hBitmap);
- */
-}
-
-HPALETTE LIBAPIENTRY setupPalette(HDC hDC)
-{
- HPALETTE hPalette = NULL;
- PIXELFORMATDESCRIPTOR pfd;
- LOGPALETTE* pPal=0;
- int pixelFormat = GetPixelFormat(hDC);
- int paletteSize=0;
- colorIndexState colors[] = {
- {
- { 0.0F, 0.0F, 0.0F },
- { 0.1F, 0.6F, 0.3F },
- { 1.0F, 1.0F, 1.0F },
- 0.75F, { 0, 0, 0 },
- },
- {
- { 0.0F, 0.0F, 0.0F },
- { 0.0F, 0.2F, 0.5F },
- { 1.0F, 1.0F, 1.0F },
- 0.75F, { 0, 0, 0 },
- },
- {
- { 0.0F, 0.05F, 0.05F },
- { 0.6F, 0.0F, 0.8F },
- { 1.0F, 1.0F, 1.0F },
- 0.75F, { 0, 0, 0 },
- },
- };
-
-
- DescribePixelFormat(hDC, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
-
- /*
- ** Determine if a palette is needed and if so what size.
- */
- if (pfd.dwFlags & PFD_NEED_PALETTE) {
- paletteSize = 1 << pfd.cColorBits;
- } else if (pfd.iPixelType == PFD_TYPE_COLORINDEX) {
- paletteSize = 4096;
- } else {
- return NULL;
- }
-
- pPal = (LOGPALETTE*)
- malloc(sizeof(LOGPALETTE) + paletteSize * sizeof(PALETTEENTRY));
- pPal->palVersion = 0x300;
- pPal->palNumEntries = paletteSize;
-
- if (pfd.iPixelType == PFD_TYPE_RGBA) {
- /*
- ** Fill the logical paletee with RGB color ramps
- */
- int redMask = (1 << pfd.cRedBits) - 1;
- int greenMask = (1 << pfd.cGreenBits) - 1;
- int blueMask = (1 << pfd.cBlueBits) - 1;
- int i;
-
-
-
- for (i=0; i<paletteSize; ++i) {
- pPal->palPalEntry[i].peRed =
- (((i >> pfd.cRedShift) & redMask) * 255) / redMask;
- pPal->palPalEntry[i].peGreen =
- (((i >> pfd.cGreenShift) & greenMask) * 255) / greenMask;
- pPal->palPalEntry[i].peBlue =
- (((i >> pfd.cBlueShift) & blueMask) * 255) / blueMask;
- pPal->palPalEntry[i].peFlags = 0;
- }
- } else {
- /*
- ** Fill the logical palette with color ramps.
- **
- ** Set up the logical palette so that it can be realized
- ** into the system palette as an identity palette.
- **
- ** 1) The default static entries should be present and at the right
- ** location. The easiest way to do this is to grab them from
- ** the current system palette.
- **
- ** 2) All non-static entries should be initialized to unique values.
- ** The easiest way to do this is to ensure that all of the non-static
- ** entries have the PC_NOCOLLAPSE flag bit set.
- */
- int numRamps = NUM_COLORS;
- int rampSize = (paletteSize - 20) / numRamps;
- int extra = (paletteSize - 20) - (numRamps * rampSize);
- int i, r;
-
- /*
- ** Initialize static entries by copying them from the
- ** current system palette.
- */
- GetSystemPaletteEntries(hDC, 0, paletteSize, &pPal->palPalEntry[0]);
-
- /*
- ** Fill in non-static entries with desired colors.
- */
- for (r=0; r<numRamps; ++r) {
- int rampBase = r * rampSize + 10;
- PALETTEENTRY *pe = &pPal->palPalEntry[rampBase];
- int diffSize = (int) (rampSize * colors[r].ratio);
- int specSize = rampSize - diffSize;
-
- for (i=0; i<rampSize; ++i) {
- GLfloat *c0, *c1;
- GLint a;
-
- if (i < diffSize) {
- c0 = colors[r].amb;
- c1 = colors[r].diff;
- a = (i * 255) / (diffSize - 1);
- } else {
- c0 = colors[r].diff;
- c1 = colors[r].spec;
- a = ((i - diffSize) * 255) / (specSize - 1);
- }
-
- pe[i].peRed = (BYTE) (a * (c1[0] - c0[0]) + 255 * c0[0]);
- pe[i].peGreen = (BYTE) (a * (c1[1] - c0[1]) + 255 * c0[1]);
- pe[i].peBlue = (BYTE) (a * (c1[2] - c0[2]) + 255 * c0[2]);
- pe[i].peFlags = PC_NOCOLLAPSE;
- }
-
- colors[r].indexes[0] = rampBase;
- colors[r].indexes[1] = rampBase + (diffSize-1);
- colors[r].indexes[2] = rampBase + (rampSize-1);
- }
-
- /*
- ** Initialize any remaining non-static entries.
- */
- for (i=0; i<extra; ++i) {
- int index = numRamps*rampSize+10+i;
- PALETTEENTRY *pe = &pPal->palPalEntry[index];
-
- pe->peRed = (BYTE) 0;
- pe->peGreen = (BYTE) 0;
- pe->peBlue = (BYTE) 0;
- pe->peFlags = PC_NOCOLLAPSE;
- }
- }
-
- hPalette = CreatePalette(pPal);
- free(pPal);
-
- if (hPalette) {
- SelectPalette(hDC, hPalette, FALSE);
- RealizePalette(hDC);
- }
-
- return hPalette;
-}
-
-
-jboolean LIBAPIENTRY setGLCapabilities ( HDC hdc,
- int nPixelFormat,
- GLCapabilities *glCaps )
-{
- PIXELFORMATDESCRIPTOR pfd;
-
- (void) PixelFormatDescriptorFromDc( hdc, &pfd);
-
- if (pfd.dwFlags & PFD_DOUBLEBUFFER)
- glCaps->buffer=BUFFER_DOUBLE;
- else
- glCaps->buffer=BUFFER_SINGLE;
-
- if (pfd.dwFlags & PFD_STEREO)
- glCaps->stereo=STEREO_ON;
- else
- glCaps->stereo=STEREO_OFF;
-
- if (pfd.iPixelType == PFD_TYPE_RGBA)
- glCaps->color=COLOR_RGBA;
-
- if (pfd.iPixelType == PFD_TYPE_COLORINDEX)
- glCaps->color=COLOR_INDEX;
-
- glCaps->depthBits = pfd.cDepthBits;
- glCaps->stencilBits = pfd.cStencilBits;
-
- glCaps->redBits = pfd.cRedBits;
- glCaps->greenBits= pfd.cGreenBits;
- glCaps->blueBits= pfd.cBlueBits;
- /* glCaps->alphaBits= pfd.cAlphaBits; N.A. */
- glCaps->accumRedBits = pfd.cAccumRedBits;
- glCaps->accumGreenBits= pfd.cAccumGreenBits;
- glCaps->accumBlueBits= pfd.cAccumBlueBits;
- glCaps->accumAlphaBits= pfd.cAccumAlphaBits;
-
- glCaps->nativeVisualID=nPixelFormat;
-
- return JNI_TRUE;
-}
-
diff --git a/CNativeCode/OpenGL_Win32_common.h b/CNativeCode/OpenGL_Win32_common.h
index 9e99aed..e789b42 100755
--- a/CNativeCode/OpenGL_Win32_common.h
+++ b/CNativeCode/OpenGL_Win32_common.h
@@ -3,33 +3,7 @@
#include "OpenGL_misc.h"
-#include <wingdi.h>
-
-
-LIBAPI void LIBAPIENTRY setPixelFormatByGLCapabilities(
- PIXELFORMATDESCRIPTOR *pfd,
- GLCapabilities *glCaps,
- jboolean offScreenRenderer,
- HDC hdc);
-
-// Set Pixel Format function - forward declaration
-LIBAPI void LIBAPIENTRY SetDCPixelFormat(HDC hDC, GLCapabilities *glCaps,
- jboolean offScreenRenderer, jboolean verbose);
-
-LIBAPI HPALETTE LIBAPIENTRY GetOpenGLPalette(HDC hDC);
-
-LIBAPI HGLRC LIBAPIENTRY get_GC( HDC *hDC, GLCapabilities *glCaps,
- HGLRC shareWith, jboolean offScreenRenderer,
- int width, int height, HBITMAP *pix,
- jboolean verbose);
-
-LIBAPI int LIBAPIENTRY PixelFormatDescriptorFromDc( HDC Dc,
- PIXELFORMATDESCRIPTOR *Pfd );
-
-const char * LIBAPIENTRY GetTextualPixelFormatByHDC(HDC hdc);
-
-const char * LIBAPIENTRY GetTextualPixelFormatByPFD(
- PIXELFORMATDESCRIPTOR *ppfd, int format);
+#include "wgltool.h"
/* testX11Java does important implementation plattformspecific checks:
*
@@ -37,14 +11,4 @@ const char * LIBAPIENTRY GetTextualPixelFormatByPFD(
*/
LIBAPI jboolean LIBAPIENTRY testWin32Java(void);
-LIBAPI void LIBAPIENTRY setupDIB(HDC hDCOrig, HDC hDC, HBITMAP * hBitmap,
- int width, int height);
-
-LIBAPI void LIBAPIENTRY resizeDIB(HDC hDC, HBITMAP *hOldBitmap,
- HBITMAP *hBitmap);
-
-LIBAPI HPALETTE LIBAPIENTRY setupPalette(HDC hDC);
-
-LIBAPI jboolean LIBAPIENTRY setGLCapabilities ( HDC hdc, int nPixelFormat,
- GLCapabilities *glCaps );
#endif
diff --git a/CNativeCode/OpenGL_Win32_jawt.c b/CNativeCode/OpenGL_Win32_jawt.c
index d025603..5eefec3 100755
--- a/CNativeCode/OpenGL_Win32_jawt.c
+++ b/CNativeCode/OpenGL_Win32_jawt.c
@@ -336,7 +336,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
}
}
- wglMakeCurrent(NULL, NULL);
+ disp__wglMakeCurrent(NULL, NULL);
/**
* with version jdk1.1.6 and later, we are able to use
@@ -400,11 +400,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
fprintf(stderr, "go and set gc : %d, 0x%X\n",
(int)gc, (int)gc);
}
-
- /*
- gl4java_bind_ext(JNI_TRUE==verbose);
- */
-
+
return ret;
}
@@ -461,7 +457,7 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj,
return ret;
}
- if ( ret==JNI_TRUE && !wglMakeCurrent(GET_USED_WINDOW(thisWin),
+ if ( ret==JNI_TRUE && !disp__wglMakeCurrent(GET_USED_WINDOW(thisWin),
(HGLRC)((PointerHolder)glContext)) )
{
jawt_close_unlock(env, pData, JNI_FALSE);
@@ -485,7 +481,7 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj,
(void)disp;
(void)canvas;
- if ( ! wglMakeCurrent( NULL, NULL ) )
+ if ( ! disp__wglMakeCurrent( NULL, NULL ) )
{
fprintf(stderr, "gljFree failed\n");
fflush(stderr);
@@ -611,7 +607,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
}
}
- if ( ! wglMakeCurrent( NULL, NULL ) )
+ if ( ! disp__wglMakeCurrent( NULL, NULL ) )
{
fprintf(stderr, "gljDestroy failed (free)\n");
fflush(stderr);
@@ -620,7 +616,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE)
{
if(gc!=0)
- wglDeleteContext(gc);
+ disp__wglDeleteContext(gc);
if(pix!=0)
{
@@ -704,7 +700,7 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
return JNI_FALSE;
}
} else {
- glFlush();
+ disp__glFlush();
}
return ret;
}
diff --git a/CNativeCode/OpenGL_X11.c b/CNativeCode/OpenGL_X11.c
index ac88c70..14510ec 100644
--- a/CNativeCode/OpenGL_X11.c
+++ b/CNativeCode/OpenGL_X11.c
@@ -83,6 +83,7 @@
*/
static jboolean verbose = JNI_FALSE;
+
JNIEXPORT jboolean JNICALL
Java_gl4java_GLContext_useJAWT( JNIEnv *env, jobject obj )
{
@@ -136,7 +137,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
jobject jglCaps=0;
GLCapabilities glCaps;
- jboolean jownwind = JNI_FALSE ;
+ jboolean jb_value;
+ int ownwind = 0 ;
jint jcreatewinw = 0, jcreatewinh = 0;
GLXContext jshareWith = 0;
@@ -240,7 +242,10 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE) {
fownwind = (*env)->GetFieldID(env, cls, "createOwnWindow", "Z");
if (fownwind == 0) ret= JNI_FALSE;
- else jownwind =(*env)->GetBooleanField(env, obj, fownwind);
+ else {
+ jb_value =(*env)->GetBooleanField(env, obj, fownwind);
+ ownwind = (jb_value==JNI_TRUE)?1:0;
+ }
}
if(ret==JNI_TRUE) {
@@ -266,7 +271,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
if(joffScreenRenderer==JNI_TRUE)
{
- jownwind = JNI_FALSE;
+ ownwind = 0;
thisWin=0;
}
@@ -320,15 +325,15 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
/* Check to see if the Xserver supports OpenGL */
if(ret==JNI_TRUE) {
- if( !glXQueryExtension(display, (int *) 0, (int *) 0) ) {
+ if( !disp__glXQueryExtension(display, (int *) 0, (int *) 0) ) {
fprintf(stderr, "GL4Java ERROR: Can not query glx extension -> Server does not support OpenGL\n");
fflush(stderr);
ret = JNI_FALSE;
} else if (JNI_TRUE==verbose)
{
fprintf(stdout, "GLX by %s Version %s\n",
- glXGetClientString(display, GLX_VENDOR),
- glXGetClientString(display, GLX_VERSION));
+ disp__glXGetClientString(display, GLX_VENDOR),
+ disp__glXGetClientString(display, GLX_VERSION));
}
}
@@ -338,12 +343,14 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
screen = DefaultScreen( display );
rootwini = RootWindow(display,screen) ;
- glXMakeCurrent(display, None, NULL);
+ disp__glXMakeCurrent(display, None, NULL);
vgc = findVisualGlX( display, rootwini, &thisWin,
(int)jcreatewinw, (int)jcreatewinh,
- &glCaps,
- &jownwind, jshareWith,
+ &glCaps, &ownwind,
+ NULL /* pOwnWinAttr */,
+ 0 /* ownWinmask */,
+ jshareWith,
joffScreenRenderer, &pix, verbose);
if(vgc.success == 0 && glCaps.color==COLOR_RGBA)
@@ -356,8 +363,10 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
vgc = findVisualGlX( display, rootwini, &thisWin,
(int)jcreatewinw, (int)jcreatewinh,
- &glCaps,
- &jownwind, jshareWith,
+ &glCaps, &ownwind,
+ NULL /* pOwnWinAttr */,
+ 0 /* ownWinmask */,
+ jshareWith,
joffScreenRenderer, &pix, verbose);
}
@@ -366,7 +375,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
fprintf(stderr,"GL4Java ERROR: GETTING GC FAILED\n");
fflush(stderr);
- if(jownwind==JNI_TRUE && thisWin!=0)
+ if(ownwind && thisWin!=0)
XDestroyWindow( display, thisWin );
if(joffScreenRenderer==JNI_TRUE && pix!=0)
XFreePixmap(display, pix);
@@ -416,7 +425,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
}
if(ret==JNI_TRUE && fownwind) {
- (*env)->SetBooleanField(env, obj, fownwind, jownwind);
+ jb_value = ownwind?JNI_TRUE:JNI_FALSE;
+ (*env)->SetBooleanField(env, obj, fownwind, jb_value);
}
return ret;
@@ -432,7 +442,7 @@ Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj,
* by a native Thread .... So we have to try avoid gl* reentrance
* on the same GL-Context
*/
- glXWaitGL();
+ disp__glXWaitGL();
if(isOwnWindow)
{
@@ -469,14 +479,14 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj,
return JNI_FALSE;
}
- ctx = glXGetCurrentContext();
+ ctx = disp__glXGetCurrentContext();
if(ctx==(GLXContext)((PointerHolder)glContext))
return JNI_TRUE;
if(ret==JNI_TRUE)
{
- if( !glXMakeCurrent( (Display *)((PointerHolder)disp),
+ if( !disp__glXMakeCurrent( (Display *)((PointerHolder)disp),
(Window)((PointerHolder)thisWin),
(GLXContext)((PointerHolder)glContext) ) )
{
@@ -506,7 +516,7 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE)
{
- if( !glXMakeCurrent( (Display *)((PointerHolder)disp), None, NULL))
+ if( !disp__glXMakeCurrent( (Display *)((PointerHolder)disp), None, NULL))
{
fprintf(stderr, "GL4Java: gljFree failed\n");
fflush(stderr);
@@ -521,7 +531,7 @@ Java_gl4java_GLContext_gljIsContextCurrentNative( JNIEnv *env, jobject obj,
jlong glContext
)
{
- GLXContext ctx = glXGetCurrentContext();
+ GLXContext ctx = disp__glXGetCurrentContext();
if(ctx==(GLXContext)((PointerHolder)glContext))
return JNI_TRUE;
@@ -594,7 +604,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
else jownwind =(*env)->GetBooleanField(env, obj, fownwind);
}
- glXWaitGL();
+ disp__glXWaitGL();
if(ret==JNI_TRUE)
{
@@ -606,16 +616,16 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
fflush(stderr);
}
}
- glXMakeCurrent( disp, None, NULL );
+ disp__glXMakeCurrent( disp, None, NULL );
if(ret==JNI_TRUE)
{
if(gc!=0)
- glXDestroyContext(disp, gc);
+ disp__glXDestroyContext(disp, gc);
if(pix!=0)
{
if(win!=0)
- glXDestroyGLXPixmap(disp, win);
+ disp__glXDestroyGLXPixmap(disp, win);
win=0;
XFreePixmap(disp, pix);
}
@@ -675,9 +685,9 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
if( doubleBuffer == JNI_FALSE ) {
/* don't double buffer */
- glXWaitGL();
+ disp__glXWaitGL();
} else {
- glXSwapBuffers( (Display *)((PointerHolder)disp),
+ disp__glXSwapBuffers( (Display *)((PointerHolder)disp),
(Window)((PointerHolder)thisWin) );
}
@@ -685,3 +695,4 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
}
+
diff --git a/CNativeCode/OpenGL_X11_common.c b/CNativeCode/OpenGL_X11_common.c
index a23e8cf..0865866 100644
--- a/CNativeCode/OpenGL_X11_common.c
+++ b/CNativeCode/OpenGL_X11_common.c
@@ -33,551 +33,6 @@
#include "OpenGL_X11_common.h"
-/*
- * Name : get_GC
- *
- * Parameters: win - the X window use to the OpenGL context with
- * visual - The visual to create the context for
- * gc - a pointer to a GLXContext structure. This is how
- * the created context will be returned to the caller
- *
- * Returns : a pointer to a created GLXContext is returned through the
- * gc argument.
- * int - an error code: 0 means everything was fine
- * -1 context creation failed
- * -2 context/window association failed
- *
- * Purpose : create an X window Graphics context and assocaite it with
- * the window. It returns 0 if everything was fine, -1 if the
- * context could not be created, -2 if the context could not
- * be associated with the window
- */
-int LIBAPIENTRY get_GC( Display *display, Window win, XVisualInfo *visual,
- GLXContext *gc, GLXContext gc_share,
- jboolean verbose )
-{
- int trial = 2;
-
- while(trial>0)
- {
- switch(trial)
- {
- case 2:
- *gc = glXCreateContext( display, visual, gc_share, GL_TRUE );
- break;
- case 1:
- *gc = glXCreateContext( display, visual, gc_share, GL_FALSE );
- break;
- }
- trial--;
-
- /* check if the context could be created */
- if( *gc == NULL ) {
- continue;
- }
-
- /* associated the context with the X window */
- if( glXMakeCurrent( display, win, *gc ) == False) {
- glXDestroyContext( display, *gc );
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "GL4Java: glXCreateContext trial %p\n", *gc);
- fprintf(stderr, "GL4Java: glXDestroyContext trial %p\n", *gc);
- }
- continue;
- } else {
- if(JNI_TRUE==verbose)
- fprintf(stderr, "GL4Java: glXCreateContext sure %p\n", *gc);
- return 0;
- }
- }
-
- return -2;
-}
-
-
-int LIBAPIENTRY setVisualAttribListByGLCapabilities(
- int visualAttribList[/*>=32*/],
- GLCapabilities *glCaps )
-{
- int i=0;
- visualAttribList[i++] = GLX_RED_SIZE;
- visualAttribList[i++] = 1;
- visualAttribList[i++] = GLX_GREEN_SIZE;
- visualAttribList[i++] = 1;
- visualAttribList[i++] = GLX_BLUE_SIZE;
- visualAttribList[i++] = 1;
- visualAttribList[i++] = GLX_DEPTH_SIZE;
- visualAttribList[i++] = 1;
- visualAttribList[i++] = GLX_ACCUM_RED_SIZE;
- visualAttribList[i++] = (glCaps->accumRedBits>0)?1:0;
- visualAttribList[i++] = GLX_ACCUM_GREEN_SIZE;
- visualAttribList[i++] = (glCaps->accumGreenBits>0)?1:0;
- visualAttribList[i++] = GLX_ACCUM_BLUE_SIZE;
- visualAttribList[i++] = (glCaps->accumBlueBits>0)?1:0;
-
- if(COLOR_RGBA == glCaps->color)
- {
- visualAttribList[i++] = GLX_RGBA;
- visualAttribList[i++] = GLX_ALPHA_SIZE;
- visualAttribList[i++] = (glCaps->alphaBits>0)?1:0;
- visualAttribList[i++] = GLX_ACCUM_ALPHA_SIZE;
- visualAttribList[i++] = (glCaps->accumAlphaBits>0)?1:0;
- }
- if(BUFFER_DOUBLE==glCaps->buffer)
- visualAttribList[i++] = GLX_DOUBLEBUFFER;
-
- if(STEREO_ON==glCaps->stereo)
- visualAttribList[i++] = GLX_STEREO;
-
- visualAttribList[i++] = GLX_STENCIL_SIZE;
- visualAttribList[i++] = glCaps->stencilBits;
- visualAttribList[i] = None;
- return i;
-}
-
-
-/**
- * Description for pWin:
- * if ownwin:
- * input: the parent window
- * output: the newly created window
- * else if ! ownwin:
- * i/o: the window itself
- */
-VisualGC LIBAPIENTRY findVisualGlX( Display *display,
- Window rootWin,
- Window * pWin,
- int width, int height,
- GLCapabilities * glCaps,
- jboolean * pOwnWin,
- GLXContext shareWith,
- jboolean offscreen,
- Pixmap *pix,
- jboolean verbose
- )
-{
- Window newWin = 0;
- int visualAttribList[64];
- int j=0;
- int done=0;
- VisualGC vgc = { NULL, 0, 0 };
- jboolean tryChooseVisual = JNI_TRUE;
- int gc_ret = 0;
-
- /**
- * The Visual seeked by Function: findVisualIdByFeature !
- */
- XVisualInfo * visualList=NULL; /* the visual list, to be XFree-ed */
-
- /* backup ... */
- GLCapabilities _glCaps = *glCaps;
-
- if(JNI_TRUE==verbose)
- {
- fprintf(stdout, "GL4Java findVisualGlX: input capabilities:\n");
- printGLCapabilities ( glCaps );
- }
-
- do {
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "GL4Java: seeking visual loop# %d\n", j);
- }
-
- if(glCaps->nativeVisualID>=0)
- {
- vgc.visual = findVisualIdByID(&visualList,
- (int)(glCaps->nativeVisualID),
- display, *pWin, verbose);
- }
-
- if(vgc.visual==NULL)
- {
- glCaps->nativeVisualID=0;
- (void) setVisualAttribListByGLCapabilities(
- visualAttribList, glCaps);
- }
-
- if(tryChooseVisual==JNI_TRUE && vgc.visual==NULL)
- {
- vgc.visual = glXChooseVisual( display,
- DefaultScreen( display ),
- visualAttribList );
- if(JNI_TRUE==verbose)
- {
- if(vgc.visual!=NULL)
- {
- fprintf(stdout, "findVisualGlX.glXChooseVisual: found visual(ID:%d(0x%X))\n",
- (int) vgc.visual->visualid,
- (int) vgc.visual->visualid);
- } else {
- fprintf(stdout, "findVisualGlX.glXChooseVisual: no visual\n");
- }
- fflush(stdout);
- }
- }
-
- if(vgc.visual==NULL)
- {
- vgc.visual = findVisualIdByFeature( &visualList,
- display, *pWin,
- glCaps,
- verbose);
- }
-
- if( *pOwnWin == JNI_TRUE && vgc.visual!=NULL)
- {
- if(JNI_TRUE==verbose)
- {
- fprintf(stdout, "findVisualGlX: CREATING OWN WINDOW !\n");
- fflush(stdout);
- }
- newWin = createOwnOverlayWin(display,
- rootWin,
- *pWin /* the parent */,
- vgc.visual, width, height);
- }
-
- if( offscreen==JNI_TRUE && vgc.visual!=NULL)
- {
- if(*pix!=0)
- {
- XFreePixmap(display, *pix);
- }
- if(vgc.visual !=NULL)
- *pix = XCreatePixmap( display, rootWin, width, height,
- vgc.visual->depth);
- if(*pix!=0)
- {
- *pWin = glXCreateGLXPixmap( display, vgc.visual, *pix );
- if(*pWin==0)
- {
- XFreePixmap(display, *pix);
- *pix=0;
- fprintf(stderr, "GL4Java(%d): glXCreateGLXPixmap failed\n", j);
- fflush(stderr);
- }
- } else {
- fprintf(stderr, "GL4Java(%d): XCreatePixmap failed\n", j);
- fflush(stderr);
- *pWin = 0;
- }
- if(JNI_TRUE==verbose)
- {
- if(*pWin!=0)
- {
- fprintf(stderr, "GL4Java(%d): pixmap ok\n", j);
- fflush(stderr);
- }
- }
- }
-
- gc_ret = -100;
-
- if( *pOwnWin == JNI_TRUE && newWin!=0 &&
- (gc_ret=get_GC( display, newWin,
- vgc.visual, &(vgc.gc), shareWith, verbose)) == 0
- )
- {
- vgc.success=1;
- *pWin = newWin ;
- }
- else if( vgc.visual!=NULL && *pOwnWin == JNI_FALSE && *pWin!=0 &&
- (gc_ret=get_GC( display, *pWin,
- vgc.visual, &(vgc.gc), shareWith, verbose)) == 0
- )
- {
- vgc.success=1;
- } else
- {
- j++; /* trial counter */
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "GL4Java(%d): Visual fetching failed (gc_get=%d)\n", j, gc_ret);
- fflush(stderr);
- }
-
- if(*pix!=0)
- {
- XFreePixmap(display, *pix);
- *pix=0;
- }
-
- if(visualList!=NULL)
- {
- XFree(visualList);
- visualList=NULL;
- vgc.visual=NULL;
- } else if(vgc.visual!=NULL)
- {
- XFree(vgc.visual);
- vgc.visual=NULL;
- }
-
- /**
- * Falling-Back the exact (min. requirement) parameters ..
- */
- if(*pOwnWin==JNI_FALSE && offscreen==JNI_FALSE) {
- *glCaps=_glCaps;
- *pOwnWin=JNI_TRUE;
- } else if( (glCaps->accumRedBits>0 ||
- glCaps->accumGreenBits>0 ||
- glCaps->accumBlueBits>0 ||
- glCaps->accumAlphaBits>0
- ) && offscreen==JNI_TRUE
- )
- {
- glCaps->accumRedBits=0;
- glCaps->accumGreenBits=0;
- glCaps->accumBlueBits=0;
- glCaps->accumAlphaBits=0;
- } else if(glCaps->buffer==BUFFER_SINGLE &&
- offscreen==JNI_TRUE)
- {
- glCaps->buffer=BUFFER_DOUBLE;
- } else if(glCaps->stereo==STEREO_ON) {
- glCaps->stereo=STEREO_OFF;
- } else if(glCaps->stencilBits>32) {
- glCaps->stencilBits=32;
- } else if(glCaps->stencilBits>16) {
- glCaps->stencilBits=16;
- } else if(glCaps->stencilBits>8) {
- glCaps->stencilBits=8;
- } else if(glCaps->stencilBits>0) {
- glCaps->stencilBits=0;
- } else if(glCaps->buffer==BUFFER_DOUBLE) {
- glCaps->buffer=BUFFER_SINGLE;
- } else if(tryChooseVisual==JNI_TRUE) {
- *glCaps=_glCaps;
- *pOwnWin=JNI_FALSE;
- tryChooseVisual=JNI_FALSE;
- } else done=1;
- }
- } while (vgc.success==0 && done==0) ;
-
- if(vgc.success==1 && JNI_TRUE==verbose)
- {
- (void) setGLCapabilities (display, vgc.visual, glCaps);
-
- fprintf(stderr, "\nfindVisualGlX results vi(ID:%d): \n screen %d, depth %d, class %d,\n clrmapsz %d, bitsPerRGB %d, shared with %d\n",
- (int)vgc.visual->visualid,
- (int)vgc.visual->screen,
- (int)vgc.visual->depth,
- (int)vgc.visual->class,
- (int)vgc.visual->colormap_size,
- (int)vgc.visual->bits_per_rgb,
- (int)shareWith);
- printVisualInfo ( display, vgc.visual);
- }
-
- return vgc;
-}
-
-
-void LIBAPIENTRY printVisualInfo ( Display *display, XVisualInfo * vi)
-{
- GLCapabilities glCaps;
-
- setGLCapabilities ( display, vi, &glCaps);
-
- fprintf(stdout, "\nvi(ID:%d(0x%X)): \n screen %d, depth %d, class %d,\n clrmapsz %d, bitsPerRGB %d\n",
- (int) vi->visualid,
- (int) vi->visualid,
- (int) vi->screen,
- (int) vi->depth,
- (int) vi->class,
- (int) vi->colormap_size,
- (int) vi->bits_per_rgb );
-
- printGLCapabilities ( &glCaps );
-}
-
-void LIBAPIENTRY printAllVisualInfo ( Display *disp, Window win, jboolean verbose)
-{
- XVisualInfo * visualInfo=0;
- XVisualInfo * vi=0;
- XVisualInfo viTemplate;
- int i, numReturns;
- XWindowAttributes xwa;
-
- if(XGetWindowAttributes(disp, win, &xwa) == 0)
- {
- fprintf(stderr, "\nERROR while fetching XWindowAttributes\n");
- fflush(stderr);
- return;
- }
-
- viTemplate.screen = DefaultScreen( disp );
- viTemplate.class = (xwa.visual)->class ;
- viTemplate.depth = xwa.depth;
-
- visualInfo = XGetVisualInfo( disp, VisualScreenMask,
- &viTemplate, &numReturns );
-
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "\nNum of Visuals : %d\n", numReturns );
-
- for(i=0; i<numReturns; i++)
- {
- vi = &(visualInfo[i]);
- printVisualInfo ( disp, vi);
- }
- }
-
- XFree(visualInfo);
-}
-
-int LIBAPIENTRY testVisualInfo ( Display *display, XVisualInfo * vi,
- GLCapabilities *glCaps)
-{
- GLCapabilities _glCaps;
- setGLCapabilities ( display, vi, &_glCaps);
-
- if(_glCaps.buffer<glCaps->buffer) return 0;
-
- if(_glCaps.color<glCaps->color) return 0;
-
- if(_glCaps.stereo<glCaps->stereo) return 0;
-
- /*
- if(_glCaps.depthBits<glCaps->depthBits) return 0;
- */
-
- if(_glCaps.stencilBits<glCaps->stencilBits) return 0;
-
- /*
- if(_glCaps.redBits<glCaps->redBits) return 0;
-
- if(_glCaps.greenBits<glCaps->greenBits) return 0;
-
- if(_glCaps.blueBits<glCaps->blueBits) return 0;
- */
-
- if(_glCaps.accumRedBits<glCaps->accumRedBits) return 0;
-
- if(_glCaps.accumGreenBits<glCaps->accumGreenBits) return 0;
-
- if(_glCaps.accumBlueBits<glCaps->accumBlueBits) return 0;
-
- if(glCaps->color>0) {
- /*
- if(_glCaps.alphaBits<glCaps->alphaBits) return 0;
- */
- if(_glCaps.accumAlphaBits<glCaps->accumAlphaBits) return 0;
- }
-
- return 1;
-}
-
-
-XVisualInfo * LIBAPIENTRY findVisualIdByID( XVisualInfo ** visualList,
- int visualID, Display *disp,
- Window win, jboolean verbose)
-{
- XVisualInfo * vi=0;
- XVisualInfo viTemplate;
- int i, numReturns;
- XWindowAttributes xwa;
- int done=0;
-
- if(XGetWindowAttributes(disp, win, &xwa) == 0)
- {
- fprintf(stderr, "\nERROR while fetching XWindowAttributes\n");
- fflush(stderr);
- return 0;
- }
-
- viTemplate.screen = DefaultScreen( disp );
- viTemplate.class = (xwa.visual)->class ;
- viTemplate.depth = xwa.depth;
-
- *visualList = XGetVisualInfo( disp, VisualScreenMask,
- &viTemplate, &numReturns );
-
- for(i=0; done==0 && i<numReturns; i++)
- {
- vi = &((*visualList)[i]);
-
- if(vi->visualid==visualID)
- {
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "findVisualIdByID: Found matching Visual:\n");
- printVisualInfo ( disp, vi);
- }
- return vi;
- }
- }
-
- if(JNI_TRUE==verbose)
- {
- if( numReturns==0 )
- fprintf(stderr, "findVisualIdByID: No available visuals. Exiting...\n" );
- else if( i>=numReturns )
- fprintf(stderr, "findVisualIdByID: No matching visualID found ...\n" );
- fflush(stderr);
- }
-
- XFree(*visualList);
- *visualList=NULL;
- return NULL;
-}
-XVisualInfo * LIBAPIENTRY findVisualIdByFeature( XVisualInfo ** visualList,
- Display *disp, Window win,
- GLCapabilities *glCaps,
- jboolean verbose)
-{
- XVisualInfo * vi=0;
- XVisualInfo viTemplate;
- int i, numReturns;
- XWindowAttributes xwa;
- int done=0;
-
- if(XGetWindowAttributes(disp, win, &xwa) == 0)
- {
- fprintf(stderr, "\nERROR while fetching XWindowAttributes\n");
- fflush(stderr);
- return 0;
- }
-
- viTemplate.screen = DefaultScreen( disp );
- viTemplate.class = (xwa.visual)->class ;
- viTemplate.depth = xwa.depth;
-
- *visualList = XGetVisualInfo( disp, VisualScreenMask,
- &viTemplate, &numReturns );
-
- for(i=0; done==0 && i<numReturns; i++)
- {
- vi = &((*visualList)[i]);
- if ( testVisualInfo ( disp, vi, glCaps ) )
- {
- if(JNI_TRUE==verbose)
- {
- fprintf(stderr, "findVisualIdByFeature: Found matching Visual:\n");
- printVisualInfo ( disp, vi);
- }
- return vi;
- }
- }
-
- if(JNI_TRUE==verbose)
- {
- if( numReturns==0 )
- fprintf(stderr, "findVisualIdByFeature: No available visuals. Exiting...\n" );
- else if( i>=numReturns )
- fprintf(stderr, "findVisualIdByFeature: No matching visual found ...\n" );
- fflush(stderr);
- }
-
- XFree(*visualList);
- *visualList=NULL;
- return NULL;
-}
-
-
jboolean LIBAPIENTRY testX11Java()
{
jboolean ret=JNI_TRUE;
@@ -612,165 +67,3 @@ jboolean LIBAPIENTRY testX11Java()
return ret;
}
-jboolean LIBAPIENTRY setGLCapabilities ( Display * disp,
- XVisualInfo * visual, GLCapabilities *glCaps)
-{
- int iValue=0;
- int iValue1=0;
- int iValue2=0;
- int iValue3=0;
-
- if(glXGetConfig( disp, visual, GLX_DOUBLEBUFFER, &iValue)==0)
- {
- glCaps->buffer=iValue?BUFFER_DOUBLE:BUFFER_SINGLE;
- } else {
- fprintf(stderr,"GL4Java: fetching doubleBuffer state failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig( disp, visual, GLX_RGBA, &iValue)==0)
- {
- glCaps->color=iValue?COLOR_RGBA:COLOR_INDEX;
- } else {
- fprintf(stderr,"GL4Java: fetching rgba state failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig( disp, visual, GLX_STEREO, &iValue)==0)
- {
- glCaps->stereo=iValue?STEREO_ON:STEREO_OFF;
- } else {
- fprintf(stderr,"GL4Java: fetching stereoView state failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig( disp, visual, GLX_DEPTH_SIZE, &iValue)==0)
- {
- glCaps->depthBits = iValue;
- } else {
- fprintf(stderr,"GL4Java: fetching depthBits state failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig( disp, visual, GLX_STENCIL_SIZE, &iValue)==0)
- {
- glCaps->stencilBits = iValue;
- } else {
- fprintf(stderr,"GL4Java: fetching stencilBits state failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig(disp,visual,GLX_RED_SIZE, &iValue)==0 &&
- glXGetConfig(disp,visual,GLX_GREEN_SIZE, &iValue1)==0 &&
- glXGetConfig(disp,visual,GLX_BLUE_SIZE, &iValue2)==0 &&
- glXGetConfig(disp,visual,GLX_ALPHA_SIZE, &iValue3)==0 )
- {
- glCaps->redBits = iValue;
- glCaps->greenBits= iValue1;
- glCaps->blueBits= iValue2;
- glCaps->alphaBits= iValue3;
- } else {
- fprintf(stderr,"GL4Java: fetching rgba Size states failed\n");
- fflush(stderr);
- }
-
- if(glXGetConfig(disp,visual,GLX_ACCUM_RED_SIZE, &iValue)==0 &&
- glXGetConfig(disp,visual,GLX_ACCUM_GREEN_SIZE, &iValue1)==0 &&
- glXGetConfig(disp,visual,GLX_ACCUM_BLUE_SIZE, &iValue2)==0 &&
- glXGetConfig(disp,visual,GLX_ACCUM_ALPHA_SIZE, &iValue3)==0 )
- {
- glCaps->accumRedBits = iValue;
- glCaps->accumGreenBits= iValue1;
- glCaps->accumBlueBits= iValue2;
- glCaps->accumAlphaBits= iValue3;
- } else {
- fprintf(stderr,"GL4Java: fetching rgba AccumSize states failed\n");
- fflush(stderr);
- }
- glCaps->nativeVisualID=(long)visual->visualid;
-
- return JNI_TRUE;
-}
-
-
-int LIBAPIENTRY x11gl_myErrorHandler(Display *pDisp, XErrorEvent *p_error)
-{
- char err_msg[80];
-
- XGetErrorText(pDisp, p_error->error_code, err_msg, 80);
- fprintf(stderr, "X11 Error detected.\n %s\n", err_msg);
- fprintf(stderr, " Protocol request: %d\n", p_error->request_code);
- fprintf(stderr, " Resource ID : 0x%x\n", (int)p_error->resourceid);
- fprintf(stderr, " \ntrying to continue ... \n");
- fflush(stderr);
- return 0;
-}
-
-int LIBAPIENTRY x11gl_myIOErrorHandler(Display *pDisp)
-{
- fprintf(stderr, "X11 I/O Error detected.\n");
- fprintf(stderr, " \ndo not know what to do ... \n");
- fflush(stderr);
- return 0;
-}
-
-Window LIBAPIENTRY createOwnOverlayWin(Display *display, Window rootwini, Window parentWin,
- XVisualInfo *visual, int width, int height)
-{
- /*
- //------------------------------------------------------------------------//
- // Some Systems (SGI) wont give up the window and so we have to create a //
- // window that fits on top of the Java Canvas. //
- //------------------------------------------------------------------------//
- */
- Window window=0;
- XSetWindowAttributes attribs ;
-
- /*
- //----------------------------------------------------------------------//
- // now we have the visual with the best depth so lets make a color map //
- // for it. we use allocnone because this is a true colour visual and //
- // the color map is read only anyway. This must be done because we //
- // cannot call XCreateSimpleWindow. //
- //----------------------------------------------------------------------//
- */
- int cmap = XCreateColormap ( display
- , rootwini
- , visual->visual
- , AllocNone
- );
-
- /*
- //----------------------------------------------------------------------//
- // Set up the window attributes. //
- //----------------------------------------------------------------------//
- */
- attribs.event_mask = ExposureMask ;
- attribs.border_pixel = BlackPixel(display, DefaultScreen(display)) ;
- attribs.colormap = cmap ;
- attribs.bit_gravity = SouthWestGravity ; ;
- attribs.background_pixel = 0xFF00FFFF ;
-
- /*
- //----------------------------------------------------------------------//
- // Create a window. //
- //----------------------------------------------------------------------//
- */
- window = XCreateWindow( display
- , parentWin
- , 0
- , 0
- , width
- , height
- , 0
- , visual->depth
- , InputOutput
- , visual->visual
- , CWBitGravity | CWColormap
- | CWBorderPixel | CWBackPixel
- , &attribs);
-
- return window;
-}
-
-
diff --git a/CNativeCode/OpenGL_X11_common.h b/CNativeCode/OpenGL_X11_common.h
index 1bb39c4..9a86f68 100644
--- a/CNativeCode/OpenGL_X11_common.h
+++ b/CNativeCode/OpenGL_X11_common.h
@@ -12,77 +12,12 @@
#include "OpenGL_misc.h"
- #include <X11/Xlib.h>
- #include <X11/Xutil.h>
-
- #include <GL/glx.h>
- #include <X11/Xatom.h>
-
- typedef struct {
- XVisualInfo * visual;
- GLXContext gc;
- int success; /* 1: OK, 0: ERROR */
- } VisualGC;
-
-
- /*
- * prototypes for functions local to this file scope
- */
- LIBAPI int LIBAPIENTRY get_GC( Display *display, Window win,
- XVisualInfo *visual,
- GLXContext *gc, GLXContext gc_share,
- jboolean verbose );
-
- LIBAPI int LIBAPIENTRY setVisualAttribListByGLCapabilities(
- int visualAttribList[/*>=32*/],
- GLCapabilities *glCaps );
+ #include "glxtool.h"
- LIBAPI VisualGC LIBAPIENTRY findVisualGlX( Display *display,
- Window rootWin,
- Window * pWin,
- int width, int height,
- GLCapabilities *glCaps,
- jboolean * pOwnWin,
- GLXContext shareWith,
- jboolean offscreen,
- Pixmap *pix,
- jboolean verbose
- );
-
- LIBAPI void LIBAPIENTRY printVisualInfo ( Display *display, XVisualInfo * vi);
- LIBAPI void LIBAPIENTRY printAllVisualInfo ( Display *disp, Window win,
- jboolean verbose);
-
- LIBAPI int LIBAPIENTRY testVisualInfo ( Display *display, XVisualInfo * vi,
- GLCapabilities *glCaps);
-
- LIBAPI XVisualInfo * LIBAPIENTRY findVisualIdByID( XVisualInfo ** visualList,
- int visualID, Display *disp,
- Window win, jboolean verbose);
-
- LIBAPI XVisualInfo * LIBAPIENTRY findVisualIdByFeature(
- XVisualInfo ** visualList,
- Display *disp, Window win,
- GLCapabilities *glCaps,
- jboolean verbose);
-
/* testX11Java does important implementation plattformspecific checks:
*
* o do fit X11-Vars in jint (because GLFrame stores 'em like that)
*/
LIBAPI jboolean LIBAPIENTRY testX11Java();
- LIBAPI jboolean LIBAPIENTRY setGLCapabilities ( Display * disp,
- XVisualInfo * visual, GLCapabilities *glCaps);
-
- LIBAPI int LIBAPIENTRY x11gl_myErrorHandler(
- Display *pDisp, XErrorEvent *p_error);
-
- LIBAPI int LIBAPIENTRY x11gl_myIOErrorHandler(Display *pDisp);
-
- LIBAPI Window LIBAPIENTRY createOwnOverlayWin(
- Display *display,
- Window rootwini, Window parentWin,
- XVisualInfo *visual, int width, int height);
-
#endif
diff --git a/CNativeCode/OpenGL_X11_jawt.c b/CNativeCode/OpenGL_X11_jawt.c
index 995e31a..bb91c5c 100644
--- a/CNativeCode/OpenGL_X11_jawt.c
+++ b/CNativeCode/OpenGL_X11_jawt.c
@@ -169,7 +169,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
jfieldID fcreatewinw = 0, fcreatewinh = 0;
jfieldID fshareWith = 0;
jboolean joffScreenRenderer=JNI_FALSE;
- jboolean jownwind = JNI_FALSE ;
+ jboolean jb_value;
+ int ownwind = 0 ;
jint jcreatewinw = 0, jcreatewinh = 0;
GLXContext jshareWith = 0;
@@ -275,7 +276,10 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE) {
fownwind = (*env)->GetFieldID(env, cls, "createOwnWindow", "Z");
if (fownwind == 0) ret= JNI_FALSE;
- else jownwind =(*env)->GetBooleanField(env, obj, fownwind);
+ else {
+ jb_value =(*env)->GetBooleanField(env, obj, fownwind);
+ ownwind = (jb_value==JNI_TRUE)?1:0;
+ }
}
if(ret==JNI_TRUE) {
@@ -303,7 +307,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
if(joffScreenRenderer==JNI_TRUE)
{
- jownwind = JNI_FALSE;
+ ownwind = 0;
}
if(ret==JNI_TRUE) {
@@ -425,7 +429,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
/* Check to see if the Xserver supports OpenGL */
if(ret==JNI_TRUE) {
- if( !glXQueryExtension(display, (int *) 0, (int *) 0) ) {
+ if( !disp__glXQueryExtension(display, (int *) 0, (int *) 0) ) {
fprintf(stderr, "GL4Java ERROR: Can not query glx extension -> Server does not support OpenGL\n");
fflush(stderr);
jawt_free_close_unlock(env, &pData, JNI_FALSE);
@@ -433,8 +437,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
} else {
if (JNI_TRUE==verbose) {
fprintf(stdout, "GLX by %s Version %s\n",
- glXGetClientString(display, GLX_VENDOR),
- glXGetClientString(display, GLX_VERSION));
+ disp__glXGetClientString(display, GLX_VENDOR),
+ disp__glXGetClientString(display, GLX_VERSION));
fflush(stdout);
}
}
@@ -446,12 +450,14 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
screen = DefaultScreen( display );
rootwini = RootWindow(display,screen) ;
- glXMakeCurrent(display, None, NULL);
+ disp__glXMakeCurrent(display, None, NULL);
vgc = findVisualGlX( display, rootwini, &theWindow,
(int)jcreatewinw, (int)jcreatewinh,
- &glCaps,
- &jownwind, jshareWith,
+ &glCaps, &ownwind,
+ NULL /* pOwnWinAttr */,
+ 0 /* ownWinmask */,
+ jshareWith,
joffScreenRenderer, &pix, verbose);
if(vgc.success == 0 && glCaps.color==COLOR_RGBA)
@@ -464,8 +470,10 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
vgc = findVisualGlX( display, rootwini, &theWindow,
(int)jcreatewinw, (int)jcreatewinh,
- &glCaps,
- &jownwind, jshareWith,
+ &glCaps, &ownwind,
+ NULL /* pOwnWinAttr */,
+ 0 /* ownWinmask */,
+ jshareWith,
joffScreenRenderer, &pix, verbose);
}
@@ -474,7 +482,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
fprintf(stderr,"GL4Java ERROR: GETTING GC FAILED\n");
fflush(stderr);
- if(jownwind==JNI_TRUE && theWindow!=0)
+ if(ownwind && theWindow!=0)
XDestroyWindow( display, theWindow );
if(joffScreenRenderer==JNI_TRUE && pix!=0)
XFreePixmap(display, pix);
@@ -482,7 +490,7 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
jawt_free_close_unlock(env, &pData, JNI_FALSE);
ret = JNI_FALSE;
} else {
- if(jownwind==JNI_TRUE || joffScreenRenderer==JNI_TRUE)
+ if(ownwind || joffScreenRenderer==JNI_TRUE)
{
pData->dsi_win=(void *)(PointerHolder)theWindow;
pData->dsi_win_created=1;
@@ -536,7 +544,8 @@ Java_gl4java_GLContext_openOpenGLNative( JNIEnv *env, jobject obj,
}
if(ret==JNI_TRUE && fownwind) {
- (*env)->SetBooleanField(env, obj, fownwind, jownwind);
+ jb_value = ownwind?JNI_TRUE:JNI_FALSE;
+ (*env)->SetBooleanField(env, obj, fownwind, jb_value);
}
return ret;
@@ -552,7 +561,7 @@ Java_gl4java_GLContext_gljResizeNative( JNIEnv *env, jobject obj,
* by a native Thread .... So we have to try avoid gl* reentrance
* on the same GL-Context
*/
- glXWaitGL();
+ disp__glXWaitGL();
if(isOwnWindow)
{
@@ -628,11 +637,11 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj,
return ret;
}
- ctx = glXGetCurrentContext();
+ ctx = disp__glXGetCurrentContext();
if(ret==JNI_TRUE && ctx!=(GLXContext)((PointerHolder)glContext) )
{
- if( !glXMakeCurrent( GET_USED_DISPLAY(thisWin),
+ if( !disp__glXMakeCurrent( GET_USED_DISPLAY(thisWin),
GET_USED_WINDOW(thisWin),
(GLXContext)((PointerHolder)glContext) ) )
{
@@ -664,7 +673,7 @@ Java_gl4java_GLContext_gljFreeNative( JNIEnv *env, jobject obj,
if(ret==JNI_TRUE)
{
- if( !glXMakeCurrent( GET_USED_DISPLAY(thisWin),
+ if( !disp__glXMakeCurrent( GET_USED_DISPLAY(thisWin),
None, NULL))
{
fprintf(stderr, "GL4Java: gljFree failed\n");
@@ -683,7 +692,7 @@ Java_gl4java_GLContext_gljIsContextCurrentNative( JNIEnv *env, jobject obj,
jlong glContext
)
{
- GLXContext ctx = glXGetCurrentContext();
+ GLXContext ctx = disp__glXGetCurrentContext();
if(ctx==(GLXContext)((PointerHolder)glContext))
return JNI_TRUE;
@@ -794,7 +803,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
win = GET_USED_WINDOW(pData);
disp = GET_USED_DISPLAY(pData);
- glXWaitGL();
+ disp__glXWaitGL();
if(ret==JNI_TRUE)
{
@@ -806,7 +815,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
fflush(stderr);
}
}
- glXMakeCurrent( disp, None, NULL );
+ disp__glXMakeCurrent( disp, None, NULL );
if(ret==JNI_TRUE)
{
@@ -814,12 +823,12 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
{
if(JNI_TRUE==verbose)
fprintf(stderr, "GL4Java: glXDestroyContext sure %p\n", gc);
- glXDestroyContext(disp, gc);
+ disp__glXDestroyContext(disp, gc);
}
if(pix!=0)
{
if(win!=0)
- glXDestroyGLXPixmap(disp, win);
+ disp__glXDestroyGLXPixmap(disp, win);
win=0;
pData->dsi_win = NULL;
pData->dsi_win_created = 0;
@@ -887,9 +896,9 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
if( doubleBuffer == JNI_FALSE ) {
/* don't double buffer */
- glXWaitGL();
+ disp__glXWaitGL();
} else {
- glXSwapBuffers( GET_USED_DISPLAY(thisWin),
+ disp__glXSwapBuffers( GET_USED_DISPLAY(thisWin),
GET_USED_WINDOW(thisWin) );
}
@@ -897,3 +906,4 @@ Java_gl4java_GLContext_gljSwapNative( JNIEnv *env, jobject obj,
}
+
diff --git a/CNativeCode/OpenGL_misc.c b/CNativeCode/OpenGL_misc.c
index 201a048..8d08843 100644
--- a/CNativeCode/OpenGL_misc.c
+++ b/CNativeCode/OpenGL_misc.c
@@ -5,11 +5,17 @@
#ifdef _X11_
#include <GL/glx.h>
#include <dlfcn.h>
+ #include "glxtool.h"
#endif
+
+#ifdef _WIN32_
+ #include "wgltool.h"
+#endif
-#ifdef macintosh
+#include <string.h>
+
+#ifdef _MAC_OS9_
#include <agl.h>
- #include <string.h>
#include <CodeFragments.h>
#include <Errors.h>
#include <TextUtils.h>
@@ -21,7 +27,7 @@
static const char * _lib_version_= __LIB_VERSION__ ;
-#ifdef macintosh
+#ifdef _MAC_OS9_
static const char * _lib_vendor_ = "Jausoft - Sven Goethel Software Development & Gerard Ziemski";
#else
static const char * _lib_vendor_ = "Jausoft - Sven Goethel Software Development";
@@ -31,6 +37,50 @@ static const char * _lib_version_= __LIB_VERSION__ ;
#define CALLBACK
#endif
+char libGLName[800] =
+#ifdef _X11_
+ "libGL.so"
+#endif
+#ifdef _WIN32_
+ "OPENGL32.DLL"
+#endif
+#ifdef _MAC_OS9_
+ "\pOpenGLLibrary"
+#endif
+#ifdef _MAC_OSX_
+ "libGL.so"
+#endif
+;
+
+char libGLUName[800] =
+#ifdef _X11_
+ "libGLU.so"
+#endif
+#ifdef _WIN32_
+ "GLU32.DLL"
+#endif
+#ifdef _MAC_OS9_
+ "\pOpenGLULibrary"
+#endif
+#ifdef _MAC_OSX_
+ "libGLU.so"
+#endif
+;
+
+#ifdef J_GET_BOOL_FIELD
+ #undef J_GET_BOOL_FIELD
+#endif
+#define J_GET_BOOL_FIELD(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "Z"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; }
+
+#ifdef J_GET_BOOL_FIELD_VAL
+ #undef J_GET_BOOL_FIELD_VAL
+#endif
+#define J_GET_BOOL_FIELD_VAL(ATTRIBUTE_NAME, ATTRIBUTE_NAME_STR) if(ok==JNI_TRUE) { f ## ATTRIBUTE_NAME = (*env)->GetFieldID(env, cls, ATTRIBUTE_NAME_STR, "Z"); if ( f ## ATTRIBUTE_NAME == 0) ok= JNI_FALSE; else glCaps-> ## ATTRIBUTE_NAME = (int) ((*env)->GetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME)); }
+
+#ifdef J_SET_BOOL_FIELD_VAL
+ #undef J_SET_BOOL_FIELD_VAL
+#endif
+#define J_SET_BOOL_FIELD_VAL(ATTRIBUTE_NAME) if(ok==JNI_TRUE && f ## ATTRIBUTE_NAME!=0) { (*env)->SetBooleanField(env, capsObj, f ## ATTRIBUTE_NAME, (jboolean) glCaps-> ## ATTRIBUTE_NAME); }
#ifdef J_GET_INT_FIELD
#undef J_GET_INT_FIELD
@@ -141,6 +191,7 @@ jboolean LIBAPIENTRY javaGLCapabilities2NativeGLCapabilities
J_GET_INT_FIELD_VAL(accumBlueBits, "accumBlueBits")
J_GET_INT_FIELD_VAL(accumAlphaBits, "accumAlphaBits")
J_GET_LONG_FIELD_VAL(nativeVisualID, "nativeVisualID")
+ glCaps->gl_supported=1;
if(JNI_TRUE!=ok)
{
@@ -255,26 +306,6 @@ jboolean LIBAPIENTRY nativeGLCapabilities2JavaGLCapabilities
return JNI_TRUE;
}
-void LIBAPIENTRY printGLCapabilities ( GLCapabilities *glCaps )
-{
- fprintf(stdout, "\t doubleBuff: %d, ", (int)glCaps->buffer);
- fprintf(stdout, " rgba: %d, ", (int)glCaps->color);
- fprintf(stdout, " stereo: %d, ", (int)glCaps->stereo);
- fprintf(stdout, " depthSize: %d, ", (int)glCaps->depthBits);
- fprintf(stdout, " stencilSize: %d !\n", (int)glCaps->stencilBits);
- fprintf(stdout, "\t red: %d, ", (int)glCaps->redBits);
- fprintf(stdout, " green: %d, ", (int)glCaps->greenBits);
- fprintf(stdout, " blue: %d, ", (int)glCaps->blueBits);
- fprintf(stdout, " alpha: %d !\n", (int)glCaps->alphaBits);
- fprintf(stdout, "\t red accum: %d, ", (int)glCaps->accumRedBits);
- fprintf(stdout, " green accum: %d, ", (int)glCaps->accumGreenBits);
- fprintf(stdout, " blue accum: %d, ", (int)glCaps->accumBlueBits);
- fprintf(stdout, " alpha accum: %d !\n", (int)glCaps->accumAlphaBits);
- fprintf(stdout, "\t nativeVisualID: %ld !\n", (long)glCaps->nativeVisualID);
-
- fflush(stdout);
-}
-
jboolean LIBAPIENTRY testJavaGLTypes(jboolean verbose)
{
jboolean ret=JNI_TRUE;
@@ -509,58 +540,58 @@ Java_gl4java_GLContext_gljReadPixelGL2AWT__IIIIIII_3B (
&isCopiedArray);
/* Save current modes. */
- glGetIntegerv(GL_PACK_SWAP_BYTES, &swapbytes);
- glGetIntegerv(GL_PACK_LSB_FIRST, &lsbfirst);
- glGetIntegerv(GL_PACK_ROW_LENGTH, &rowlength);
- glGetIntegerv(GL_PACK_SKIP_ROWS, &skiprows);
- glGetIntegerv(GL_PACK_SKIP_PIXELS, &skippixels);
- glGetIntegerv(GL_PACK_ALIGNMENT, &alignment);
- glGetIntegerv(GL_UNPACK_SWAP_BYTES, &unswapbytes);
- glGetIntegerv(GL_UNPACK_LSB_FIRST, &unlsbfirst);
- glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unrowlength);
- glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unskiprows);
- glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unskippixels);
- glGetIntegerv(GL_UNPACK_ALIGNMENT, &unalignment);
+ disp__glGetIntegerv(GL_PACK_SWAP_BYTES, &swapbytes);
+ disp__glGetIntegerv(GL_PACK_LSB_FIRST, &lsbfirst);
+ disp__glGetIntegerv(GL_PACK_ROW_LENGTH, &rowlength);
+ disp__glGetIntegerv(GL_PACK_SKIP_ROWS, &skiprows);
+ disp__glGetIntegerv(GL_PACK_SKIP_PIXELS, &skippixels);
+ disp__glGetIntegerv(GL_PACK_ALIGNMENT, &alignment);
+ disp__glGetIntegerv(GL_UNPACK_SWAP_BYTES, &unswapbytes);
+ disp__glGetIntegerv(GL_UNPACK_LSB_FIRST, &unlsbfirst);
+ disp__glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unrowlength);
+ disp__glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unskiprows);
+ disp__glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unskippixels);
+ disp__glGetIntegerv(GL_UNPACK_ALIGNMENT, &unalignment);
/* Little endian machines (DEC Alpha, Inten X86, PPC(in LSB mode)...
for example) could benefit from setting
GL_PACK_LSB_FIRST to GL_TRUE
instead of GL_FALSE, but this would require changing the
generated bitmaps too. */
- glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
- glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
- glPixelStorei(GL_PACK_ROW_LENGTH, width);
- glPixelStorei(GL_PACK_SKIP_ROWS, 0);
- glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ disp__glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
+ disp__glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
+ disp__glPixelStorei(GL_PACK_ROW_LENGTH, width);
+ disp__glPixelStorei(GL_PACK_SKIP_ROWS, 0);
+ disp__glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
+ disp__glPixelStorei(GL_PACK_ALIGNMENT, 1);
+ disp__glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
+ disp__glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
+ disp__glPixelStorei(GL_UNPACK_ROW_LENGTH, width);
+ disp__glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+ disp__glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+ disp__glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
/* Actually read the pixels. */
- glReadBuffer(bufferName);
- glReadPixels(xpos, ypos, width, height, format, type,
+ disp__glReadBuffer(bufferName);
+ disp__glReadPixels(xpos, ypos, width, height, format, type,
pixelGLDestData);
/* Restore saved modes. */
- glPixelStorei(GL_PACK_SWAP_BYTES, swapbytes);
- glPixelStorei(GL_PACK_LSB_FIRST, lsbfirst);
- glPixelStorei(GL_PACK_ROW_LENGTH, rowlength);
- glPixelStorei(GL_PACK_SKIP_ROWS, skiprows);
- glPixelStorei(GL_PACK_SKIP_PIXELS, skippixels);
- glPixelStorei(GL_PACK_ALIGNMENT, alignment);
- glPixelStorei(GL_UNPACK_SWAP_BYTES, unswapbytes);
- glPixelStorei(GL_UNPACK_LSB_FIRST, unlsbfirst);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, unrowlength);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, unskiprows);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, unskippixels);
- glPixelStorei(GL_UNPACK_ALIGNMENT, unalignment);
-
- glFlush();
- glFinish();
+ disp__glPixelStorei(GL_PACK_SWAP_BYTES, swapbytes);
+ disp__glPixelStorei(GL_PACK_LSB_FIRST, lsbfirst);
+ disp__glPixelStorei(GL_PACK_ROW_LENGTH, rowlength);
+ disp__glPixelStorei(GL_PACK_SKIP_ROWS, skiprows);
+ disp__glPixelStorei(GL_PACK_SKIP_PIXELS, skippixels);
+ disp__glPixelStorei(GL_PACK_ALIGNMENT, alignment);
+ disp__glPixelStorei(GL_UNPACK_SWAP_BYTES, unswapbytes);
+ disp__glPixelStorei(GL_UNPACK_LSB_FIRST, unlsbfirst);
+ disp__glPixelStorei(GL_UNPACK_ROW_LENGTH, unrowlength);
+ disp__glPixelStorei(GL_UNPACK_SKIP_ROWS, unskiprows);
+ disp__glPixelStorei(GL_UNPACK_SKIP_PIXELS, unskippixels);
+ disp__glPixelStorei(GL_UNPACK_ALIGNMENT, unalignment);
+
+ disp__glFlush();
+ disp__glFinish();
(*env)->ReleaseByteArrayElements(env,
pixelGLDest, pixelGLDestData,
@@ -614,54 +645,54 @@ Java_gl4java_GLContext_gljReadPixelGL2AWT__IIIIIII_3B_3I (
&isCopiedArray1);
/* Save current modes. */
- glGetIntegerv(GL_PACK_SWAP_BYTES, &swapbytes);
- glGetIntegerv(GL_PACK_LSB_FIRST, &lsbfirst);
- glGetIntegerv(GL_PACK_ROW_LENGTH, &rowlength);
- glGetIntegerv(GL_PACK_SKIP_ROWS, &skiprows);
- glGetIntegerv(GL_PACK_SKIP_PIXELS, &skippixels);
- glGetIntegerv(GL_PACK_ALIGNMENT, &alignment);
- glGetIntegerv(GL_UNPACK_SWAP_BYTES, &unswapbytes);
- glGetIntegerv(GL_UNPACK_LSB_FIRST, &unlsbfirst);
- glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unrowlength);
- glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unskiprows);
- glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unskippixels);
- glGetIntegerv(GL_UNPACK_ALIGNMENT, &unalignment);
+ disp__glGetIntegerv(GL_PACK_SWAP_BYTES, &swapbytes);
+ disp__glGetIntegerv(GL_PACK_LSB_FIRST, &lsbfirst);
+ disp__glGetIntegerv(GL_PACK_ROW_LENGTH, &rowlength);
+ disp__glGetIntegerv(GL_PACK_SKIP_ROWS, &skiprows);
+ disp__glGetIntegerv(GL_PACK_SKIP_PIXELS, &skippixels);
+ disp__glGetIntegerv(GL_PACK_ALIGNMENT, &alignment);
+ disp__glGetIntegerv(GL_UNPACK_SWAP_BYTES, &unswapbytes);
+ disp__glGetIntegerv(GL_UNPACK_LSB_FIRST, &unlsbfirst);
+ disp__glGetIntegerv(GL_UNPACK_ROW_LENGTH, &unrowlength);
+ disp__glGetIntegerv(GL_UNPACK_SKIP_ROWS, &unskiprows);
+ disp__glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &unskippixels);
+ disp__glGetIntegerv(GL_UNPACK_ALIGNMENT, &unalignment);
/* Little endian machines (DEC Alpha, Inten X86, PPC(in LSB mode)...
for example) could benefit from setting
GL_PACK_LSB_FIRST to GL_TRUE
instead of GL_FALSE, but this would require changing the
generated bitmaps too. */
- glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
- glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
- glPixelStorei(GL_PACK_ROW_LENGTH, width);
- glPixelStorei(GL_PACK_SKIP_ROWS, 0);
- glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
- glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ disp__glPixelStorei(GL_PACK_SWAP_BYTES, GL_FALSE);
+ disp__glPixelStorei(GL_PACK_LSB_FIRST, GL_TRUE);
+ disp__glPixelStorei(GL_PACK_ROW_LENGTH, width);
+ disp__glPixelStorei(GL_PACK_SKIP_ROWS, 0);
+ disp__glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
+ disp__glPixelStorei(GL_PACK_ALIGNMENT, 1);
+ disp__glPixelStorei(GL_UNPACK_SWAP_BYTES, GL_FALSE);
+ disp__glPixelStorei(GL_UNPACK_LSB_FIRST, GL_TRUE);
+ disp__glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+ disp__glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+ disp__glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+ disp__glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
/* Actually read the pixels. */
- glReadBuffer(bufferName);
- glReadPixels(xpos, ypos, width, height, format, type, pixelGLData);
+ disp__glReadBuffer(bufferName);
+ disp__glReadPixels(xpos, ypos, width, height, format, type, pixelGLData);
/* Restore saved modes. */
- glPixelStorei(GL_PACK_SWAP_BYTES, swapbytes);
- glPixelStorei(GL_PACK_LSB_FIRST, lsbfirst);
- glPixelStorei(GL_PACK_ROW_LENGTH, rowlength);
- glPixelStorei(GL_PACK_SKIP_ROWS, skiprows);
- glPixelStorei(GL_PACK_SKIP_PIXELS, skippixels);
- glPixelStorei(GL_PACK_ALIGNMENT, alignment);
- glPixelStorei(GL_UNPACK_SWAP_BYTES, unswapbytes);
- glPixelStorei(GL_UNPACK_LSB_FIRST, unlsbfirst);
- glPixelStorei(GL_UNPACK_ROW_LENGTH, unrowlength);
- glPixelStorei(GL_UNPACK_SKIP_ROWS, unskiprows);
- glPixelStorei(GL_UNPACK_SKIP_PIXELS, unskippixels);
- glPixelStorei(GL_UNPACK_ALIGNMENT, unalignment);
+ disp__glPixelStorei(GL_PACK_SWAP_BYTES, swapbytes);
+ disp__glPixelStorei(GL_PACK_LSB_FIRST, lsbfirst);
+ disp__glPixelStorei(GL_PACK_ROW_LENGTH, rowlength);
+ disp__glPixelStorei(GL_PACK_SKIP_ROWS, skiprows);
+ disp__glPixelStorei(GL_PACK_SKIP_PIXELS, skippixels);
+ disp__glPixelStorei(GL_PACK_ALIGNMENT, alignment);
+ disp__glPixelStorei(GL_UNPACK_SWAP_BYTES, unswapbytes);
+ disp__glPixelStorei(GL_UNPACK_LSB_FIRST, unlsbfirst);
+ disp__glPixelStorei(GL_UNPACK_ROW_LENGTH, unrowlength);
+ disp__glPixelStorei(GL_UNPACK_SKIP_ROWS, unskiprows);
+ disp__glPixelStorei(GL_UNPACK_SKIP_PIXELS, unskippixels);
+ disp__glPixelStorei(GL_UNPACK_ALIGNMENT, unalignment);
for(y_desc=height-1; y_desc>=0; y_desc--)
{
@@ -779,304 +810,59 @@ Java_gl4java_GLContext_gljCpyOffScrnImg2Buffer__III_3I
JNI_ABORT);
#endif
}
+
+JNIEXPORT jboolean JNICALL
+Java_gl4java_GLContext_gljFetchOSGLFunctions (
+ JNIEnv *env, jclass jclass,
+ jstring gllibname, jstring glulibname, jboolean force )
+{
+ const char * gllib;
+ const char * glulib;
+
+ gllib = (*env)->GetStringUTFChars(env, gllibname, 0);
+ glulib = (*env)->GetStringUTFChars(env, glulibname, 0);
+
+ strncpy (libGLName, gllib, 798);
+ strncpy (libGLUName, glulib, 798);
+ libGLName[799] = 0;
+ libGLUName[799] = 0;
+
+ (*env)->ReleaseStringUTFChars(env, gllibname, gllib);
+ (*env)->ReleaseStringUTFChars(env, glulibname, glulib);
+
+#ifdef _X11_
+ fetch_GLX_FUNCS (libGLName, libGLUName, (force==JNI_TRUE)?1:0);
+#endif
+
+#ifdef _WIN32_
+ fetch_WGL_FUNCS (libGLName, libGLUName, (force==JNI_TRUE)?1:0);
+#endif
+
+ return JNI_TRUE;
+}
-#ifdef macintosh
-
-#ifndef NDEBUG
-
-static void PrintSymbolNamesByConnection (CFragConnectionID myConnID)
-{
- long myIndex;
- long myCount; /*number of exported symbols in fragment*/
- OSErr myErr;
- Str255 myName; /*symbol name*/
- Ptr myAddr; /*symbol address*/
- CFragSymbolClass myClass; /*symbol class*/
- static char buffer[256];
-
- myErr = CountSymbols(myConnID, &myCount);
- if (!myErr)
- for (myIndex = 1; myIndex <= myCount; myIndex++)
- {
- myErr = GetIndSymbol(myConnID, myIndex, myName,
- &myAddr, &myClass);
- if (!myErr)
- {
- p2cstrcpy (buffer, myName);
-
- printf("%d/%d: class %d - name %s\n",
- myIndex, myCount, myClass, buffer);
- }
- }
-}
-
-static Ptr SeekSymbolNamesByConnection (CFragConnectionID myConnID, Str255 name)
-{
- long myIndex;
- long myCount; /*number of exported symbols in fragment*/
- OSErr myErr;
- Str255 myName; /*symbol name*/
- Ptr myAddr; /*symbol address*/
- CFragSymbolClass myClass; /*symbol class*/
-
- myErr = CountSymbols(myConnID, &myCount);
- if (!myErr)
- for (myIndex = 1; myIndex <= myCount; myIndex++)
- {
- myErr = GetIndSymbol(myConnID, myIndex, myName,
- &myAddr, &myClass);
- if (!myErr && EqualString (myName, name, true, true) == true )
- return myAddr;
- }
-}
-
-#endif /* ifndef NDEBUG */
-
-#endif /* ifdef macintosh */
-
-void * LIBAPIENTRY getGLProcAddressHelper(const char * func, int * method,
- int debug, int verbose )
+JNIEXPORT jboolean JNICALL
+Java_gl4java_GLContext_gljFetchGLFunctions (
+ JNIEnv *env, jclass jclass,
+ jstring gllibname, jstring glulibname, jboolean force )
{
- void * funcPtr=NULL;
- int lmethod;
-
-#ifdef _X11_
-
- void * libHandleGL;
-
- /*
- * void (*glXGetProcAddressARB(const GLubyte *procName))
- */
- static void * (CALLBACK *__glXGetProcAddress)
- (const GLubyte *procName) = NULL;
- static int __firstAccess = 1;
-
- if(__glXGetProcAddress==NULL && __firstAccess)
- {
- libHandleGL = dlopen("libGL.so", RTLD_LAZY|RTLD_GLOBAL);
- if(libHandleGL==NULL)
- {
- printf("cannot access OpenGL library libGL.so\n");
- fflush(NULL);
- } else {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddressARB");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddressARB in libGL.so\n");
- fflush(NULL);
- }
-
- if(__glXGetProcAddress==NULL)
- {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddressEXT");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddressEXT in libGL.so\n");
- fflush(NULL);
- }
- }
-
- if(__glXGetProcAddress==NULL)
- {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddress");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddress in libGL.so\n");
- fflush(NULL);
- }
- }
-
- dlclose(libHandleGL);
- libHandleGL=NULL;
-
- if(__glXGetProcAddress==NULL)
- {
- printf("cannot find glXGetProcAddress* in OpenGL library libGL.so\n");
- fflush(NULL);
- libHandleGL = dlopen("libglx.so", RTLD_LAZY|RTLD_GLOBAL);
- if(libHandleGL==NULL)
- {
- printf("cannot access GLX library libglx.so\n");
- fflush(NULL);
- } else {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddressARB");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddressARB in libglx.so\n");
- fflush(NULL);
- }
-
- if(__glXGetProcAddress==NULL) {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddressEXT");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddressEXT in libglx.so\n");
- fflush(NULL);
- }
- }
-
- if(__glXGetProcAddress==NULL) {
- __glXGetProcAddress =
- dlsym(libHandleGL, "glXGetProcAddress");
-
- if(__glXGetProcAddress!=NULL && verbose) {
- printf("found glXGetProcAddress in libglx.so\n");
- fflush(NULL);
- }
- }
-
- dlclose(libHandleGL);
- libHandleGL=NULL;
- }
- }
- }
- }
- if(__glXGetProcAddress==NULL && __firstAccess)
- {
- printf("cannot find glXGetProcAddress* in GLX library libglx.so\n");
- fflush(NULL);
- }
- __firstAccess = 0;
-
- if(__glXGetProcAddress!=NULL)
- funcPtr = __glXGetProcAddress(func);
-
- if(funcPtr==NULL) {
- lmethod=2;
- libHandleGL = dlopen("libGL.so", RTLD_LAZY|RTLD_GLOBAL);
- if(libHandleGL==NULL)
- {
- printf("cannot access OpenGL library libGL.so\n");
- fflush(NULL);
- } else {
- funcPtr = dlsym(libHandleGL, func);
- dlclose(libHandleGL);
- }
- } else lmethod=1;
-#endif
-
-
-#ifdef _WIN32_
-
- HMODULE hDLL_OPENGL32 = 0;
+ const char * gllib;
+ const char * glulib;
+ gllib = (*env)->GetStringUTFChars(env, gllibname, 0);
+ glulib = (*env)->GetStringUTFChars(env, glulibname, 0);
+ strncpy (libGLName, gllib, 798);
+ strncpy (libGLUName, glulib, 798);
+ libGLName[799] = 0;
+ libGLUName[799] = 0;
- funcPtr = wglGetProcAddress(func);
- if(funcPtr==NULL)
- {
- lmethod=2;
-
-
- if(hDLL_OPENGL32==NULL)
-
- {
- hDLL_OPENGL32 = LoadLibrary ("OPENGL32.DLL");
-
- /* hDLL_OPENGL32 = GetModuleHandle ("OPENGL32.DLL"); */
-
- }
- if(hDLL_OPENGL32==NULL)
- {
- printf("cannot access OpenGL library OPENGL32.DLL\n");
- fflush(NULL);
- } else {
- funcPtr = GetProcAddress (hDLL_OPENGL32, func);
- FreeLibrary(hDLL_OPENGL32);
- }
- } else lmethod=1;
-#endif
-
-#ifdef macintosh
- Str255 errName;
- Str255 funcName;
- Ptr glLibMainAddr = 0;
- CFragConnectionID glLibConnectId = 0;
- CFragSymbolClass glLibSymClass = 0;
- OSErr returnError=fragNoErr;
- #ifndef NDEBUG
- static int firstTime = 1;
- #endif
-
- returnError =
- GetSharedLibrary("\pOpenGLLibrary",
- kPowerPCCFragArch,
- kReferenceCFrag,
- &glLibConnectId,
- &glLibMainAddr,
- errName);
-
- if (returnError != fragNoErr)
- {
- printf ("GetSharedLibrary Err(%d): Ahhh! Didn't find LIBRARY !\n",
- returnError);
- }
-
- if (returnError == fragNoErr)
- {
- c2pstrcpy ( funcName, func );
-
- #ifndef NDEBUG
- if(firstTime)
- {
- PrintSymbolNamesByConnection (glLibConnectId);
- firstTime=0;
- }
- funcPtr = (void *)
- SeekSymbolNamesByConnection (glLibConnectId, funcName);
- #endif
-
- if(funcPtr==NULL)
- {
- returnError =
- FindSymbol (glLibConnectId, funcName,
- &funcPtr, & glLibSymClass );
- lmethod=2;
- }
- #ifndef NDEBUG
- else lmethod=3;
- #endif
-
- if (returnError != fragNoErr)
- {
- printf ("GetSharedLibrary Err(%d): Ahhh! Didn't find SYMBOL: %s !\n",
- returnError, func);
- }
- returnError = fragNoErr; // fall back to ok mode ...
- }
-
- if (returnError == fragNoErr && glLibConnectId!=NULL)
- {
- returnError = CloseConnection(&glLibConnectId);
+ (*env)->ReleaseStringUTFChars(env, gllibname, gllib);
+ (*env)->ReleaseStringUTFChars(env, glulibname, glulib);
- if (returnError != fragNoErr)
- {
- printf ("GetSharedLibrary Err(%d): Ahhh! Didn't close LIBRARY !\n",
- returnError);
- }
- }
+ fetch_GL_FUNCS (libGLName, libGLUName, (force==JNI_TRUE)?1:0);
-
-#endif
-
- if(funcPtr==NULL)
- {
- if(debug||verbose)
- {
- printf("%s (%d): not implemented !\n", func, lmethod);
- fflush(NULL);
- }
- } else if(verbose) {
- printf("%s (%d): loaded !\n", func, lmethod);
- fflush(NULL);
- }
- if(method!=NULL) *method=lmethod;
- return funcPtr;
+ return JNI_TRUE;
}
JNIEXPORT jboolean JNICALL
@@ -1088,11 +874,12 @@ Java_gl4java_GLContext_gljTestGLProc (
const char *str = (*env)->GetStringUTFChars(env, name, 0);
- #ifdef macintosh
+ #ifdef _MAC_OS9_
InstallJavaConsole(env);
#endif
- res = ( getGLProcAddressHelper(str, &method, 0, verbose)!=NULL )?
+ res = ( getGLProcAddressHelper(libGLName, libGLUName,
+ str, &method, 0, verbose)!=NULL )?
JNI_TRUE:JNI_FALSE;
(*env)->ReleaseStringUTFChars(env, name, str);
@@ -1105,12 +892,12 @@ Java_gl4java_GLContext_gljGetCurrentContext(
JNIEnv *env, jobject obj )
{
#ifdef _WIN32_
- return (jint) wglGetCurrentContext();
+ return (jint) disp__wglGetCurrentContext();
#else
- #ifdef macintosh
+ #ifdef _MAC_OS9_
return (jint) aglGetCurrentContext();
#else
- return (jint) glXGetCurrentContext();
+ return (jint) disp__glXGetCurrentContext();
#endif
#endif
}
diff --git a/CNativeCode/OpenGL_misc.h b/CNativeCode/OpenGL_misc.h
index 1438877..8f307c4 100644
--- a/CNativeCode/OpenGL_misc.h
+++ b/CNativeCode/OpenGL_misc.h
@@ -12,52 +12,18 @@
#include <jni.h>
- #include<GL/gl.h>
- #include <GL/glu.h>
+ #include "gltool.h"
#ifndef LIBAPIENTRY
#define LIBAPIENTRY
#endif
#ifndef LIBAPI
- #define LIBAPI
+ #define LIBAPI extern
#endif
- #ifndef USE_64BIT_POINTER
- typedef int PointerHolder;
- #else
- typedef long PointerHolder;
- #endif
-
- /* to match the GLCapabilities values .. */
-
- #define BUFFER_SINGLE 0
- #define BUFFER_DOUBLE 1
-
- #define COLOR_INDEX 0
- #define COLOR_RGBA 1
-
- #define STEREO_OFF 0
- #define STEREO_ON 1
-
- typedef struct {
- jint buffer;
- jint color;
- jint stereo;
- jint depthBits;
- jint stencilBits;
-
- jint redBits;
- jint greenBits;
- jint blueBits;
- jint alphaBits;
- jint accumRedBits;
- jint accumGreenBits;
- jint accumBlueBits;
- jint accumAlphaBits;
+ LIBAPI char libGLName[/*800*/];
+ LIBAPI char libGLUName[/*800*/];
- jlong nativeVisualID;
- } GLCapabilities;
-
/**
* gets the capabilities outta java's GLCapabilities object 'capsObj'
* and puts those values to the C-Struct GLCapabilities !
@@ -77,19 +43,10 @@
GLCapabilities *glCaps );
- /**
- * prints the contents of the GLCapabilities to stdout !
- */
- LIBAPI void LIBAPIENTRY printGLCapabilities ( GLCapabilities *glCaps );
-
/* testJavaGLTypes does important implementation plattformspecific checks:
*
* o do fit the JNI <-> GL Variables-Type Mapping
* o IF ERROR OR VERBOSE -> DUMP JNI,GL Type-Length
*/
LIBAPI jboolean LIBAPIENTRY testJavaGLTypes(jboolean verbose);
-
- LIBAPI void * LIBAPIENTRY getGLProcAddressHelper
- (const char * func, int * method,
- int debug, int verbose );
#endif
diff --git a/CNativeCode/jawt_misc.c b/CNativeCode/jawt_misc.c
index d884406..dcdf4c3 100644
--- a/CNativeCode/jawt_misc.c
+++ b/CNativeCode/jawt_misc.c
@@ -271,7 +271,7 @@ jawt_lock (JNIEnv *env, JAWTDataHolder *pJData, jboolean ignoreSurfaceChanged,
#ifdef _X11_
( ((JAWT_X11DrawingSurfaceInfo *)(pJData->dsi_os))->drawable );
#endif
- #ifdef macintosh
+ #ifdef _MAC_OS9_
NULL;
#endif
#ifdef _WIN32_
@@ -285,7 +285,7 @@ jawt_lock (JNIEnv *env, JAWTDataHolder *pJData, jboolean ignoreSurfaceChanged,
#ifdef _X11_
( ((JAWT_X11DrawingSurfaceInfo *)(pJData->dsi_os))->display );
#endif
- #ifdef macintosh
+ #ifdef _MAC_OS9_
NULL;
#endif
#ifdef _WIN32_