You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
|
2
|
3
(5) |
4
|
|
5
(1) |
6
(16) |
7
(3) |
8
(3) |
9
(4) |
10
(13) |
11
(5) |
|
12
(1) |
13
(1) |
14
|
15
(7) |
16
(4) |
17
(1) |
18
(1) |
|
19
(3) |
20
|
21
(1) |
22
(16) |
23
|
24
(2) |
25
|
|
26
(1) |
27
(4) |
28
(6) |
29
(3) |
30
(1) |
|
|
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-09-11 12:05:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24312/src/java/org/lwjgl/opengl Modified Files: GLContext.java Log Message: Fixed problem in version determination Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- GLContext.java 9 Sep 2004 23:48:50 -0000 1.29 +++ GLContext.java 11 Sep 2004 12:05:25 -0000 1.30 @@ -271,10 +271,24 @@ String version = GL11.glGetString(GL11.GL_VERSION); int majorEnd = version.indexOf('.'); - int minorEnd = version.indexOf('.', majorEnd + 1); + int minorEnd = -1; + if (majorEnd != -1) { + minorEnd = version.indexOf('.', majorEnd + 1); + } else { + majorEnd = version.length(); + } - int majorVersion = Integer.parseInt(version.substring(0, majorEnd)); - int minorVersion = Integer.parseInt(version.substring(majorEnd + 1, minorEnd)); + int majorVersion; + if (majorEnd == 0) { + throw new OpenGLException("Unable to determine GL version."); + } + majorVersion = Integer.parseInt(version.substring(0, majorEnd)); + int minorVersion; + if (minorEnd == -1) { + minorVersion = 0; + } else { + minorVersion = Integer.parseInt(version.substring(majorEnd + 1, minorEnd)); + } if ( majorVersion == 2 ) { // ----------------------[ 2.X ]---------------------- @@ -288,10 +302,13 @@ switch ( minorVersion ) { case 5: addExtensionClass(exts, exts_names, "GL15", "OpenGL15"); + // Intentional fall through case 4: addExtensionClass(exts, exts_names, "GL14", "OpenGL14"); + // Intentional fall through case 3: addExtensionClass(exts, exts_names, "GL13", "OpenGL13"); + // Intentional fall through case 2: addExtensionClass(exts, exts_names, "GL12", "OpenGL12"); } |
|
From: Elias N. <eli...@us...> - 2004-09-11 07:20:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5263 Modified Files: configure.in Log Message: Remove redundant CXXFLAGS definition in configure.in Index: configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- configure.in 10 Sep 2004 08:13:47 -0000 1.56 +++ configure.in 11 Sep 2004 07:20:50 -0000 1.57 @@ -47,7 +47,6 @@ for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS do CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR" - CXXFLAGS="$CXXFLAGS -I$JNI_INCLUDE_DIR" done AC_SUBST(native_build_dir, [$NATIVE_BUILD_DIR]) |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6954/src/native/common/ext Modified Files: Makefile.am Added Files: org_lwjgl_opengl_EXTBlendEquationSeparate.c org_lwjgl_opengl_EXTBlendFuncSeparate.c org_lwjgl_opengl_EXTCompiledVertexArray.c org_lwjgl_opengl_EXTDepthBoundsTest.c org_lwjgl_opengl_EXTDrawRangeElements.c org_lwjgl_opengl_EXTFogCoord.c org_lwjgl_opengl_EXTMultiDrawArrays.c org_lwjgl_opengl_EXTPointParameters.c org_lwjgl_opengl_EXTSecondaryColor.c org_lwjgl_opengl_EXTStencilTwoSide.c org_lwjgl_opengl_EXTVertexShader.c org_lwjgl_opengl_EXTVertexWeighting.c Removed Files: org_lwjgl_opengl_EXTBlendEquationSeparate.cpp org_lwjgl_opengl_EXTBlendFuncSeparate.cpp org_lwjgl_opengl_EXTCompiledVertexArray.cpp org_lwjgl_opengl_EXTDepthBoundsTest.cpp org_lwjgl_opengl_EXTDrawRangeElements.cpp org_lwjgl_opengl_EXTFogCoord.cpp org_lwjgl_opengl_EXTMultiDrawArrays.cpp org_lwjgl_opengl_EXTPointParameters.cpp org_lwjgl_opengl_EXTSecondaryColor.cpp org_lwjgl_opengl_EXTStencilTwoSide.cpp org_lwjgl_opengl_EXTVertexShader.cpp org_lwjgl_opengl_EXTVertexWeighting.cpp Log Message: Converted native code from C++ (.cpp files) to C (.c files), thus avoiding an annoying dependency on the standard C++ library on Linux. We weren't using any particular C++ features anyway. --- org_lwjgl_opengl_EXTStencilTwoSide.cpp DELETED --- --- org_lwjgl_opengl_EXTBlendFuncSeparate.cpp DELETED --- --- org_lwjgl_opengl_EXTMultiDrawArrays.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTVertexShader.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTVertexShader // ---------------------------------- #include "extgl.h" #include "common_tools.h" typedef void (APIENTRY * glBeginVertexShaderEXTPROC) (); typedef void (APIENTRY * glEndVertexShaderEXTPROC) (); typedef void (APIENTRY * glBindVertexShaderEXTPROC) (GLuint id); typedef GLuint (APIENTRY * glGenVertexShadersEXTPROC) (GLuint range); typedef void (APIENTRY * glDeleteVertexShaderEXTPROC) (GLuint id); typedef void (APIENTRY * glShaderOp1EXTPROC) (GLenum op, GLuint res, GLuint arg1); typedef void (APIENTRY * glShaderOp2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); typedef void (APIENTRY * glShaderOp3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); typedef void (APIENTRY * glSwizzleEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (APIENTRY * glWriteMaskEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); typedef void (APIENTRY * glInsertComponentEXTPROC) (GLuint res, GLuint src, GLuint num); typedef void (APIENTRY * glExtractComponentEXTPROC) (GLuint res, GLuint src, GLuint num); typedef GLuint (APIENTRY * glGenSymbolsEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components); typedef void (APIENTRY * glSetInvariantEXTPROC) (GLuint id, GLenum type, GLvoid *addr); typedef void (APIENTRY * glSetLocalConstantEXTPROC) (GLuint id, GLenum type, GLvoid *addr); typedef void (APIENTRY * glVariantbvEXTPROC) (GLuint id, GLbyte *addr); typedef void (APIENTRY * glVariantsvEXTPROC) (GLuint id, GLshort *addr); typedef void (APIENTRY * glVariantivEXTPROC) (GLuint id, GLint *addr); typedef void (APIENTRY * glVariantfvEXTPROC) (GLuint id, GLfloat *addr); typedef void (APIENTRY * glVariantubvEXTPROC) (GLuint id, GLubyte *addr); typedef void (APIENTRY * glVariantusvEXTPROC) (GLuint id, GLushort *addr); typedef void (APIENTRY * glVariantuivEXTPROC) (GLuint id, GLuint *addr); typedef void (APIENTRY * glVariantPointerEXTPROC) (GLuint id, GLenum type, GLuint stride, GLvoid *addr); typedef void (APIENTRY * glEnableVariantClientStateEXTPROC) (GLuint id); typedef void (APIENTRY * glDisableVariantClientStateEXTPROC) (GLuint id); typedef GLuint (APIENTRY * glBindLightParameterEXTPROC) (GLenum light, GLenum value); typedef GLuint (APIENTRY * glBindMaterialParameterEXTPROC) (GLenum face, GLenum value); typedef GLuint (APIENTRY * glBindTexGenParameterEXTPROC) (GLenum unit, GLenum coord, GLenum value); typedef GLuint (APIENTRY * glBindTextureUnitParameterEXTPROC) (GLenum unit, GLenum value); typedef GLuint (APIENTRY * glBindParameterEXTPROC) (GLenum value); typedef GLboolean (APIENTRY * glIsVariantEnabledEXTPROC) (GLuint id, GLenum cap); typedef void (APIENTRY * glGetVariantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRY * glGetVariantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRY * glGetVariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (APIENTRY * glGetVariantPointervEXTPROC) (GLuint id, GLenum value, GLvoid **data); typedef void (APIENTRY * glGetInvariantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRY * glGetInvariantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRY * glGetInvariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); typedef void (APIENTRY * glGetLocalConstantBooleanvEXTPROC) (GLuint id, GLenum value, GLboolean *data); typedef void (APIENTRY * glGetLocalConstantIntegervEXTPROC) (GLuint id, GLenum value, GLint *data); typedef void (APIENTRY * glGetLocalConstantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat *data); static glBeginVertexShaderEXTPROC glBeginVertexShaderEXT; static glEndVertexShaderEXTPROC glEndVertexShaderEXT; static glBindVertexShaderEXTPROC glBindVertexShaderEXT; static glGenVertexShadersEXTPROC glGenVertexShadersEXT; static glDeleteVertexShaderEXTPROC glDeleteVertexShaderEXT; static glShaderOp1EXTPROC glShaderOp1EXT; static glShaderOp2EXTPROC glShaderOp2EXT; static glShaderOp3EXTPROC glShaderOp3EXT; static glSwizzleEXTPROC glSwizzleEXT; static glWriteMaskEXTPROC glWriteMaskEXT; static glInsertComponentEXTPROC glInsertComponentEXT; static glExtractComponentEXTPROC glExtractComponentEXT; static glGenSymbolsEXTPROC glGenSymbolsEXT; static glSetInvariantEXTPROC glSetInvariantEXT; static glSetLocalConstantEXTPROC glSetLocalConstantEXT; static glVariantbvEXTPROC glVariantbvEXT; static glVariantsvEXTPROC glVariantsvEXT; static glVariantivEXTPROC glVariantivEXT; static glVariantfvEXTPROC glVariantfvEXT; static glVariantubvEXTPROC glVariantubvEXT; static glVariantusvEXTPROC glVariantusvEXT; static glVariantuivEXTPROC glVariantuivEXT; static glVariantPointerEXTPROC glVariantPointerEXT; static glEnableVariantClientStateEXTPROC glEnableVariantClientStateEXT; static glDisableVariantClientStateEXTPROC glDisableVariantClientStateEXT; static glBindLightParameterEXTPROC glBindLightParameterEXT; static glBindMaterialParameterEXTPROC glBindMaterialParameterEXT; static glBindTexGenParameterEXTPROC glBindTexGenParameterEXT; static glBindTextureUnitParameterEXTPROC glBindTextureUnitParameterEXT; static glBindParameterEXTPROC glBindParameterEXT; static glIsVariantEnabledEXTPROC glIsVariantEnabledEXT; static glGetVariantBooleanvEXTPROC glGetVariantBooleanvEXT; static glGetVariantIntegervEXTPROC glGetVariantIntegervEXT; static glGetVariantFloatvEXTPROC glGetVariantFloatvEXT; static glGetVariantPointervEXTPROC glGetVariantPointervEXT; static glGetInvariantBooleanvEXTPROC glGetInvariantBooleanvEXT; static glGetInvariantIntegervEXTPROC glGetInvariantIntegervEXT; static glGetInvariantFloatvEXTPROC glGetInvariantFloatvEXT; static glGetLocalConstantBooleanvEXTPROC glGetLocalConstantBooleanvEXT; static glGetLocalConstantIntegervEXTPROC glGetLocalConstantIntegervEXT; static glGetLocalConstantFloatvEXTPROC glGetLocalConstantFloatvEXT; /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBeginVertexShaderEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBeginVertexShaderEXT (JNIEnv * env, jclass clazz) { glBeginVertexShaderEXT(); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glEndVertexShaderEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glEndVertexShaderEXT (JNIEnv * env, jclass clazz) { glEndVertexShaderEXT(); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindVertexShaderEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindVertexShaderEXT (JNIEnv * env, jclass clazz, jint id) { glBindVertexShaderEXT(id); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glGenVertexShadersEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glGenVertexShadersEXT (JNIEnv * env, jclass clazz, jint range) { GLuint result = glGenVertexShadersEXT(range); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glDeleteVertexShaderEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glDeleteVertexShaderEXT (JNIEnv * env, jclass clazz, jint id) { glDeleteVertexShaderEXT(id); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glShaderOp1EXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp1EXT (JNIEnv * env, jclass clazz, jint op, jint res, jint arg1) { glShaderOp1EXT(op, res, arg1); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glShaderOp2EXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp2EXT (JNIEnv * env, jclass clazz, jint op, jint res, jint arg1, jint arg2) { glShaderOp2EXT(op, res, arg1, arg2); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glShaderOp3EXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp3EXT (JNIEnv * env, jclass clazz, jint op, jint res, jint arg1, jint arg2, jint arg3) { glShaderOp3EXT(op, res, arg1, arg2, arg3); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glSwizzleEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glSwizzleEXT (JNIEnv * env, jclass clazz, jint res, jint in, jint outX, jint outY, jint outZ, jint outW) { glSwizzleEXT(res, in, outX, outY, outZ, outW); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glWriteMaskEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glWriteMaskEXT (JNIEnv * env, jclass clazz, jint res, jint in, jint outX, jint outY, jint outZ, jint outW) { glWriteMaskEXT(res, in, outX, outY, outZ, outW); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glInsertComponentEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glInsertComponentEXT (JNIEnv * env, jclass clazz, jint res, jint src, jint num) { glInsertComponentEXT(res, src, num); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glExtractComponentEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glExtractComponentEXT (JNIEnv * env, jclass clazz, jint res, jint src, jint num) { glExtractComponentEXT(res, src, num); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glGenSymbolsEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glGenSymbolsEXT (JNIEnv * env, jclass clazz, jint dataType, jint storageType, jint range, jint components) { GLuint result = glGenSymbolsEXT(dataType, storageType, range, components); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglSetInvariantEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglSetInvariantEXT (JNIEnv * env, jclass clazz, jint id, jint type, jobject pAddr, jint pAddr_offset) { GLvoid *pAddr_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pAddr) + pAddr_offset); glSetInvariantEXT(id, type, pAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglSetLocalConstantEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglSetLocalConstantEXT (JNIEnv * env, jclass clazz, jint id, jint type, jobject pAddr, jint pAddr_offset) { GLvoid *pAddr_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pAddr) + pAddr_offset); glSetLocalConstantEXT(id, type, pAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantbvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantbvEXT (JNIEnv * env, jclass clazz, jint id, jobject pAddr, jint pAddr_offset) { GLbyte *pAddr_ptr = (GLbyte *)(*env)->GetDirectBufferAddress(env, pAddr) + pAddr_offset; glVariantbvEXT(id, pAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantsvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantsvEXT (JNIEnv * env, jclass clazz, jint id, jobject psAddr, jint psAddr_offset) { GLshort *psAddr_ptr = (GLshort *)(*env)->GetDirectBufferAddress(env, psAddr) + psAddr_offset; glVariantsvEXT(id, psAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantfvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantfvEXT (JNIEnv * env, jclass clazz, jint id, jobject pfAddr, jint pfAddr_offset) { GLfloat *pfAddr_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfAddr) + pfAddr_offset; glVariantfvEXT(id, pfAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantivEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantivEXT (JNIEnv * env, jclass clazz, jint id, jobject piAddr, jint piAddr_offset) { GLint *piAddr_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piAddr) + piAddr_offset; glVariantivEXT(id, piAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantubvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantubvEXT (JNIEnv * env, jclass clazz, jint id, jobject pAddr, jint pAddr_offset) { GLubyte *pAddr_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, pAddr) + pAddr_offset; glVariantubvEXT(id, pAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantusvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantusvEXT (JNIEnv * env, jclass clazz, jint id, jobject psAddr, jint psAddr_offset) { GLushort *psAddr_ptr = (GLushort *)(*env)->GetDirectBufferAddress(env, psAddr) + psAddr_offset; glVariantusvEXT(id, psAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantuivEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantuivEXT (JNIEnv * env, jclass clazz, jint id, jobject piAddr, jint piAddr_offset) { GLuint *piAddr_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, piAddr) + piAddr_offset; glVariantuivEXT(id, piAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantPointerEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXT (JNIEnv * env, jclass clazz, jint id, jint type, jint stride, jobject pAddr, jint pAddr_offset) { GLvoid *pAddr_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pAddr) + pAddr_offset); glVariantPointerEXT(id, type, stride, pAddr_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglVariantPointerEXTVBO */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXTVBO (JNIEnv * env, jclass clazz, jint id, jint type, jint stride, jint buffer_offset) { glVariantPointerEXT(id, type, stride, (GLvoid *)buffer_offset); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glEnableVariantClientStateEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glEnableVariantClientStateEXT (JNIEnv * env, jclass clazz, jint id) { glEnableVariantClientStateEXT(id); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glDisableVariantClientStateEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glDisableVariantClientStateEXT (JNIEnv * env, jclass clazz, jint id) { glDisableVariantClientStateEXT(id); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindLightParameterEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindLightParameterEXT (JNIEnv * env, jclass clazz, jint light, jint value) { GLuint result = glBindLightParameterEXT(light, value); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindMaterialParameterEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindMaterialParameterEXT (JNIEnv * env, jclass clazz, jint face, jint value) { GLuint result = glBindMaterialParameterEXT(face, value); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindTexGenParameterEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindTexGenParameterEXT (JNIEnv * env, jclass clazz, jint unit, jint coord, jint value) { GLuint result = glBindTexGenParameterEXT(unit, coord, value); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindTextureUnitParameterEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindTextureUnitParameterEXT (JNIEnv * env, jclass clazz, jint unit, jint value) { GLuint result = glBindTextureUnitParameterEXT(unit, value); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glBindParameterEXT */ static jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glBindParameterEXT (JNIEnv * env, jclass clazz, jint value) { GLuint result = glBindParameterEXT(value); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glIsVariantEnabledEXT */ static jboolean JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glIsVariantEnabledEXT (JNIEnv * env, jclass clazz, jint id, jint cap) { GLboolean result = glIsVariantEnabledEXT(id, cap); return result; } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetVariantBooleanvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantBooleanvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pbData, jint pbData_offset) { GLubyte *pbData_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, pbData) + pbData_offset; glGetVariantBooleanvEXT(id, value, pbData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetVariantIntegervEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantIntegervEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject piData, jint piData_offset) { GLint *piData_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piData) + piData_offset; glGetVariantIntegervEXT(id, value, piData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetVariantFloatvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantFloatvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pfData, jint pfData_offset) { GLfloat *pfData_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfData) + pfData_offset; glGetVariantFloatvEXT(id, value, pfData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: glGetVariantPointerEXT */ static jobject JNICALL Java_org_lwjgl_opengl_EXTVertexShader_glGetVariantPointerEXT (JNIEnv * env, jclass clazz, jint id, jint value, jint size) { void *address; glGetVariantPointervEXT((GLuint)id, (GLuint)value, &address); return safeNewBuffer(env, address, size); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetInvariantBooleanvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantBooleanvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pbData, jint pbData_offset) { GLubyte *pbData_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, pbData) + pbData_offset; glGetInvariantBooleanvEXT(id, value, pbData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetInvariantIntegervEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantIntegervEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject piData, jint piData_offset) { GLint *piData_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piData) + piData_offset; glGetInvariantIntegervEXT(id, value, piData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetInvariantFloatvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantFloatvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pfData, jint pfData_offset) { GLfloat *pfData_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfData) + pfData_offset; glGetInvariantFloatvEXT(id, value, pfData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetLocalConstantBooleanvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantBooleanvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pbData, jint pbData_offset) { GLubyte *pbData_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, pbData) + pbData_offset; glGetLocalConstantBooleanvEXT(id, value, pbData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetLocalConstantIntegervEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantIntegervEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject piData, jint piData_offset) { GLint *piData_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piData) + piData_offset; glGetLocalConstantIntegervEXT(id, value, piData_ptr); } /* * Class: org.lwjgl.opengl.EXTVertexShader * Method: nglGetLocalConstantFloatvEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantFloatvEXT (JNIEnv * env, jclass clazz, jint id, jint value, jobject pfData, jint pfData_offset) { GLfloat *pfData_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfData) + pfData_offset; glGetLocalConstantFloatvEXT(id, value, pfData_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glBeginVertexShaderEXT", "()V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBeginVertexShaderEXT, "glBeginVertexShaderEXT", (void*)&glBeginVertexShaderEXT}, {"glEndVertexShaderEXT", "()V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glEndVertexShaderEXT, "glEndVertexShaderEXT", (void*)&glEndVertexShaderEXT}, {"glBindVertexShaderEXT", "(I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindVertexShaderEXT, "glBindVertexShaderEXT", (void*)&glBindVertexShaderEXT}, {"glGenVertexShadersEXT", "(I)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glGenVertexShadersEXT, "glGenVertexShadersEXT", (void*)&glGenVertexShadersEXT}, {"glDeleteVertexShaderEXT", "(I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glDeleteVertexShaderEXT, "glDeleteVertexShaderEXT", (void*)&glDeleteVertexShaderEXT}, {"glShaderOp1EXT", "(III)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp1EXT, "glShaderOp1EXT", (void*)&glShaderOp1EXT}, {"glShaderOp2EXT", "(IIII)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp2EXT, "glShaderOp2EXT", (void*)&glShaderOp2EXT}, {"glShaderOp3EXT", "(IIIII)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glShaderOp3EXT, "glShaderOp3EXT", (void*)&glShaderOp3EXT}, {"glSwizzleEXT", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glSwizzleEXT, "glSwizzleEXT", (void*)&glSwizzleEXT}, {"glWriteMaskEXT", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glWriteMaskEXT, "glWriteMaskEXT", (void*)&glWriteMaskEXT}, {"glInsertComponentEXT", "(III)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glInsertComponentEXT, "glInsertComponentEXT", (void*)&glInsertComponentEXT}, {"glExtractComponentEXT", "(III)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glExtractComponentEXT, "glExtractComponentEXT", (void*)&glExtractComponentEXT}, {"glGenSymbolsEXT", "(IIII)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glGenSymbolsEXT, "glGenSymbolsEXT", (void*)&glGenSymbolsEXT}, {"nglSetInvariantEXT", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglSetInvariantEXT, "glSetInvariantEXT", (void*)&glSetInvariantEXT}, {"nglSetLocalConstantEXT", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglSetLocalConstantEXT, "glSetLocalConstantEXT", (void*)&glSetLocalConstantEXT}, {"nglVariantbvEXT", "(ILjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantbvEXT, "glVariantbvEXT", (void*)&glVariantbvEXT}, {"nglVariantsvEXT", "(ILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantsvEXT, "glVariantsvEXT", (void*)&glVariantsvEXT}, {"nglVariantfvEXT", "(ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantfvEXT, "glVariantfvEXT", (void*)&glVariantfvEXT}, {"nglVariantivEXT", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantivEXT, "glVariantivEXT", (void*)&glVariantivEXT}, {"nglVariantubvEXT", "(ILjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantubvEXT, "glVariantubvEXT", (void*)&glVariantubvEXT}, {"nglVariantusvEXT", "(ILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantusvEXT, "glVariantusvEXT", (void*)&glVariantusvEXT}, {"nglVariantuivEXT", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantuivEXT, "glVariantuivEXT", (void*)&glVariantuivEXT}, {"nglVariantPointerEXT", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXT, "glVariantPointerEXT", (void*)&glVariantPointerEXT}, {"nglVariantPointerEXTVBO", "(IIII)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXTVBO, NULL, NULL}, {"glEnableVariantClientStateEXT", "(I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glEnableVariantClientStateEXT, "glEnableVariantClientStateEXT", (void*)&glEnableVariantClientStateEXT}, {"glDisableVariantClientStateEXT", "(I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glDisableVariantClientStateEXT, "glDisableVariantClientStateEXT", (void*)&glDisableVariantClientStateEXT}, {"glBindLightParameterEXT", "(II)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindLightParameterEXT, "glBindLightParameterEXT", (void*)&glBindLightParameterEXT}, {"glBindMaterialParameterEXT", "(II)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindMaterialParameterEXT, "glBindMaterialParameterEXT", (void*)&glBindMaterialParameterEXT}, {"glBindTexGenParameterEXT", "(III)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindTexGenParameterEXT, "glBindTexGenParameterEXT", (void*)&glBindTexGenParameterEXT}, {"glBindTextureUnitParameterEXT", "(II)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindTextureUnitParameterEXT, "glBindTextureUnitParameterEXT", (void*)&glBindTextureUnitParameterEXT}, {"glBindParameterEXT", "(I)I", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glBindParameterEXT, "glBindParameterEXT", (void*)&glBindParameterEXT}, {"glIsVariantEnabledEXT", "(II)Z", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glIsVariantEnabledEXT, "glIsVariantEnabledEXT", (void*)&glIsVariantEnabledEXT}, {"nglGetVariantBooleanvEXT", "(IILjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantBooleanvEXT, "glGetVariantBooleanvEXT", (void*)&glGetVariantBooleanvEXT}, {"nglGetVariantIntegervEXT", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantIntegervEXT, "glGetVariantIntegervEXT", (void*)&glGetVariantIntegervEXT}, {"nglGetVariantFloatvEXT", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantFloatvEXT, "glGetVariantFloatvEXT", (void*)&glGetVariantFloatvEXT}, {"glGetVariantPointerEXT", "(III)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_glGetVariantPointerEXT, "glGetVariantPointervEXT", (void*)&glGetVariantPointervEXT}, {"nglGetInvariantBooleanvEXT", "(IILjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantBooleanvEXT, "glGetInvariantBooleanvEXT", (void*)&glGetInvariantBooleanvEXT}, {"nglGetInvariantIntegervEXT", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantIntegervEXT, "glGetInvariantIntegervEXT", (void*)&glGetInvariantIntegervEXT}, {"nglGetInvariantFloatvEXT", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantFloatvEXT, "glGetInvariantFloatvEXT", (void*)&glGetInvariantFloatvEXT}, {"nglGetLocalConstantBooleanvEXT", "(IILjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantBooleanvEXT, "glGetLocalConstantBooleanvEXT", (void*)&glGetLocalConstantBooleanvEXT}, {"nglGetLocalConstantIntegervEXT", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantIntegervEXT, "glGetLocalConstantIntegervEXT", (void*)&glGetLocalConstantIntegervEXT}, {"nglGetLocalConstantFloatvEXT", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantFloatvEXT, "glGetLocalConstantFloatvEXT", (void*)&glGetLocalConstantFloatvEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_EXTVertexShader.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTBlendEquationSeparate.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTBlendEquationSeparate // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glBlendEquationSeparateEXTPROC) (GLenum modeRGB, GLenum modeAlpha); static glBlendEquationSeparateEXTPROC glBlendEquationSeparateEXT; /* * Class: org.lwjgl.opengl.EXTBlendEquationSeparate * Method: glBlendEquationSeparateEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTBlendEquationSeparate_glBlendEquationSeparateEXT (JNIEnv * env, jclass clazz, jint modeRGB, jint modeAlpha) { glBlendEquationSeparateEXT(modeRGB, modeAlpha); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendEquationSeparate_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glBlendEquationSeparateEXT", "(II)V", (void*)&Java_org_lwjgl_opengl_EXTBlendEquationSeparate_glBlendEquationSeparateEXT, "glBlendEquationSeparateEXT", (void*)&glBlendEquationSeparateEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_EXTSecondaryColor.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTSecondaryColor // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glSecondaryColor3bEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); typedef void (APIENTRY * glSecondaryColor3fEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); typedef void (APIENTRY * glSecondaryColor3ubEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); typedef void (APIENTRY * glSecondaryColorPointerEXTPROC) (GLint size, GLenum type, GLsizei stride, GLvoid *pointer); static glSecondaryColor3bEXTPROC glSecondaryColor3bEXT; static glSecondaryColor3fEXTPROC glSecondaryColor3fEXT; static glSecondaryColor3ubEXTPROC glSecondaryColor3ubEXT; static glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT; /* * Class: org.lwjgl.opengl.EXTSecondaryColor * Method: glSecondaryColor3bEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3bEXT (JNIEnv * env, jclass clazz, jbyte red, jbyte green, jbyte blue) { glSecondaryColor3bEXT(red, green, blue); } /* * Class: org.lwjgl.opengl.EXTSecondaryColor * Method: glSecondaryColor3fEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3fEXT (JNIEnv * env, jclass clazz, jfloat red, jfloat green, jfloat blue) { glSecondaryColor3fEXT(red, green, blue); } /* * Class: org.lwjgl.opengl.EXTSecondaryColor * Method: glSecondaryColor3ubEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3ubEXT (JNIEnv * env, jclass clazz, jbyte red, jbyte green, jbyte blue) { glSecondaryColor3ubEXT(red, green, blue); } /* * Class: org.lwjgl.opengl.EXTSecondaryColor * Method: nglSecondaryColorPointerEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXT (JNIEnv * env, jclass clazz, jint size, jint type, jint stride, jobject pPointer, jint pPointer_offset) { GLvoid *pPointer_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pPointer) + pPointer_offset); glSecondaryColorPointerEXT(size, type, stride, pPointer_ptr); } /* * Class: org.lwjgl.opengl.EXTSecondaryColor * Method: nglSecondaryColorPointerEXTVBO */ static void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXTVBO (JNIEnv * env, jclass clazz, jint size, jint type, jint stride, jint buffer_offset) { glSecondaryColorPointerEXT(size, type, stride, (GLvoid *)buffer_offset); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glSecondaryColor3bEXT", "(BBB)V", (void*)&Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3bEXT, "glSecondaryColor3bEXT", (void*)&glSecondaryColor3bEXT}, {"glSecondaryColor3fEXT", "(FFF)V", (void*)&Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3fEXT, "glSecondaryColor3fEXT", (void*)&glSecondaryColor3fEXT}, {"glSecondaryColor3ubEXT", "(BBB)V", (void*)&Java_org_lwjgl_opengl_EXTSecondaryColor_glSecondaryColor3ubEXT, "glSecondaryColor3ubEXT", (void*)&glSecondaryColor3ubEXT}, {"nglSecondaryColorPointerEXT", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXT, "glSecondaryColorPointerEXT", (void*)&glSecondaryColorPointerEXT}, {"nglSecondaryColorPointerEXTVBO", "(IIII)V", (void*)&Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXTVBO, NULL, NULL} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_EXTBlendFuncSeparate.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTBlendFuncSeparate // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glBlendFuncSeparateEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); static glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT; /* * Class: org.lwjgl.opengl.EXTBlendFuncSeparate * Method: glBlendFuncSeparateEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTBlendFuncSeparate_glBlendFuncSeparateEXT (JNIEnv * env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha) { glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendFuncSeparate_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glBlendFuncSeparateEXT", "(IIII)V", (void*)&Java_org_lwjgl_opengl_EXTBlendFuncSeparate_glBlendFuncSeparateEXT, "glBlendFuncSeparateEXT", (void*)&glBlendFuncSeparateEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_EXTDepthBoundsTest.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTFogCoord.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTFogCoord // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glFogCoordfEXTPROC) (GLfloat coord); typedef void (APIENTRY * glFogCoordPointerEXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); static glFogCoordfEXTPROC glFogCoordfEXT; static glFogCoordPointerEXTPROC glFogCoordPointerEXT; /* * Class: org.lwjgl.opengl.EXTFogCoord * Method: glFogCoordfEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_glFogCoordfEXT (JNIEnv * env, jclass clazz, jfloat coord) { glFogCoordfEXT(coord); } /* * Class: org.lwjgl.opengl.EXTFogCoord * Method: nglFogCoordPointerEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXT (JNIEnv * env, jclass clazz, jint type, jint stride, jobject data, jint data_offset) { GLvoid *data_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, data) + data_offset); glFogCoordPointerEXT(type, stride, data_ptr); } /* * Class: org.lwjgl.opengl.EXTFogCoord * Method: nglFogCoordPointerEXTVBO */ static void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXTVBO (JNIEnv * env, jclass clazz, jint type, jint stride, jint buffer_offset) { glFogCoordPointerEXT(type, stride, (GLvoid *)buffer_offset); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glFogCoordfEXT", "(F)V", (void*)&Java_org_lwjgl_opengl_EXTFogCoord_glFogCoordfEXT, "glFogCoordfEXT", (void*)&glFogCoordfEXT}, {"nglFogCoordPointerEXT", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXT, "glFogCoordPointerEXT", (void*)&glFogCoordPointerEXT}, {"nglFogCoordPointerEXTVBO", "(III)V", (void*)&Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXTVBO, NULL, NULL} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_EXTCompiledVertexArray.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTCompiledVertexArray // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glLockArraysEXTPROC) (GLint first, GLsizei count); typedef void (APIENTRY * glUnlockArraysEXTPROC) (); static glLockArraysEXTPROC glLockArraysEXT; static glUnlockArraysEXTPROC glUnlockArraysEXT; /* * Class: org.lwjgl.opengl.EXTCompiledVertexArray * Method: glLockArraysEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_glLockArraysEXT (JNIEnv * env, jclass clazz, jint first, jint count) { glLockArraysEXT(first, count); } /* * Class: org.lwjgl.opengl.EXTCompiledVertexArray * Method: glUnlockArraysEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_glUnlockArraysEXT (JNIEnv * env, jclass clazz) { glUnlockArraysEXT(); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glLockArraysEXT", "(II)V", (void*)&Java_org_lwjgl_opengl_EXTCompiledVertexArray_glLockArraysEXT, "glLockArraysEXT", (void*)&glLockArraysEXT}, {"glUnlockArraysEXT", "()V", (void*)&Java_org_lwjgl_opengl_EXTCompiledVertexArray_glUnlockArraysEXT, "glUnlockArraysEXT", (void*)&glUnlockArraysEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_EXTBlendEquationSeparate.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTMultiDrawArrays.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTMultiDrawArrays // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glMultiDrawArraysEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); static glMultiDrawArraysEXTPROC glMultiDrawArraysEXT; /* * Class: org.lwjgl.opengl.EXTMultiDrawArrays * Method: nglMultiDrawArraysEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTMultiDrawArrays_nglMultiDrawArraysEXT (JNIEnv * env, jclass clazz, jint mode, jobject piFirst, jint piFirst_offset, jobject piCount, jint piCount_offset, jint primcount) { GLint *piFirst_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piFirst) + piFirst_offset; GLint *piCount_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piCount) + piCount_offset; glMultiDrawArraysEXT(mode, piFirst_ptr, piCount_ptr, primcount); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMultiDrawArrays_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglMultiDrawArraysEXT", "(ILjava/nio/IntBuffer;ILjava/nio/IntBuffer;II)V", (void*)&Java_org_lwjgl_opengl_EXTMultiDrawArrays_nglMultiDrawArraysEXT, "glMultiDrawArraysEXT", (void*)&glMultiDrawArraysEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/ext/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 18 May 2004 20:57:35 -0000 1.4 +++ Makefile.am 10 Sep 2004 08:13:52 -0000 1.5 @@ -2,15 +2,15 @@ libext_la_SOURCES = $(SRC) INCLUDES=-I.. -SRC=org_lwjgl_opengl_EXTBlendEquationSeparate.cpp \ - org_lwjgl_opengl_EXTBlendFuncSeparate.cpp \ - org_lwjgl_opengl_EXTCompiledVertexArray.cpp \ - org_lwjgl_opengl_EXTDepthBoundsTest.cpp \ - org_lwjgl_opengl_EXTDrawRangeElements.cpp \ - org_lwjgl_opengl_EXTFogCoord.cpp \ - org_lwjgl_opengl_EXTMultiDrawArrays.cpp \ - org_lwjgl_opengl_EXTPointParameters.cpp \ - org_lwjgl_opengl_EXTSecondaryColor.cpp \ - org_lwjgl_opengl_EXTStencilTwoSide.cpp \ - org_lwjgl_opengl_EXTVertexShader.cpp \ - org_lwjgl_opengl_EXTVertexWeighting.cpp +SRC=org_lwjgl_opengl_EXTBlendEquationSeparate.c \ + org_lwjgl_opengl_EXTBlendFuncSeparate.c \ + org_lwjgl_opengl_EXTCompiledVertexArray.c \ + org_lwjgl_opengl_EXTDepthBoundsTest.c \ + org_lwjgl_opengl_EXTDrawRangeElements.c \ + org_lwjgl_opengl_EXTFogCoord.c \ + org_lwjgl_opengl_EXTMultiDrawArrays.c \ + org_lwjgl_opengl_EXTPointParameters.c \ + org_lwjgl_opengl_EXTSecondaryColor.c \ + org_lwjgl_opengl_EXTStencilTwoSide.c \ + org_lwjgl_opengl_EXTVertexShader.c \ + org_lwjgl_opengl_EXTVertexWeighting.c --- NEW FILE: org_lwjgl_opengl_EXTDepthBoundsTest.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTDepthBoundsTest // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glDepthBoundsEXTPROC) (GLclampd zmin, GLclampd zmax); static glDepthBoundsEXTPROC glDepthBoundsEXT; /* * Class: org.lwjgl.opengl.EXTDepthBoundsTest * Method: glDepthBoundsEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT (JNIEnv * env, jclass clazz, jfloat zmin, jfloat zmax) { glDepthBoundsEXT(zmin, zmax); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glDepthBoundsEXT", "(FF)V", (void*)&Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT, "glDepthBoundsEXT", (void*)&glDepthBoundsEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_EXTDrawRangeElements.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTStencilTwoSide.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTStencilTwoSide // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glActiveStencilFaceEXTPROC) (GLenum face); static glActiveStencilFaceEXTPROC glActiveStencilFaceEXT; /* * Class: org.lwjgl.opengl.EXTStencilTwoSide * Method: glActiveStencilFaceEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTStencilTwoSide_glActiveStencilFaceEXT (JNIEnv * env, jclass clazz, jint face) { glActiveStencilFaceEXT(face); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilTwoSide_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glActiveStencilFaceEXT", "(I)V", (void*)&Java_org_lwjgl_opengl_EXTStencilTwoSide_glActiveStencilFaceEXT, "glActiveStencilFaceEXT", (void*)&glActiveStencilFaceEXT} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_EXTSecondaryColor.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_EXTDrawRangeElements.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTDrawRangeElements // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glDrawRange... [truncated message content] |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/nv In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6954/src/native/common/nv Modified Files: Makefile.am Added Files: org_lwjgl_opengl_NVEvaluators.c org_lwjgl_opengl_NVFence.c org_lwjgl_opengl_NVFragmentProgram.c org_lwjgl_opengl_NVHalfFloat.c org_lwjgl_opengl_NVOcclusionQuery.c org_lwjgl_opengl_NVPixelDataRange.c org_lwjgl_opengl_NVPointSprite.c org_lwjgl_opengl_NVPrimitiveRestart.c org_lwjgl_opengl_NVProgram.c org_lwjgl_opengl_NVRegisterCombiners.c org_lwjgl_opengl_NVRegisterCombiners2.c org_lwjgl_opengl_NVVertexArrayRange.c org_lwjgl_opengl_NVVertexProgram.c Removed Files: org_lwjgl_opengl_NVEvaluators.cpp org_lwjgl_opengl_NVFence.cpp org_lwjgl_opengl_NVFragmentProgram.cpp org_lwjgl_opengl_NVHalfFloat.cpp org_lwjgl_opengl_NVOcclusionQuery.cpp org_lwjgl_opengl_NVPixelDataRange.cpp org_lwjgl_opengl_NVPointSprite.cpp org_lwjgl_opengl_NVPrimitiveRestart.cpp org_lwjgl_opengl_NVProgram.cpp org_lwjgl_opengl_NVRegisterCombiners.cpp org_lwjgl_opengl_NVRegisterCombiners2.cpp org_lwjgl_opengl_NVVertexArrayRange.cpp org_lwjgl_opengl_NVVertexProgram.cpp Log Message: Converted native code from C++ (.cpp files) to C (.c files), thus avoiding an annoying dependency on the standard C++ library on Linux. We weren't using any particular C++ features anyway. --- org_lwjgl_opengl_NVProgram.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVPointSprite.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVPointSprite // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glPointParameteriNVPROC) (GLenum pname, GLint param); typedef void (APIENTRY * glPointParameterivNVPROC) (GLenum pname, const GLint *params); static glPointParameteriNVPROC glPointParameteriNV; static glPointParameterivNVPROC glPointParameterivNV; /* * Class: org.lwjgl.opengl.NVPointSprite * Method: glPointParameteriNV */ static void JNICALL Java_org_lwjgl_opengl_NVPointSprite_glPointParameteriNV (JNIEnv * env, jclass clazz, jint pname, jint param) { glPointParameteriNV(pname, param); } /* * Class: org.lwjgl.opengl.NVPointSprite * Method: nglPointParameterivNV */ static void JNICALL Java_org_lwjgl_opengl_NVPointSprite_nglPointParameterivNV (JNIEnv * env, jclass clazz, jint pname, jobject piParams, jint piParams_offset) { GLint *piParams_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glPointParameterivNV(pname, piParams_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPointSprite_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glPointParameteriNV", "(II)V", (void*)&Java_org_lwjgl_opengl_NVPointSprite_glPointParameteriNV, "glPointParameteriNV", (void*)&glPointParameteriNV}, {"nglPointParameterivNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVPointSprite_nglPointParameterivNV, "glPointParameterivNV", (void*)&glPointParameterivNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_NVProgram.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVProgram // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glLoadProgramNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); typedef void (APIENTRY * glBindProgramNVPROC) (GLenum target, GLuint id); typedef void (APIENTRY * glDeleteProgramsNVPROC) (GLsizei n, const GLuint *ids); typedef void (APIENTRY * glGenProgramsNVPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRY * glGetProgramStringNVPROC) (GLuint id, GLenum pname, GLubyte *program); typedef GLboolean (APIENTRY * glIsProgramNVPROC) (GLuint id); typedef GLboolean (APIENTRY * glAreProgramsResidentNVPROC) (GLsizei n, const GLuint *ids, GLboolean *residences); typedef void (APIENTRY * glRequestResidentProgramsNVPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRY * glGetProgramivNVPROC) (GLuint id, GLenum pname, GLint *params); static glLoadProgramNVPROC glLoadProgramNV; static glBindProgramNVPROC glBindProgramNV; static glDeleteProgramsNVPROC glDeleteProgramsNV; static glGenProgramsNVPROC glGenProgramsNV; static glGetProgramStringNVPROC glGetProgramStringNV; static glIsProgramNVPROC glIsProgramNV; static glAreProgramsResidentNVPROC glAreProgramsResidentNV; static glRequestResidentProgramsNVPROC glRequestResidentProgramsNV; static glGetProgramivNVPROC glGetProgramivNV; /* * Class: org.lwjgl.opengl.NVProgram * Method: nglLoadProgramNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglLoadProgramNV (JNIEnv * env, jclass clazz, jint target, jint programID, jint length, jobject string, jint stringOffset) { const GLubyte *string_ptr = (const GLubyte *)(*env)->GetDirectBufferAddress(env, string) + stringOffset; glLoadProgramNV(target, programID, length, string_ptr); } /* * Class: org.lwjgl.opengl.NVProgram * Method: glBindProgramNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_glBindProgramNV (JNIEnv * env, jclass clazz, jint target, jint programID) { glBindProgramNV(target, programID); } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglDeleteProgramsNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglDeleteProgramsNV (JNIEnv * env, jclass clazz, jint n, jobject programs, jint programsOffset) { GLuint *programs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, programs) + programsOffset; glDeleteProgramsNV(n, programs_ptr); } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglGenProgramsNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGenProgramsNV (JNIEnv * env, jclass clazz, jint n, jobject programs, jint programsOffset) { GLuint *programs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, programs) + programsOffset; glGenProgramsNV(n, programs_ptr); } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglGetProgramivNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGetProgramivNV (JNIEnv * env, jclass clazz, jint programID, jint parameterName, jobject params, jint paramsOffset) { GLint *params_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, params) + paramsOffset; glGetProgramivNV(programID, parameterName, params_ptr); } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglGetProgramStringNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGetProgramStringNV (JNIEnv * env, jclass clazz, jint programID, jint parameterName, jobject paramString, jint paramStringOffset) { GLubyte *paramString_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, paramString) + paramStringOffset; glGetProgramStringNV(programID, parameterName, paramString_ptr); } /* * Class: org.lwjgl.opengl.NVProgram * Method: glIsProgramNV */ static jboolean JNICALL Java_org_lwjgl_opengl_NVProgram_glIsProgramNV (JNIEnv * env, jclass clazz, jint programID) { GLboolean result = glIsProgramNV(programID); return result; } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglAreProgramsResidentNV */ static jboolean JNICALL Java_org_lwjgl_opengl_NVProgram_nglAreProgramsResidentNV (JNIEnv * env, jclass clazz, jint n, jobject programIDs, jint programIDsOffset, jobject programResidences, jint programResidencesOffset) { GLuint *programIDs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, programIDs) + programIDsOffset; GLubyte *programResidences_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, programResidences) + programResidencesOffset; GLboolean result = glAreProgramsResidentNV(n, programIDs_ptr, programResidences_ptr); return result; } /* * Class: org.lwjgl.opengl.NVProgram * Method: nglRequestResidentProgramsNV */ static void JNICALL Java_org_lwjgl_opengl_NVProgram_nglRequestResidentProgramsNV (JNIEnv * env, jclass clazz, jint n, jobject programIDs, jint programIDsOffset) { GLuint *programIDs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, programIDs) + programIDsOffset; glRequestResidentProgramsNV(n, programIDs_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglLoadProgramNV", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglLoadProgramNV, "glLoadProgramNV", (void*)&glLoadProgramNV}, {"glBindProgramNV", "(II)V", (void*)&Java_org_lwjgl_opengl_NVProgram_glBindProgramNV, "glBindProgramNV", (void*)&glBindProgramNV}, {"nglDeleteProgramsNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglDeleteProgramsNV, "glDeleteProgramsNV", (void*)&glDeleteProgramsNV}, {"nglGenProgramsNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglGenProgramsNV, "glGenProgramsNV", (void*)&glGenProgramsNV}, {"nglGetProgramivNV", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglGetProgramivNV, "glGetProgramivNV", (void*)&glGetProgramivNV}, {"nglGetProgramStringNV", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglGetProgramStringNV, "glGetProgramStringNV", (void*)&glGetProgramStringNV}, {"glIsProgramNV", "(I)Z", (void*)&Java_org_lwjgl_opengl_NVProgram_glIsProgramNV, "glIsProgramNV", (void*)&glIsProgramNV}, {"nglAreProgramsResidentNV", "(ILjava/nio/IntBuffer;ILjava/nio/ByteBuffer;I)Z", (void*)&Java_org_lwjgl_opengl_NVProgram_nglAreProgramsResidentNV, "glAreProgramsResidentNV", (void*)&glAreProgramsResidentNV}, {"nglRequestResidentProgramsNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVProgram_nglRequestResidentProgramsNV, "glRequestResidentProgramsNV", (void*)&glRequestResidentProgramsNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_NVPointSprite.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVEvaluators.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVEvaluators // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); typedef void (APIENTRY * glMapParameterivNVPROC) (GLenum target, GLenum pname, const GLint *params); typedef void (APIENTRY * glMapParameterfvNVPROC) (GLenum target, GLenum pname, const GLfloat *params); typedef void (APIENTRY * glGetMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); typedef void (APIENTRY * glGetMapParameterivNVPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRY * glGetMapParameterfvNVPROC) (GLenum target, GLenum pname, GLfloat *params); typedef void (APIENTRY * glGetMapAttribParameterivNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); typedef void (APIENTRY * glGetMapAttribParameterfvNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); typedef void (APIENTRY * glEvalMapsNVPROC) (GLenum target, GLenum mode); static glMapControlPointsNVPROC glMapControlPointsNV; static glMapParameterivNVPROC glMapParameterivNV; static glMapParameterfvNVPROC glMapParameterfvNV; static glGetMapControlPointsNVPROC glGetMapControlPointsNV; static glGetMapParameterivNVPROC glGetMapParameterivNV; static glGetMapParameterfvNVPROC glGetMapParameterfvNV; static glGetMapAttribParameterivNVPROC glGetMapAttribParameterivNV; static glGetMapAttribParameterfvNVPROC glGetMapAttribParameterfvNV; static glEvalMapsNVPROC glEvalMapsNV; /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglGetMapControlPointsNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapControlPointsNV (JNIEnv * env, jclass clazz, jint target, jint index, jint type, jint ustride, jint vstride, jboolean packed, jobject pPoints, jint pPoints_offset) { GLvoid *pPoints_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pPoints) + pPoints_offset); glGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglMapControlPointsNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapControlPointsNV (JNIEnv * env, jclass clazz, jint target, jint index, jint type, jint ustride, jint vstride, jint uorder, jint vorder, jboolean packed, jobject pPoints, jint pPoints_offset) { GLvoid *pPoints_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pPoints) + pPoints_offset); glMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglMapParameterfvNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterfvNV (JNIEnv * env, jclass clazz, jint target, jint pname, jobject pfParams, jint pfParams_offset) { GLfloat *pfParams_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfParams) + pfParams_offset; glMapParameterfvNV(target, pname, pfParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglMapParameterivNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterivNV (JNIEnv * env, jclass clazz, jint target, jint pname, jobject piParams, jint piParams_offset) { GLint *piParams_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glMapParameterivNV(target, pname, piParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglGetMapParameterfvNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterfvNV (JNIEnv * env, jclass clazz, jint target, jint pname, jobject pfParams, jint pfParams_offset) { GLfloat *pfParams_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfParams) + pfParams_offset; glGetMapParameterfvNV(target, pname, pfParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglGetMapParameterivNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterivNV (JNIEnv * env, jclass clazz, jint target, jint pname, jobject piParams, jint piParams_offset) { GLint *piParams_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glGetMapParameterivNV(target, pname, piParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglGetMapAttribParameterfvNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterfvNV (JNIEnv * env, jclass clazz, jint target, jint index, jint pname, jobject pfParams, jint pfParams_offset) { GLfloat *pfParams_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, pfParams) + pfParams_offset; glGetMapAttribParameterfvNV(target, index, pname, pfParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: nglGetMapAttribParameterivNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterivNV (JNIEnv * env, jclass clazz, jint target, jint index, jint pname, jobject piParams, jint piParams_offset) { GLint *piParams_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glGetMapAttribParameterivNV(target, index, pname, piParams_ptr); } /* * Class: org.lwjgl.opengl.NVEvaluators * Method: glEvalMapsNV */ static void JNICALL Java_org_lwjgl_opengl_NVEvaluators_glEvalMapsNV (JNIEnv * env, jclass clazz, jint target, jint mode) { glEvalMapsNV(target, mode); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglGetMapControlPointsNV", "(IIIIIZLjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglGetMapControlPointsNV, "glGetMapControlPointsNV", (void*)&glGetMapControlPointsNV}, {"nglMapControlPointsNV", "(IIIIIIIZLjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglMapControlPointsNV, "glMapControlPointsNV", (void*)&glMapControlPointsNV}, {"nglMapParameterfvNV", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterfvNV, "glMapParameterfvNV", (void*)&glMapParameterfvNV}, {"nglMapParameterivNV", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterivNV, "glMapParameterivNV", (void*)&glMapParameterivNV}, {"nglGetMapParameterfvNV", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterfvNV, "glGetMapParameterfvNV", (void*)&glGetMapParameterfvNV}, {"nglGetMapParameterivNV", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterivNV, "glGetMapParameterivNV", (void*)&glGetMapParameterivNV}, {"nglGetMapAttribParameterfvNV", "(IIILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterfvNV, "glGetMapAttribParameterfvNV", (void*)&glGetMapAttribParameterfvNV}, {"nglGetMapAttribParameterivNV", "(IIILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterivNV, "glGetMapAttribParameterivNV", (void*)&glGetMapAttribParameterivNV}, {"glEvalMapsNV", "(II)V", (void*)&Java_org_lwjgl_opengl_NVEvaluators_glEvalMapsNV, "glEvalMapsNV", (void*)&glEvalMapsNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_NVPrimitiveRestart.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVHalfFloat.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVHalfFloat // ---------------------------------- #include "extgl.h" typedef unsigned short GLhalf; typedef void (APIENTRY * glVertex2hNVPROC) (GLhalf x, GLhalf y); typedef void (APIENTRY * glVertex3hNVPROC) (GLhalf x, GLhalf y, GLhalf z); typedef void (APIENTRY * glVertex4hNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void (APIENTRY * glNormal3hNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz); typedef void (APIENTRY * glColor3hNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void (APIENTRY * glColor4hNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha); typedef void (APIENTRY * glTexCoord1hNVPROC) (GLhalf s); typedef void (APIENTRY * glTexCoord2hNVPROC) (GLhalf s, GLhalf t); typedef void (APIENTRY * glTexCoord3hNVPROC) (GLhalf s, GLhalf t, GLhalf r); typedef void (APIENTRY * glTexCoord4hNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void (APIENTRY * glMultiTexCoord1hNVPROC) (GLenum target, GLhalf s); typedef void (APIENTRY * glMultiTexCoord2hNVPROC) (GLenum target, GLhalf s, GLhalf t); typedef void (APIENTRY * glMultiTexCoord3hNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r); typedef void (APIENTRY * glMultiTexCoord4hNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q); typedef void (APIENTRY * glFogCoordhNVPROC) (GLhalf fog); typedef void (APIENTRY * glSecondaryColor3hNVPROC) (GLhalf red, GLhalf green, GLhalf blue); typedef void (APIENTRY * glVertexAttrib1hNVPROC) (GLuint index, GLhalf x); typedef void (APIENTRY * glVertexAttrib2hNVPROC) (GLuint index, GLhalf x, GLhalf y); typedef void (APIENTRY * glVertexAttrib3hNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z); typedef void (APIENTRY * glVertexAttrib4hNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w); typedef void (APIENTRY * glVertexAttribs1hvNVPROC) (GLuint index, GLsizei n, const GLhalf *v); typedef void (APIENTRY * glVertexAttribs2hvNVPROC) (GLuint index, GLsizei n, const GLhalf *v); typedef void (APIENTRY * glVertexAttribs3hvNVPROC) (GLuint index, GLsizei n, const GLhalf *v); typedef void (APIENTRY * glVertexAttribs4hvNVPROC) (GLuint index, GLsizei n, const GLhalf *v); static glVertex2hNVPROC glVertex2hNV; static glVertex3hNVPROC glVertex3hNV; static glVertex4hNVPROC glVertex4hNV; static glNormal3hNVPROC glNormal3hNV; static glColor3hNVPROC glColor3hNV; static glColor4hNVPROC glColor4hNV; static glTexCoord1hNVPROC glTexCoord1hNV; static glTexCoord2hNVPROC glTexCoord2hNV; static glTexCoord3hNVPROC glTexCoord3hNV; static glTexCoord4hNVPROC glTexCoord4hNV; static glMultiTexCoord1hNVPROC glMultiTexCoord1hNV; static glMultiTexCoord2hNVPROC glMultiTexCoord2hNV; static glMultiTexCoord3hNVPROC glMultiTexCoord3hNV; static glMultiTexCoord4hNVPROC glMultiTexCoord4hNV; static glFogCoordhNVPROC glFogCoordhNV; static glSecondaryColor3hNVPROC glSecondaryColor3hNV; static glVertexAttrib1hNVPROC glVertexAttrib1hNV; static glVertexAttrib2hNVPROC glVertexAttrib2hNV; static glVertexAttrib3hNVPROC glVertexAttrib3hNV; static glVertexAttrib4hNVPROC glVertexAttrib4hNV; static glVertexAttribs1hvNVPROC glVertexAttribs1hvNV; static glVertexAttribs2hvNVPROC glVertexAttribs2hvNV; static glVertexAttribs3hvNVPROC glVertexAttribs3hvNV; static glVertexAttribs4hvNVPROC glVertexAttribs4hvNV; /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertex2hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex2hNV (JNIEnv * env, jclass clazz, jshort x, jshort y) { glVertex2hNV(x, y); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertex3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex3hNV (JNIEnv * env, jclass clazz, jshort x, jshort y, jshort z) { glVertex3hNV(x, y, z); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertex4hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertex4hNV (JNIEnv * env, jclass clazz, jshort x, jshort y, jshort z, jshort w) { glVertex4hNV(x, y, z, w); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glNormal3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glNormal3hNV (JNIEnv * env, jclass clazz, jshort nx, jshort ny, jshort nz) { glNormal3hNV(nx, ny, nz); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glColor3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glColor3hNV (JNIEnv * env, jclass clazz, jshort red, jshort green, jshort blue) { glColor3hNV(red, green, blue); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glColor4hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glColor4hNV (JNIEnv * env, jclass clazz, jshort red, jshort green, jshort blue, jshort alpha) { glColor4hNV(red, green, blue, alpha); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glTexCoord1hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord1hNV (JNIEnv * env, jclass clazz, jshort s) { glTexCoord1hNV(s); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glTexCoord2hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord2hNV (JNIEnv * env, jclass clazz, jshort s, jshort t) { glTexCoord2hNV(s, t); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glTexCoord3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord3hNV (JNIEnv * env, jclass clazz, jshort s, jshort t, jshort r) { glTexCoord3hNV(s, t, r); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glTexCoord4hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord4hNV (JNIEnv * env, jclass clazz, jshort s, jshort t, jshort r, jshort q) { glTexCoord4hNV(s, t, r, q); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glMultiTexCoord1hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord1hNV (JNIEnv * env, jclass clazz, jint target, jshort s) { glMultiTexCoord1hNV(target, s); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glMultiTexCoord2hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord2hNV (JNIEnv * env, jclass clazz, jint target, jshort s, jshort t) { glMultiTexCoord2hNV(target, s, t); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glMultiTexCoord3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord3hNV (JNIEnv * env, jclass clazz, jint target, jshort s, jshort t, jshort r) { glMultiTexCoord3hNV(target, s, t, r); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glMultiTexCoord4hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord4hNV (JNIEnv * env, jclass clazz, jint target, jshort s, jshort t, jshort r, jshort q) { glMultiTexCoord4hNV(target, s, t, r, q); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glFogCoordhNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glFogCoordhNV (JNIEnv * env, jclass clazz, jshort fog) { glFogCoordhNV(fog); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glSecondaryColor3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glSecondaryColor3hNV (JNIEnv * env, jclass clazz, jshort red, jshort green, jshort blue) { glSecondaryColor3hNV(red, green, blue); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib1hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib1hNV (JNIEnv * env, jclass clazz, jint index, jshort x) { glVertexAttrib1hNV(index, x); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib2hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib2hNV (JNIEnv * env, jclass clazz, jint index, jshort x, jshort y) { glVertexAttrib2hNV(index, x, y); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib3hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib3hNV (JNIEnv * env, jclass clazz, jint index, jshort x, jshort y, jshort z) { glVertexAttrib3hNV(index, x, y, z); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: glVertexAttrib4hNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib4hNV (JNIEnv * env, jclass clazz, jint index, jshort x, jshort y, jshort z, jshort w) { glVertexAttrib4hNV(index, x, y, z, w); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: nglVertexAttribs1hvNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs1hvNV (JNIEnv * env, jclass clazz, jint index, jint n, jobject attribs, jint attribsOffset) { GLushort *attribs_ptr = (GLushort *)(*env)->GetDirectBufferAddress(env, attribs) + attribsOffset; glVertexAttribs1hvNV(index, n, attribs_ptr); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: nglVertexAttribs2hvNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs2hvNV (JNIEnv * env, jclass clazz, jint index, jint n, jobject attribs, jint attribsOffset) { GLushort *attribs_ptr = (GLushort *)(*env)->GetDirectBufferAddress(env, attribs) + attribsOffset; glVertexAttribs2hvNV(index, n, attribs_ptr); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: nglVertexAttribs3hvNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs3hvNV (JNIEnv * env, jclass clazz, jint index, jint n, jobject attribs, jint attribsOffset) { GLushort *attribs_ptr = (GLushort *)(*env)->GetDirectBufferAddress(env, attribs) + attribsOffset; glVertexAttribs3hvNV(index, n, attribs_ptr); } /* * Class: org.lwjgl.opengl.NVHalfFloat * Method: nglVertexAttribs4hvNV */ static void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs4hvNV (JNIEnv * env, jclass clazz, jint index, jint n, jobject attribs, jint attribsOffset) { GLushort *attribs_ptr = (GLushort *)(*env)->GetDirectBufferAddress(env, attribs) + attribsOffset; glVertexAttribs4hvNV(index, n, attribs_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glVertex2hNV", "(SS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertex2hNV, "glVertex2hNV", (void*)&glVertex2hNV}, {"glVertex3hNV", "(SSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertex3hNV, "glVertex3hNV", (void*)&glVertex3hNV}, {"glVertex4hNV", "(SSSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertex4hNV, "glVertex4hNV", (void*)&glVertex4hNV}, {"glNormal3hNV", "(SSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glNormal3hNV, "glNormal3hNV", (void*)&glNormal3hNV}, {"glColor3hNV", "(SSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glColor3hNV, "glColor3hNV", (void*)&glColor3hNV}, {"glColor4hNV", "(SSSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glColor4hNV, "glColor4hNV", (void*)&glColor4hNV}, {"glTexCoord1hNV", "(S)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord1hNV, "glTexCoord1hNV", (void*)&glTexCoord1hNV}, {"glTexCoord2hNV", "(SS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord2hNV, "glTexCoord2hNV", (void*)&glTexCoord2hNV}, {"glTexCoord3hNV", "(SSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord3hNV, "glTexCoord3hNV", (void*)&glTexCoord3hNV}, {"glTexCoord4hNV", "(SSSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glTexCoord4hNV, "glTexCoord4hNV", (void*)&glTexCoord4hNV}, {"glMultiTexCoord1hNV", "(IS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord1hNV, "glMultiTexCoord1hNV", (void*)&glMultiTexCoord1hNV}, {"glMultiTexCoord2hNV", "(ISS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord2hNV, "glMultiTexCoord2hNV", (void*)&glMultiTexCoord2hNV}, {"glMultiTexCoord3hNV", "(ISSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord3hNV, "glMultiTexCoord3hNV", (void*)&glMultiTexCoord3hNV}, {"glMultiTexCoord4hNV", "(ISSSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glMultiTexCoord4hNV, "glMultiTexCoord4hNV", (void*)&glMultiTexCoord4hNV}, {"glFogCoordhNV", "(S)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glFogCoordhNV, "glFogCoordhNV", (void*)&glFogCoordhNV}, {"glSecondaryColor3hNV", "(SSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glSecondaryColor3hNV, "glSecondaryColor3hNV", (void*)&glSecondaryColor3hNV}, {"glVertexAttrib1hNV", "(IS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib1hNV, "glVertexAttrib1hNV", (void*)&glVertexAttrib1hNV}, {"glVertexAttrib2hNV", "(ISS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib2hNV, "glVertexAttrib2hNV", (void*)&glVertexAttrib2hNV}, {"glVertexAttrib3hNV", "(ISSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib3hNV, "glVertexAttrib3hNV", (void*)&glVertexAttrib3hNV}, {"glVertexAttrib4hNV", "(ISSSS)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_glVertexAttrib4hNV, "glVertexAttrib4hNV", (void*)&glVertexAttrib4hNV}, {"nglVertexAttribs1hvNV", "(IILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs1hvNV, "glVertexAttribs1hvNV", (void*)&glVertexAttribs1hvNV}, {"nglVertexAttribs2hvNV", "(IILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs2hvNV, "glVertexAttribs2hvNV", (void*)&glVertexAttribs2hvNV}, {"nglVertexAttribs3hvNV", "(IILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs3hvNV, "glVertexAttribs3hvNV", (void*)&glVertexAttribs3hvNV}, {"nglVertexAttribs4hvNV", "(IILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs4hvNV, "glVertexAttribs4hvNV", (void*)&glVertexAttribs4hvNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_NVFragmentProgram.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFragmentProgram // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); static glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; static glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; /* * Class: org.lwjgl.opengl.NVFragmentProgram * Method: nglProgramNamedParameter4fNV */ static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jfloat x, jfloat y, jfloat z, jfloat w) { GLubyte *name_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, name) + nameOffset; glProgramNamedParameter4fNV(id, length, name_ptr, x, y, z, w); } /* * Class: org.lwjgl.opengl.NVFragmentProgram * Method: nglGetProgramNamedParameterfvNV */ static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jobject params, jint paramsOffset) { GLubyte *name_ptr = (GLubyte *)(*env)->GetDirectBufferAddress(env, name) + nameOffset; GLfloat *params_ptr = (GLfloat *)(*env)->GetDirectBufferAddress(env, params) + paramsOffset; glGetProgramNamedParameterfvNV(id, length, name_ptr, params_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglProgramNamedParameter4fNV", "(IILjava/nio/ByteBuffer;IFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV, "glProgramNamedParameter4fNV", (void*)&glProgramNamedParameter4fNV}, {"nglGetProgramNamedParameterfvNV", "(IILjava/nio/ByteBuffer;ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV, "glGetProgramNamedParameterfvNV", (void*)&glGetProgramNamedParameterfvNV}, }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_NVRegisterCombiners.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVOcclusionQuery.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVOcclusionQuery // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glGenOcclusionQueriesNVPROC) (GLsizei n, GLuint *ids); typedef void (APIENTRY * glDeleteOcclusionQueriesNVPROC) (GLsizei n, const GLuint *ids); typedef GLboolean (APIENTRY * glIsOcclusionQueryNVPROC) (GLuint id); typedef void (APIENTRY * glBeginOcclusionQueryNVPROC) (GLuint id); typedef void (APIENTRY * glEndOcclusionQueryNVPROC) (void); typedef void (APIENTRY * glGetOcclusionQueryivNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRY * glGetOcclusionQueryuivNVPROC) (GLuint id, GLenum pname, GLuint *params); static glGenOcclusionQueriesNVPROC glGenOcclusionQueriesNV; static glDeleteOcclusionQueriesNVPROC glDeleteOcclusionQueriesNV; static glIsOcclusionQueryNVPROC glIsOcclusionQueryNV; static glBeginOcclusionQueryNVPROC glBeginOcclusionQueryNV; static glEndOcclusionQueryNVPROC glEndOcclusionQueryNV; static glGetOcclusionQueryivNVPROC glGetOcclusionQueryivNV; static glGetOcclusionQueryuivNVPROC glGetOcclusionQueryuivNV; /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: nglGenOcclusionQueriesNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGenOcclusionQueriesNV (JNIEnv * env, jclass clazz, jint n, jobject piIDs, jint piIDs_offset) { GLuint *piIDs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, piIDs) + piIDs_offset; glGenOcclusionQueriesNV(n, piIDs_ptr); } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: nglDeleteOcclusionQueriesNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglDeleteOcclusionQueriesNV (JNIEnv * env, jclass clazz, jint n, jobject piIDs, jint piIDs_offset) { GLuint *piIDs_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, piIDs) + piIDs_offset; glDeleteOcclusionQueriesNV(n, piIDs_ptr); } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: glIsOcclusionQueryNV */ static jboolean JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_glIsOcclusionQueryNV (JNIEnv * env, jclass clazz, jint id) { GLboolean result = glIsOcclusionQueryNV(id); return result; } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: glBeginOcclusionQueryNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_glBeginOcclusionQueryNV (JNIEnv * env, jclass clazz, jint id) { glBeginOcclusionQueryNV(id); } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: glEndOcclusionQueryNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_glEndOcclusionQueryNV (JNIEnv * env, jclass clazz) { glEndOcclusionQueryNV(); } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: nglGetOcclusionQueryivNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryivNV (JNIEnv * env, jclass clazz, jint id, jint pname, jobject piParams, jint piParams_offset) { GLint *piParams_ptr = (GLint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glGetOcclusionQueryivNV(id, pname, piParams_ptr); } /* * Class: org.lwjgl.opengl.NVOcclusionQuery * Method: nglGetOcclusionQueryuivNV */ static void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryuivNV (JNIEnv * env, jclass clazz, jint id, jint pname, jobject piParams, jint piParams_offset) { GLuint *piParams_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, piParams) + piParams_offset; glGetOcclusionQueryuivNV(id, pname, piParams_ptr); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglGenOcclusionQueriesNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_nglGenOcclusionQueriesNV, "glGenOcclusionQueriesNV", (void*)&glGenOcclusionQueriesNV}, {"nglDeleteOcclusionQueriesNV", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_nglDeleteOcclusionQueriesNV, "glDeleteOcclusionQueriesNV", (void*)&glDeleteOcclusionQueriesNV}, {"glIsOcclusionQueryNV", "(I)Z", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_glIsOcclusionQueryNV, "glIsOcclusionQueryNV", (void*)&glIsOcclusionQueryNV}, {"glBeginOcclusionQueryNV", "(I)V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_glBeginOcclusionQueryNV, "glBeginOcclusionQueryNV", (void*)&glBeginOcclusionQueryNV}, {"glEndOcclusionQueryNV", "()V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_glEndOcclusionQueryNV, "glEndOcclusionQueryNV", (void*)&glEndOcclusionQueryNV}, {"nglGetOcclusionQueryivNV", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryivNV, "glGetOcclusionQueryivNV", (void*)&glGetOcclusionQueryivNV}, {"nglGetOcclusionQueryuivNV", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryuivNV, "glGetOcclusionQueryuivNV", (void*)&glGetOcclusionQueryuivNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_NVVertexArrayRange.cpp DELETED --- --- org_lwjgl_opengl_NVFragmentProgram.cpp DELETED --- --- org_lwjgl_opengl_NVFence.cpp DELETED --- --- org_lwjgl_opengl_NVHalfFloat.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVVertexArrayRange.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVVertexArrayRange // ---------------------------------- #include "extgl.h" #include "common_tools.h" typedef void (APIENTRY * glFlushVertexArrayRangeNVPROC) (void); typedef void (APIENTRY * glVertexArrayRangeNVPROC) (GLsizei size, const GLvoid *pointer); static glFlushVertexArrayRangeNVPROC glFlushVertexArrayRangeNV; static glVertexArrayRangeNVPROC glVertexArrayRangeNV; #ifdef _WIN32 typedef void * (APIENTRY * wglAllocateMemoryNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); typedef void (APIENTRY * wglFreeMemoryNVPROC) (void *pointer); static wglAllocateMemoryNVPROC wglAllocateMemoryNV; static wglFreeMemoryNVPROC wglFreeMemoryNV; #endif /* WIN32 */ #ifdef _X11 typedef void * (APIENTRY * glXAllocateMemoryNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); typedef void (APIENTRY * glXFreeMemoryNVPROC) (void *pointer); static glXAllocateMemoryNVPROC glXAllocateMemoryNV; static glXFreeMemoryNVPROC glXFreeMemoryNV; #endif /* X11 */ /* * Class: org.lwjgl.opengl.NVVertexArrayRange * Method: nglVertexArrayRangeNV */ static void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglVertexArrayRangeNV (JNIEnv * env, jclass clazz, jint size, jobject pPointer, jint pPointer_offset) { GLvoid *pPointer_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pPointer) + pPointer_offset); glVertexArrayRangeNV(size, pPointer_ptr); } /* * Class: org.lwjgl.opengl.NVVertexArrayRange * Method: glFlushVertexArrayRangeNV */ static void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_glFlushVertexArrayRangeNV (JNIEnv * env, jclass clazz) { glFlushVertexArrayRangeNV(); } #ifdef _X11 static jobject JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_glXAllocateMemoryNV (JNIEnv * env, jclass clazz, jint size, jfloat readFrequency, jfloat writeFrequency, jfloat priority) { void *mem_address = glXAllocateMemoryNV((GLint) size, (GLfloat)readFrequency, (GLfloat)writeFrequency, (GLfloat)priority); return safeNewBuffer(env, mem_address, size); } static void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_glXFreeMemoryNV (JNIEnv * env, jclass clazz, jobject pointer) { void *address = (void *)(*env)->GetDirectBufferAddress(env, pointer); glXFreeMemoryNV(address); } #endif #ifdef _WIN32 static jobject JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_wglAllocateMemoryNV (JNIEnv * env, jclass clazz, jint size, jfloat readFrequency, jfloat writeFrequency, jfloat priority) { void *mem_address = wglAllocateMemoryNV((GLint)size, (GLfloat)readFrequency, (GLfloat)writeFrequency, (GLfloat)priority); return safeNewBuffer(env, mem_address, size); } static void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_wglFreeMemoryNV (JNIEnv * env, jclass clazz, jobject pointer) { void *address = (void *)(*env)->GetDirectBufferAddress(env, pointer); wglFreeMemoryNV(address); } #endif #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglVertexArrayRangeNV", "(ILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_nglVertexArrayRangeNV, "glVertexArrayRangeNV", (void*)&glVertexArrayRangeNV}, {"glFlushVertexArrayRangeNV", "()V", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_glFlushVertexArrayRangeNV, "glFlushVertexArrayRangeNV", (void*)&glFlushVertexArrayRangeNV}, #ifdef _X11 {"glXAllocateMemoryNV", "(IFFF)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_glXAllocateMemoryNV, "glXAllocateMemoryNV", (void*)&glXAllocateMemoryNV}, {"glXFreeMemoryNV", "(Ljava/nio/ByteBuffer;)V", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_glXFreeMemoryNV, "glXFreeMemoryNV", (void*)&glXFreeMemoryNV}, #endif #ifdef _WIN32 {"wglAllocateMemoryNV", "(IFFF)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_wglAllocateMemoryNV, "wglAllocateMemoryNV", (void*)&wglAllocateMemoryNV}, {"wglFreeMemoryNV", "(Ljava/nio/ByteBuffer;)V", (void*)&Java_org_lwjgl_opengl_NVVertexArrayRange_wglFreeMemoryNV, "wglFreeMemoryNV", (void*)&wglFreeMemoryNV} #endif }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- org_lwjgl_opengl_NVRegisterCombiners2.cpp DELETED --- --- NEW FILE: org_lwjgl_opengl_NVPrimitiveRestart.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVPrimitiveRestart // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glPrimitiveRestartNVPROC) (GLvoid); typedef void (APIENTRY * glPrimitiveRestartIndexNVPROC) (GLuint index); static glPrimitiveRestartNVPROC glPrimitiveRestartNV; static glPrimitiveRestartIndexNVPROC glPrimitiveRestartIndexNV; /* * Class: org.lwjgl.opengl.NVPrimitiveRestart * Method: glPrimitiveRestartNV */ static void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartNV (JNIEnv * env, jclass clazz) { glPrimitiveRestartNV(); } /* * Class: org.lwjgl.opengl.NVPrimitiveRestart * Method: glPrimitiveRestartIndexNV */ static void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartIndexNV (JNIEnv * env, jclass clazz, jint index) { glPrimitiveRestartIndexNV(index); } #ifdef __cplusplus extern "C" { #endif JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"glPrimitiveRestartNV", "()V", (void*)&Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartNV, "glPrimitiveRestartNV", (void*)&glPrimitiveRestartNV}, {"glPrimitiveRestartIndexNV", "(I)V", (void*)&Java_org_lwjgl_opengl_NVPrimitiveRestart_glPrimitiveRestartIndexNV, "glPrimitiveRestartIndexNV", (void*)&glPrimitiveRestartIndexNV} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } #endif --- NEW FILE: org_lwjgl_opengl_NVFence.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFence // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glGenFencesNVPROC) (GLsizei n, GLuint *fences); typedef void (APIENTRY * glDeleteFencesNVPROC) (GLsizei n, const GLuint *fences); typedef void (APIENTRY * glSetFenceNVPROC) (GLuint fence, GLenum condition); typedef GLboolean (APIENTRY * glTestFenceNVPROC) (GLuint fence); typedef void (APIENTRY * glFinishFenceNVPROC) (GLuint fence); typedef GLboolean (APIENTRY * glIsFenceNVPROC) (GLuint fence); typedef void (APIENTRY * glGetFenceivNVPROC) (GLuint fence, GLenum pname, GLint *params); static glGenFencesNVPROC glGenFencesNV; static glDeleteFencesNVPROC glDeleteFencesNV; static glSetFenceNVPROC glSetFenceNV; static glTestFenceNVPROC glTestFenceNV; static glFinishFenceNVPROC glFinishFenceNV; static glIsFenceNVPROC glIsFenceNV; static glGetFenceivNVPROC glGetFenceivNV; /* * Class: ... [truncated message content] |
|
From: Elias N. <eli...@us...> - 2004-09-11 01:50:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6954/src/native/common/fmod3 Modified Files: Makefile.am Added Files: extfmod3.c org_lwjgl_fmod3_FMOD.c org_lwjgl_fmod3_FMusic.c org_lwjgl_fmod3_FSound.c Removed Files: extfmod3.cpp org_lwjgl_fmod3_FMOD.cpp org_lwjgl_fmod3_FMusic.cpp org_lwjgl_fmod3_FSound.cpp Log Message: Converted native code from C++ (.cpp files) to C (.c files), thus avoiding an annoying dependency on the standard C++ library on Linux. We weren't using any particular C++ features anyway. --- org_lwjgl_fmod3_FMOD.cpp DELETED --- --- org_lwjgl_fmod3_FSound.cpp DELETED --- --- NEW FILE: org_lwjgl_fmod3_FMOD.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_fmod3_FMOD.h" #include "extfmod3.h" static const char* VERSION = "0.9a"; /* * Class: org_lwjgl_fmod3_FMOD * Method: getNativeLibraryVersion * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMOD_getNativeLibraryVersion(JNIEnv * env, jclass clazz) { return (*env)->NewStringUTF(env, VERSION); } /* * Class: org_lwjgl_fmod3_FMOD * Method: nCreate * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMOD_nCreate(JNIEnv *env, jclass clazz, jobjectArray paths) { jsize pathcount = (*env)->GetArrayLength(env, paths); int i; for(i=0;i<pathcount;i++) { jstring path = (jstring) (*env)->GetObjectArrayElement(env, paths, i); char *path_str = (char *) (*env)->GetStringUTFChars(env, path, NULL); printfDebug("Trying to load fmod_instance from %s\n", path_str); fmod_create(env, path_str); (*env)->ReleaseStringUTFChars(env, path, path_str); if(fmod_instance != NULL) { return; } } throwFMODException(env, "Unable to load fmod library"); } /* * Class: org_lwjgl_fmod3_FMOD * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMOD_nDestroy(JNIEnv *env, jclass clazz) { fmod_destroy(); } /* * Class: org_lwjgl_fmod3_FMOD * Method: FMOD_ErrorString * Signature: (I)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMOD_FMOD_1ErrorString(JNIEnv *env, jclass clazz, jint errorcode) { return (*env)->NewStringUTF(env, FMOD_ErrorString(errorcode)); } --- NEW FILE: org_lwjgl_fmod3_FSound.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * [...1856 lines suppressed...] } signed char F_CALLBACKAPI fsound_stream_synccallback(FSOUND_STREAM *stream, void *buff, int len, void *param) { if (stream_jnienv == NULL) { attachStreamThread(); } int length = strlen((const char *) buff); (*stream_jnienv)->CallStaticVoidMethod(stream_jnienv, fsound, sound_stream_synccallback, (jlong) stream, safeNewBuffer(stream_jnienv, buff, length), (jint) len); return true; } signed char F_CALLBACKAPI fsound_stream_callback(FSOUND_STREAM *stream, void *buff, int len, void *param) { if (stream_jnienv == NULL) { attachStreamThread(); } (*stream_jnienv)->CallStaticVoidMethod(stream_jnienv, fsound, sound_stream_callback, (jlong) stream, safeNewBuffer(stream_jnienv, buff, len), (jint) len); return true; } signed char F_CALLBACKAPI fsound_metadata_callback(char *name, char *value, void *userdata) { if (stream_jnienv == NULL) { attachStreamThread(); } (*stream_jnienv)->CallStaticVoidMethod(stream_jnienv, fsound, sound_metadata_callback, (jlong) userdata, safeNewBuffer(stream_jnienv, name, strlen(name)), safeNewBuffer(stream_jnienv, value, strlen(value))); return true; } --- extfmod3.cpp DELETED --- --- org_lwjgl_fmod3_FMusic.cpp DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 2 Jul 2004 19:01:58 -0000 1.2 +++ Makefile.am 10 Sep 2004 08:13:53 -0000 1.3 @@ -5,7 +5,7 @@ INCLUDES = -I.. DEP_LIBS = ../libtools.la -FMOD_SOURCE = extfmod3.cpp \ - org_lwjgl_fmod3_FMOD.cpp \ - org_lwjgl_fmod3_FMusic.cpp \ - org_lwjgl_fmod3_FSound.cpp +FMOD_SOURCE = extfmod3.c \ + org_lwjgl_fmod3_FMOD.c \ + org_lwjgl_fmod3_FMusic.c \ + org_lwjgl_fmod3_FSound.c --- NEW FILE: org_lwjgl_fmod3_FMusic.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_fmod3_FMusic.h" #include "extfmod3.h" // callback void F_CALLBACKAPI fmusic_instcallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_ordercallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_rowcallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_zxxcallback(FMUSIC_MODULE *mod, unsigned char param); /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSong * Signature: (Ljava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSong(JNIEnv *env, jclass clazz, jstring name) { const char* filename = (const char*) ((*env)->GetStringUTFChars(env, name, 0)); return (jlong) fmod_instance->FMUSIC_LoadSong(filename); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSongEx * Signature: (Ljava/nio/ByteBuffer;IIILjava/nio/IntBuffer;I)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSongEx__Ljava_nio_ByteBuffer_2IIIILjava_nio_IntBuffer_2II (JNIEnv *env, jclass clazz, jobject data, jint dataOffset, jint offset, jint length, jint mode, jobject sampleList, jint sampleListOffset, jint samplelistnum){ int *sampleData = NULL; const char *songData = dataOffset + (char *) (*env)->GetDirectBufferAddress(env, data); if(sampleList != NULL) { sampleData = sampleListOffset + (int *) (*env)->GetDirectBufferAddress(env, sampleList); } return (jlong) fmod_instance->FMUSIC_LoadSongEx(songData, offset, length, mode, sampleData, samplelistnum); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSongEx * Signature: (Ljava/nio/ByteBuffer;IIILjava/nio/IntBuffer;I)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSongEx__Ljava_lang_String_2IIILjava_nio_IntBuffer_2II (JNIEnv *env, jclass clazz, jstring name, jint offset, jint length, jint mode, jobject sampleList, jint sampleListOffset, jint samplelistnum){ int *sampleData = NULL; const char* filename = (const char*) ((*env)->GetStringUTFChars(env, name, 0)); if(sampleList != NULL) { sampleData = sampleListOffset + (int *) (*env)->GetDirectBufferAddress(env, sampleList); } return (jlong) fmod_instance->FMUSIC_LoadSongEx(filename, offset, length, mode, sampleData, samplelistnum); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetOpenState * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetOpenState (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetOpenState((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_FreeSong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1FreeSong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_FreeSong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_PlaySong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1PlaySong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_PlaySong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_StopSong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1StopSong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_StopSong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: FMUSIC_StopAllSongs * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMusic_FMUSIC_1StopAllSongs (JNIEnv *env, jclass clazz){ return fmod_instance->FMUSIC_StopAllSongs(); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetZxxCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetZxxCallback(JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_SetZxxCallback((FMUSIC_MODULE*)module, fmusic_zxxcallback); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetRowCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetRowCallback(JNIEnv *env, jclass clazz, jlong module, jint row) { return fmod_instance->FMUSIC_SetRowCallback((FMUSIC_MODULE*)module, fmusic_rowcallback, row); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetOrderCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetOrderCallback(JNIEnv *env, jclass clazz, jlong module, jint order) { return fmod_instance->FMUSIC_SetOrderCallback((FMUSIC_MODULE*)module, fmusic_ordercallback, order); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetInstCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetInstCallback(JNIEnv *env, jclass clazz, jlong module, jint inst){ return fmod_instance->FMUSIC_SetInstCallback((FMUSIC_MODULE*)module, fmusic_instcallback, inst); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetSample * Signature: (JIJ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetSample (JNIEnv *env, jclass clazz, jlong module, jint sampno, jlong sample){ return fmod_instance->FMUSIC_SetSample((FMUSIC_MODULE *) module, sampno, (FSOUND_SAMPLE *) sample); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetUserData * Signature: (JLjava/nio/ByteBuffer;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetUserData(JNIEnv *env, jclass clazz, jlong module, jobject data, jint offset) { void *userdata = offset + (char*) (*env)->GetDirectBufferAddress(env, data); return fmod_instance->FMUSIC_SetUserData((FMUSIC_MODULE *) module, userdata); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_OptimizeChannels * Signature: (JII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1OptimizeChannels (JNIEnv *env, jclass clazz, jlong module, jint max, jint min){ return fmod_instance->FMUSIC_OptimizeChannels((FMUSIC_MODULE *) module, max, min); } /* * Class: org_lwjgl_fmod3_FMusic * Method: FMUSIC_SetReverb * Signature: (Z)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_FMUSIC_1SetReverb (JNIEnv *env, jclass clazz, jboolean reverb){ return fmod_instance->FMUSIC_SetReverb(reverb); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetLooping * Signature: (JZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetLooping (JNIEnv *env, jclass clazz, jlong module, jboolean looping){ return fmod_instance->FMUSIC_SetLooping((FMUSIC_MODULE *) module, looping); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetOrder * Signature: (JI)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetOrder (JNIEnv *env, jclass clazz, jlong module, jint order){ return fmod_instance->FMUSIC_SetOrder((FMUSIC_MODULE *) module, order); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetPaused * Signature: (JZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetPaused (JNIEnv *env, jclass clazz, jlong module, jboolean paused){ return fmod_instance->FMUSIC_SetPaused((FMUSIC_MODULE *) module, paused); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetMasterVolume * Signature: (JI)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetMasterVolume (JNIEnv *env, jclass clazz, jlong module, jint volume){ return fmod_instance->FMUSIC_SetMasterVolume((FMUSIC_MODULE *) module, volume); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetMasterSpeed * Signature: (JF)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetMasterSpeed (JNIEnv *env, jclass clazz, jlong module, jfloat speed){ return fmod_instance->FMUSIC_SetMasterSpeed((FMUSIC_MODULE *) module, speed); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetPanSeperation * Signature: (JF)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetPanSeperation (JNIEnv *env, jclass clazz, jlong module, jfloat pan){ return fmod_instance->FMUSIC_SetPanSeperation((FMUSIC_MODULE *) module, pan); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetName * Signature: (J)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetName (JNIEnv *env, jclass clazz, jlong module) { const char * name = fmod_instance->FMUSIC_GetName((FMUSIC_MODULE *) module); return (*env)->NewStringUTF(env, name); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetType * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetType (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetType((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumOrders * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumOrders (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumOrders((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumPatterns * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumPatterns (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumPatterns((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumInstruments * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumInstruments (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumInstruments((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumSamples * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumSamples (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumSamples((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumChannels * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumChannels (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumChannels((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetSample * Signature: (JI)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetSample (JNIEnv *env, jclass clazz, jlong module, jint sampleno){ return (jlong) fmod_instance->FMUSIC_GetSample((FMUSIC_MODULE *) module, sampleno); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPatternLength * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPatternLength (JNIEnv *env, jclass clazz, jlong module, jint orderno){ return fmod_instance->FMUSIC_GetPatternLength((FMUSIC_MODULE *) module, orderno); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_IsFinished * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1IsFinished (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_IsFinished((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_IsPlaying * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1IsPlaying (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_IsPlaying((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetMasterVolume * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetMasterVolume (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetMasterVolume((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetGlobalVolume * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetGlobalVolume (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetGlobalVolume((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetOrder * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetOrder (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetOrder((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPattern * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPattern (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetPattern((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetSpeed * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetSpeed (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetSpeed((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetBPM * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetBPM (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetBPM((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetRow * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetRow (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetRow((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPaused * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPaused (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetPaused((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetTime * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetTime (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetTime((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetRealChannel * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetRealChannel (JNIEnv *env, jclass clazz, jlong module, jint modchannel){ return fmod_instance->FMUSIC_GetRealChannel((FMUSIC_MODULE *) module, modchannel); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetUserData * Signature: (J)Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetUserData(JNIEnv *env, jclass clazz, jlong module, jint capacity) { void* data = (void*) fmod_instance->FMUSIC_GetUserData((FMUSIC_MODULE *) module); return (*env)->NewDirectByteBuffer(env, data, capacity); } /** * This attaches the mixer thread as a daemon thread, and sets its * priority to max value */ void attachMixerThread() { (*jvm)->AttachCurrentThreadAsDaemon(jvm, (void*)&mixer_jnienv, NULL); // set to high priority // ============================== // get current thread jclass threadClass = (*mixer_jnienv)->FindClass(mixer_jnienv, "java/lang/Thread"); jmethodID currentThread = (*mixer_jnienv)->GetStaticMethodID(mixer_jnienv, threadClass, "currentThread", "()Ljava/lang/Thread;"); jobject myThread = (*mixer_jnienv)->CallStaticObjectMethod(mixer_jnienv, threadClass, currentThread); // get value of high priority jfieldID highPriority = (*mixer_jnienv)->GetStaticFieldID(mixer_jnienv, threadClass, "MAX_PRIORITY", "I"); jint highPriorityValue = (*mixer_jnienv)->GetStaticIntField(mixer_jnienv, threadClass, highPriority); // call set priority jmethodID priority = (*mixer_jnienv)->GetMethodID(mixer_jnienv, threadClass, "setPriority", "(I)V"); (*mixer_jnienv)->CallVoidMethod(mixer_jnienv, myThread, priority, highPriorityValue); // ------------------------------ } // FMusic callbacks // ======================================= void F_CALLBACKAPI fmusic_instcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } (*mixer_jnienv)->CallStaticVoidMethod(mixer_jnienv, fmusic, music_instcallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_ordercallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } (*mixer_jnienv)->CallStaticVoidMethod(mixer_jnienv, fmusic, music_ordercallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_rowcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } (*mixer_jnienv)->CallStaticVoidMethod(mixer_jnienv, fmusic, music_rowcallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_zxxcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } (*mixer_jnienv)->CallStaticVoidMethod(mixer_jnienv, fmusic, music_zxxcallback, (jlong) mod, (jint) param); } // ------------------------------------------ --- NEW FILE: extfmod3.c --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif #include <stdio.h> #include "extfmod3.h" /** Instance of fmod */ FMOD_INSTANCE * fmod_instance = NULL; // jnienvs JNIEnv *mixer_jnienv; JNIEnv *stream_jnienv; // FMusic cached fields jmethodID music_instcallback; jmethodID music_ordercallback; jmethodID music_rowcallback; jmethodID music_zxxcallback; jclass fmusic; // FSound cached fields jmethodID sound_dspcallback; jmethodID sound_stream_endcallback; jmethodID sound_stream_synccallback; jmethodID sound_stream_callback; jmethodID sound_metadata_callback; jclass fsound; // size of dsp buffer (in bytes) int fsound_dsp_buffer_size; #ifdef _WIN32 /** * DLL entry point for Windows. Called when Java loads the .dll */ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return true; } #endif /** * Creates and loads the FMOD instance * * @param path path to try to load dll */ void fmod_create(JNIEnv *env, char* path) { // try to create an instance using the supplied path fmod_instance = FMOD_CreateInstance(path); // if we got one, we need to locate and cache jni stuff used for callbacks if (fmod_instance != NULL) { // fmusic specific callbacks fmusic = (*env)->FindClass(env, "org/lwjgl/fmod3/FMusic"); music_instcallback = (*env)->GetStaticMethodID(env, fmusic, "music_instcallback", "(JI)V"); music_ordercallback = (*env)->GetStaticMethodID(env, fmusic, "music_ordercallback", "(JI)V"); music_rowcallback = (*env)->GetStaticMethodID(env, fmusic, "music_rowcallback", "(JI)V"); music_zxxcallback = (*env)->GetStaticMethodID(env, fmusic, "music_zxxcallback", "(JI)V"); // fsound specefic callbacks fsound = (*env)->FindClass(env, "org/lwjgl/fmod3/FSound"); sound_dspcallback = (*env)->GetStaticMethodID(env, fsound, "dsp_callback", "(JLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)Ljava/nio/ByteBuffer;"); sound_stream_endcallback = (*env)->GetStaticMethodID(env, fsound, "end_callback", "(J)V"); sound_stream_synccallback = (*env)->GetStaticMethodID(env, fsound, "sync_callback", "(JLjava/nio/ByteBuffer;I)V"); sound_stream_callback = (*env)->GetStaticMethodID(env, fsound, "stream_callback", "(JLjava/nio/ByteBuffer;I)V"); sound_metadata_callback = (*env)->GetStaticMethodID(env, fsound, "meta_callback", "(JLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V"); // we need the size of the mix buffer, so we start out by caching it and // update it accordingly on changes switch(fmod_instance->FSOUND_GetMixer()) { case FSOUND_MIXER_AUTODETECT: case FSOUND_MIXER_BLENDMODE: case FSOUND_MIXER_QUALITY_AUTODETECT: case FSOUND_MIXER_QUALITY_FPU: case FSOUND_MIXER_MONO: case FSOUND_MIXER_QUALITY_MONO: case FSOUND_MIXER_MAX: fsound_dsp_buffer_size = 8; break; default: fsound_dsp_buffer_size = 4; break; } } } /** * Destroys the fmod instance */ void fmod_destroy() { if (fmod_instance != NULL) { FMOD_FreeInstance(fmod_instance); } } |