From: Luke H. <lh...@us...> - 2002-11-27 05:54:30
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv29807/src/native/common Modified Files: org_lwjgl_opengl_GLU.cpp org_lwjgl_opengl_GLU.h Log Message: GLU: Added full quadrics support (except gluQuadricCallback) Quadrics.java: port of NeHe lesson18: Quadrics Index: org_lwjgl_opengl_GLU.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GLU.cpp 25 Nov 2002 13:36:35 -0000 1.1 +++ org_lwjgl_opengl_GLU.cpp 27 Nov 2002 05:54:27 -0000 1.2 @@ -165,3 +165,113 @@ return ret; } +/* + * Class: org_lwjgl_opengl_GLU + * Method: newQuadric + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLU_newQuadric(JNIEnv * env, jobject obj) +{ + jint ret = (jint) gluNewQuadric(); + CHECK_GL_ERROR + return ret; +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: cylinder + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_cylinder(JNIEnv * env, jobject obj, jint quad, jdouble baseRadius, jdouble topRadius, jdouble height, jint slices, jint stacks) +{ + gluCylinder((GLUquadricObj *) quad, (GLdouble) baseRadius, (GLdouble) topRadius, (GLdouble) height, (GLint) slices, (GLint) stacks); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: deleteQuadric + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_deleteQuadric(JNIEnv * env, jobject obj, jint quad) +{ + gluDeleteQuadric((GLUquadricObj *) quad); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: disk + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_disk + (JNIEnv * env, jobject obj, jint quad, jdouble innerRadius, jdouble outerRadius, jint slices, jint loops) +{ + gluDisk((GLUquadricObj *) quad, (GLdouble) innerRadius, (GLdouble) outerRadius, (GLint) slices, (GLint) loops); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: partialDisk + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_partialDisk + (JNIEnv * env, jobject obj, jint quad, jdouble innerRadius, jdouble outerRadius, + jint slices, jint loops, jdouble startAngle, jdouble sweepAngle) +{ + gluPartialDisk((GLUquadricObj *) quad, (GLdouble) innerRadius, (GLdouble) outerRadius, + (GLint) slices, (GLint) loops, (GLdouble) startAngle, (GLdouble) sweepAngle); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricDrawStyle + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricDrawStyle + (JNIEnv * env, jobject obj, jint quad, jint drawStyle) +{ + gluQuadricDrawStyle((GLUquadricObj *) quad, (GLenum) drawStyle); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricNormals + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricNormals + (JNIEnv * env, jobject obj, jint quad, jint normals) +{ + gluQuadricNormals((GLUquadricObj *) quad, (GLenum) normals); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricOrientation + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricOrientation + (JNIEnv * env, jobject obj, jint quad, jint orientation) +{ + gluQuadricOrientation((GLUquadricObj *) quad, (GLenum) orientation); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricTexture + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricTexture + (JNIEnv * env, jobject obj, jint quad, jboolean textureCoords) +{ + gluQuadricTexture((GLUquadricObj *) quad, (GLboolean) textureCoords); + CHECK_GL_ERROR +} + +/* + * Class: org_lwjgl_opengl_GLU + * Method: sphere + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_sphere + (JNIEnv * env, jobject obj, jint quad, jdouble radius, jint slices, jint stacks) +{ + gluSphere((GLUquadricObj *) quad, (GLdouble) radius, (GLint) slices, (GLint) stacks); + CHECK_GL_ERROR +} + Index: org_lwjgl_opengl_GLU.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLU.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GLU.h 17 Aug 2002 14:13:12 -0000 1.2 +++ org_lwjgl_opengl_GLU.h 27 Nov 2002 05:54:27 -0000 1.3 @@ -95,6 +95,89 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLU_build2DMipmaps (JNIEnv *, jobject, jint, jint, jint, jint, jint, jint, jint); + + + +/* + * Class: org_lwjgl_opengl_GLU + * Method: newQuadric + * not sure exactly what to do with this part... + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GLU_newQuadric + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: cylinder + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_cylinder + (JNIEnv *, jobject, jint, jdouble, jdouble, jdouble, jint, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: deleteQuadric + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_deleteQuadric + (JNIEnv *, jobject, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: disk + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_disk + (JNIEnv *, jobject, jint, jdouble, jdouble, jint, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: partialDisk + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_partialDisk + (JNIEnv *, jobject, jint, jdouble, jdouble, jint, jint, jdouble, jdouble); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricDrawStyle + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricDrawStyle + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricNormals + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricNormals + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricOrientation + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricOrientation + (JNIEnv *, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: quadricTexture + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_quadricTexture + (JNIEnv *, jobject, jint, jboolean); + +/* + * Class: org_lwjgl_opengl_GLU + * Method: sphere + * not sure exactly what to do with this part... + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_sphere + (JNIEnv *, jobject, jint, jdouble, jint, jint); + #ifdef __cplusplus } #endif |