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
(2) |
4
|
5
|
6
(8) |
7
|
8
|
|
9
(8) |
10
(7) |
11
(11) |
12
(7) |
13
(8) |
14
(8) |
15
(5) |
|
16
(3) |
17
|
18
(51) |
19
(9) |
20
(6) |
21
(3) |
22
(3) |
|
23
(2) |
24
|
25
(17) |
26
(1) |
27
(4) |
28
(5) |
29
(4) |
|
30
(1) |
31
(1) |
|
|
|
|
|
|
From: Ioannis T. <sp...@us...> - 2005-01-13 20:30:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22728 Modified Files: org_lwjgl_opengl_ARBTextureCompression.c Log Message: Implemented PBO support Index: org_lwjgl_opengl_ARBTextureCompression.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/org_lwjgl_opengl_ARBTextureCompression.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_ARBTextureCompression.c 10 Sep 2004 08:13:51 -0000 1.1 +++ org_lwjgl_opengl_ARBTextureCompression.c 13 Jan 2005 20:30:39 -0000 1.2 @@ -1,31 +1,31 @@ -/* +/* * 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * 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 + * * 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 + * 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 + * 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. */ @@ -61,7 +61,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexImage1DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -73,7 +82,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexImage2DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -85,7 +103,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexImage3DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -97,7 +124,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexSubImage1DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -109,7 +145,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexSubImage2DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -121,7 +166,16 @@ { GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset); glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglCompressedTexSubImage3DARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARBBO + (JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint border, jint imageSize, jint buffer_offset) +{ + glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, offsetToPointer(buffer_offset)); } /* @@ -133,7 +187,16 @@ { GLvoid *pImg_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pImg) + pImg_offset); glGetCompressedTexImageARB(target, lod, pImg_ptr); - +} + +/* + * Class: org.lwjgl.opengl.ARBTextureCompression + * Method: nglGetCompressedTexImageARBBO + */ +static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARBBO + (JNIEnv * env, jclass clazz, jint target, jint lod, jint buffer_offset) +{ + glGetCompressedTexImageARB(target, lod, offsetToPointer(buffer_offset)); } #ifdef __cplusplus @@ -142,16 +205,23 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglCompressedTexImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARB, "glCompressedTexImage1DARB", (void*)&glCompressedTexImage1DARB}, + {"nglCompressedTexImage1DARBBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARBBO, NULL, NULL}, {"nglCompressedTexImage2DARB", "(IIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARB, "glCompressedTexImage2DARB", (void*)&glCompressedTexImage2DARB}, + {"nglCompressedTexImage2DARBBO", "(IIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARBBO, NULL, NULL}, {"nglCompressedTexImage3DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARB, "glCompressedTexImage3DARB", (void*)&glCompressedTexImage3DARB}, + {"nglCompressedTexImage3DARBBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARBBO, NULL, NULL}, {"nglCompressedTexSubImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARB, "glCompressedTexSubImage1DARB", (void*)&glCompressedTexSubImage1DARB}, + {"nglCompressedTexSubImage1DARBBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARBBO, NULL, NULL}, {"nglCompressedTexSubImage2DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARB, "glCompressedTexSubImage2DARB", (void*)&glCompressedTexSubImage2DARB}, + {"nglCompressedTexSubImage2DARBBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARBBO, NULL, NULL}, {"nglCompressedTexSubImage3DARB", "(IIIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARB, "glCompressedTexSubImage3DARB", (void*)&glCompressedTexSubImage3DARB}, - {"nglGetCompressedTexImageARB", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB, "glGetCompressedTexImageARB", (void*)&glGetCompressedTexImageARB} + {"nglCompressedTexSubImage3DARBBO", "(IIIIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARBBO, NULL, NULL}, + {"nglGetCompressedTexImageARB", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB, "glGetCompressedTexImageARB", (void*)&glGetCompressedTexImageARB}, + {"nglGetCompressedTexImageARBBO", "(III)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARBBO, NULL, NULL} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); } #ifdef __cplusplus } -#endif +#endif \ No newline at end of file |
|
From: Elias N. <eli...@us...> - 2005-01-13 12:14:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15161/src/native/common Modified Files: common_tools.h Log Message: remove const from offsetToPointer in common_tools.h since PBO functions take non-const pointers Index: common_tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- common_tools.h 11 Jan 2005 15:22:09 -0000 1.33 +++ common_tools.h 13 Jan 2005 12:14:10 -0000 1.34 @@ -92,8 +92,8 @@ return NULL; } -static inline const void *offsetToPointer(jint offset) { - return (const char *)NULL + offset; +static inline void *offsetToPointer(jint offset) { + return (char *)NULL + offset; } typedef void *(* ExtGetProcAddressPROC) (const char *func_name); |
|
From: Ioannis T. <sp...@us...> - 2005-01-13 02:18:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3694 Modified Files: org_lwjgl_opengl_ARBImaging.c Log Message: Implemented PBO support Index: org_lwjgl_opengl_ARBImaging.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/org_lwjgl_opengl_ARBImaging.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_ARBImaging.c 10 Sep 2004 08:13:51 -0000 1.1 +++ org_lwjgl_opengl_ARBImaging.c 13 Jan 2005 02:17:42 -0000 1.2 @@ -1,35 +1,35 @@ -/* +/* * 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * 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 + * * 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 + * 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 + * 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. */ - + /** * $Id$ * @@ -121,7 +121,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glColorTable(target, internalFormat, width, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glColorTableBO + * Signature: (IIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableBO + (JNIEnv * env, jclass clazz, jint target, jint internalFormat, jint width, jint format, jint type, jint buffer_offset) +{ + glColorTable(target, internalFormat, width, format, type, offsetToPointer(buffer_offset)); } /* @@ -134,7 +144,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glColorSubTable(target, start, count, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glColorSubTableBO + * Signature: (IIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorSubTableBO + (JNIEnv * env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jint buffer_offset) +{ + glColorSubTable(target, start, count, format, type, offsetToPointer(buffer_offset)); } /* @@ -147,7 +167,7 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetColorTable(target, format, type, address); - + } /* @@ -160,7 +180,7 @@ { GLint *address = offset + (GLint *)(*env)->GetDirectBufferAddress(env, buffer); glGetColorTableParameteriv(target, pname, address); - + } /* @@ -173,7 +193,7 @@ { GLfloat *address = offset + (GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glGetColorTableParameterfv(target, pname, address); - + } /* @@ -186,7 +206,7 @@ { const GLint *address = offset + (const GLint *)(*env)->GetDirectBufferAddress(env, buffer); glColorTableParameteriv(target, pname, address); - + } /* @@ -199,7 +219,7 @@ { const GLfloat *address = offset + (const GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glColorTableParameterfv(target, pname, address); - + } @@ -212,7 +232,7 @@ (JNIEnv *env, jclass clazz, jint target, jint start, jint x, jint y, jint width) { glCopyColorSubTable(target, start, x, y, width); - + } @@ -225,7 +245,7 @@ (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width) { glCopyColorTable(target, internalformat, x, y, width); - + } @@ -238,7 +258,7 @@ (JNIEnv *env, jclass clazz, jint mode) { glBlendEquation(mode); - + } /* @@ -248,7 +268,7 @@ static void JNICALL Java_org_lwjgl_opengl_ARBImaging_glBlendColor(JNIEnv * env, jclass clazz, jfloat p0, jfloat p1, jfloat p2, jfloat p3) { glBlendColor((GLfloat) p0, (GLfloat) p1, (GLfloat) p2, (GLfloat) p3); - + } /* @@ -260,7 +280,7 @@ (JNIEnv *env, jclass clazz, jint target, jint width, jint internalformat, jboolean sink) { glHistogram(target, width, internalformat, sink); - + } /* @@ -272,7 +292,7 @@ (JNIEnv *env, jclass clazz, jint target) { glResetHistogram(target); - + } /* @@ -285,7 +305,17 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetHistogram(target, reset, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glGetHistogramBO + * Signature: (IZIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramBO + (JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint buffer_offset) +{ + glGetHistogram(target, reset, format, type, offsetToPointer(buffer_offset)); } /* @@ -298,7 +328,7 @@ { GLfloat *address = offset + (GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glGetHistogramParameterfv(target, pname, address); - + } /* @@ -311,7 +341,7 @@ { GLint *address = offset + (GLint *)(*env)->GetDirectBufferAddress(env, buffer); glGetHistogramParameteriv(target, pname, address); - + } /* @@ -323,7 +353,7 @@ (JNIEnv *env, jclass clazz, jint target, jint internalformat, jboolean sink) { glMinmax(target, internalformat, sink); - + } /* @@ -335,7 +365,7 @@ (JNIEnv *env, jclass clazz, jint target) { glResetMinmax(target); - + } /* @@ -348,7 +378,17 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetMinmax(target, reset, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glGetMinmaxBO + * Signature: (IZIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxBO + (JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint buffer_offset) +{ + glGetMinmax(target, reset, format, type, offsetToPointer(buffer_offset)); } /* @@ -361,7 +401,7 @@ { GLfloat *address = offset + (GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glGetMinmaxParameterfv(target, pname, address); - + } /* @@ -374,7 +414,7 @@ { GLint *address = offset + (GLint *)(*env)->GetDirectBufferAddress(env, buffer); glGetMinmaxParameteriv(target, pname, address); - + } /* @@ -387,7 +427,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glConvolutionFilter1D(target, internalformat, width, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glConvolutionFilter1DBO + * Signature: (IIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1DBO + (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jint buffer_offset) +{ + glConvolutionFilter1D(target, internalformat, width, format, type, offsetToPointer(buffer_offset)); } /* @@ -400,7 +450,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glConvolutionFilter2D(target, internalformat, width, height, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glConvolutionFilter2DBO + * Signature: (IIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2DBO + (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jint buffer_offset) +{ + glConvolutionFilter2D(target, internalformat, width, height, format, type, offsetToPointer(buffer_offset)); } /* @@ -412,7 +472,7 @@ (JNIEnv *env, jclass clazz, jint target, jint pname, jfloat params) { glConvolutionParameterf(target, pname, params); - + } /* @@ -425,7 +485,7 @@ { const GLfloat *address = offset + (const GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glConvolutionParameterfv(target, pname, address); - + } /* @@ -437,7 +497,7 @@ (JNIEnv *env, jclass clazz, jint target, jint pname, jint params) { glConvolutionParameteri(target, pname, params); - + } /* @@ -450,7 +510,7 @@ { const GLint *address = offset + (const GLint *)(*env)->GetDirectBufferAddress(env, buffer); glConvolutionParameteriv(target, pname, address); - + } /* @@ -462,7 +522,7 @@ (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width) { glCopyConvolutionFilter1D(target, internalformat, x, y, width); - + } /* @@ -474,7 +534,7 @@ (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jint height) { glCopyConvolutionFilter2D(target, internalformat, x, y, width, height); - + } /* @@ -487,7 +547,17 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetConvolutionFilter(target, format, type, address); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glGetConvolutionFilterBO + * Signature: (IIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilterBO + (JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint buffer_offset) +{ + glGetConvolutionFilter(target, format, type, offsetToPointer(buffer_offset)); } /* @@ -500,7 +570,7 @@ { GLfloat *address = offset + (GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glGetConvolutionParameterfv(target, pname, address); - + } /* @@ -513,7 +583,7 @@ { GLint *address = offset + (GLint *)(*env)->GetDirectBufferAddress(env, buffer); glGetConvolutionParameteriv(target, pname, address); - + } /* @@ -527,7 +597,17 @@ const void *address = (const void *)(row_offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, row)); const void *address2 = (const void *)(column_offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, column)); glSeparableFilter2D(target, internalformat, width, height, format, type, address, address2); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glSeparableFilter2DBO + * Signature: (IIIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2DBO + (JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jint row_offset, jint column_offset) +{ + glSeparableFilter2D(target, internalformat, width, height, format, type, offsetToPointer(row_offset), offsetToPointer(column_offset)); } /* @@ -542,7 +622,17 @@ void *address2 = (void *)(column_offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, column)); void *address3 = (void *)(span_offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, span)); glGetSeparableFilter(target, format, type, address, address2, address3); - +} + +/* + * Class: org_lwjgl_opengl_ARBImaging + * Method: glGetSeparableFilterBO + * Signature: (IIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilterBO + (JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint row_offset, jint column_offset, jint span_offset) +{ + glGetSeparableFilter(target, format, type, offsetToPointer(row_offset), offsetToPointer(column_offset), offsetToPointer(span_offset)); } #ifdef __cplusplus @@ -551,7 +641,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_initNativeStubs(JNIEnv *env, jclass clazz) { JavaMethodAndExtFunction functions[] = { {"nglColorTable", "(IIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorTable, "glColorTable", (void*)&glColorTable}, + {"nglColorTableBO", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorTableBO, NULL, NULL}, {"nglColorSubTable", "(IIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorSubTable, "glColorSubTable", (void*)&glColorSubTable}, + {"nglColorSubTableBO", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorSubTableBO, NULL, NULL}, {"nglColorTableParameteriv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameteriv, "glColorTableParameteriv", (void*)&glColorTableParameteriv}, {"nglColorTableParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameterfv, "glColorTableParameterfv", (void*)&glColorTableParameterfv}, {"glCopyColorSubTable", "(IIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glCopyColorSubTable, "glCopyColorSubTable", (void*)&glCopyColorSubTable}, @@ -564,15 +656,19 @@ {"glHistogram", "(IIIZ)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glHistogram, "glHistogram", (void*)&glHistogram}, {"glResetHistogram", "(I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glResetHistogram, "glResetHistogram", (void*)&glResetHistogram}, {"nglGetHistogram", "(IZIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetHistogram, "glGetHistogram", (void*)&glGetHistogram}, + {"nglGetHistogramBO", "(IZIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramBO, NULL, NULL}, {"nglGetHistogramParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameterfv, "glGetHistogramParameterfv", (void*)&glGetHistogramParameterfv}, {"nglGetHistogramParameteriv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameteriv, "glGetHistogramParameteriv", (void*)&glGetHistogramParameteriv}, {"glMinmax", "(IIZ)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glMinmax, "glMinmax", (void*)&glMinmax}, {"glResetMinmax", "(I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glResetMinmax, "glResetMinmax", (void*)&glResetMinmax}, {"nglGetMinmax", "(IZIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetMinmax, "glGetMinmax", (void*)&glGetMinmax}, + {"nglGetMinmaxBO", "(IZIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxBO, NULL, NULL}, {"nglGetMinmaxParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameterfv, "glGetMinmaxParameterfv", (void*)&glGetMinmaxParameterfv}, {"nglGetMinmaxParameteriv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameteriv, "glGetMinmaxParameteriv", (void*)&glGetMinmaxParameteriv}, {"nglConvolutionFilter1D", "(IIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1D, "glConvolutionFilter1D", (void*)&glConvolutionFilter1D}, + {"nglConvolutionFilter1DBO", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1DBO, NULL, NULL}, {"nglConvolutionFilter2D", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2D, "glConvolutionFilter2D", (void*)&glConvolutionFilter2D}, + {"nglConvolutionFilter2DBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2DBO, NULL, NULL}, {"glConvolutionParameterf", "(IIF)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glConvolutionParameterf, "glConvolutionParameterf", (void*)&glConvolutionParameterf}, {"nglConvolutionParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameterfv, "glConvolutionParameterfv", (void*)&glConvolutionParameterfv}, {"glConvolutionParameteri", "(III)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glConvolutionParameteri, "glConvolutionParameteri", (void*)&glConvolutionParameteri}, @@ -580,10 +676,13 @@ {"glCopyConvolutionFilter1D", "(IIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glCopyConvolutionFilter1D, "glCopyConvolutionFilter1D", (void*)&glCopyConvolutionFilter1D}, {"glCopyConvolutionFilter2D", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_glCopyConvolutionFilter2D, "glCopyConvolutionFilter2D", (void*)&glCopyConvolutionFilter2D}, {"nglGetConvolutionFilter", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilter, "glGetConvolutionFilter", (void*)&glGetConvolutionFilter}, + {"nglGetConvolutionFilterBO", "(IIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilterBO, NULL, NULL}, {"nglGetConvolutionParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameterfv, "glGetConvolutionParameterfv", (void*)&glGetConvolutionParameterfv}, {"nglGetConvolutionParameteriv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameteriv, "glGetConvolutionParameteriv", (void*)&glGetConvolutionParameteriv}, {"nglSeparableFilter2D", "(IIIIIILjava/nio/Buffer;ILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2D, "glSeparableFilter2D", (void*)&glSeparableFilter2D}, - {"nglGetSeparableFilter", "(IIILjava/nio/Buffer;ILjava/nio/Buffer;ILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilter, "glGetSeparableFilter", (void*)&glGetSeparableFilter} + {"nglSeparableFilter2DBO", "(IIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2DBO, NULL, NULL}, + {"nglGetSeparableFilter", "(IIILjava/nio/Buffer;ILjava/nio/Buffer;ILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilter, "glGetSeparableFilter", (void*)&glGetSeparableFilter}, + {"nglGetSeparableFilterBO", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilterBO, NULL, NULL} }; int num_functions = NUMFUNCTIONS(functions); extgl_InitializeClass(env, clazz, num_functions, functions); |
|
From: Ioannis T. <sp...@us...> - 2005-01-13 02:16:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3534 Modified Files: org_lwjgl_opengl_GL11.c org_lwjgl_opengl_GL12.c org_lwjgl_opengl_GL13.c Log Message: Implemented PBO support Index: org_lwjgl_opengl_GL11.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL11.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_opengl_GL11.c 29 Nov 2004 08:16:21 -0000 1.6 +++ org_lwjgl_opengl_GL11.c 13 Jan 2005 02:16:46 -0000 1.7 @@ -540,6 +540,15 @@ /* * Class: org_lwjgl_opengl_GL11 + * Method: glBitmap + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglBitmapBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jfloat p2, jfloat p3, jfloat p4, jfloat p5, jint buffer_offset) +{ + glBitmap((GLint) p0, (GLint) p1, (GLfloat) p2, (GLfloat) p3, (GLfloat) p4, (GLfloat) p5, offsetToPointer(buffer_offset)); +} + +/* + * Class: org_lwjgl_opengl_GL11 * Method: glBindTexture */ static void JNICALL Java_org_lwjgl_opengl_GL11_glBindTexture(JNIEnv * env, jclass clazz, jint p0, jint p1) @@ -931,7 +940,15 @@ { const GLbyte *address = (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer); glDrawPixels((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (const void *)(address + offset)); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glDrawPixels + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawPixelsBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint buffer_offset) +{ + glDrawPixels((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, offsetToPointer(buffer_offset)); } /* @@ -1024,7 +1041,15 @@ { GLfloat *address = offset + (GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glGetPixelMapfv((GLint) p0, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glGetPixelMapfv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapfvBO(JNIEnv * env, jclass clazz, jint p0, jint buffer_offset) +{ + glGetPixelMapfv((GLint) p0, offsetToPointer(buffer_offset)); } /* @@ -1035,7 +1060,15 @@ { GLuint *address = offset + (GLuint *)(*env)->GetDirectBufferAddress(env, buffer); glGetPixelMapuiv((GLint) p0, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glGetPixelMapuiv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapuivBO(JNIEnv * env, jclass clazz, jint p0, jint buffer_offset) +{ + glGetPixelMapuiv((GLint) p0, offsetToPointer(buffer_offset)); } /* @@ -1046,7 +1079,15 @@ { GLushort *address = (GLushort *)(*env)->GetDirectBufferAddress(env, buffer); glGetPixelMapusv((GLint) p0, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glGetPixelMapusv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapusvBO(JNIEnv * env, jclass clazz, jint p0, jint buffer_offset) +{ + glGetPixelMapusv((GLint) p0, offsetToPointer(buffer_offset)); } /* @@ -1402,9 +1443,16 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetTexImage((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, address); - } +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glGetTexImage + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexImageBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint buffer_offset) +{ + glGetTexImage((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, offsetToPointer(buffer_offset)); +} static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGenfv(JNIEnv * env, jclass clazz, jint p0, jint p1, jobject buffer, jint offset) { @@ -1460,7 +1508,15 @@ { GLubyte *address = offset + (GLubyte *)(*env)->GetDirectBufferAddress(env, buffer); glGetPolygonStipple(address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glGetPolygonStipple + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPolygonStippleBO(JNIEnv * env, jclass clazz, jint buffer_offset) +{ + glGetPolygonStipple(offsetToPointer(buffer_offset)); } /* @@ -1748,7 +1804,15 @@ { const GLubyte *address = offset + (const GLubyte *)(*env)->GetDirectBufferAddress(env, buffer); glPolygonStipple(address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glPolygonStipple + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonStippleBO(JNIEnv * env, jclass clazz, jint buffer_offset) +{ + glPolygonStipple(offsetToPointer(buffer_offset)); } /* @@ -1839,7 +1903,15 @@ { const GLfloat *address = offset + (const GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glPixelMapfv((GLint) p0, (GLint) p1, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glPixelMapfv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapfvBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint buffer_offset) +{ + glPixelMapfv((GLint) p0, (GLint) p1, offsetToPointer(buffer_offset)); } /* @@ -1850,7 +1922,15 @@ { const GLuint *address = (const GLuint *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glPixelMapuiv((GLint) p0, (GLint) p1, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glPixelMapuiv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapuivBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint buffer_offset) +{ + glPixelMapuiv((GLint) p0, (GLint) p1, offsetToPointer(buffer_offset)); } /* @@ -1861,11 +1941,18 @@ { const GLushort *address = (const GLushort *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glPixelMapusv((GLint) p0, (GLint) p1, address); - } /* * Class: org_lwjgl_opengl_GL11 + * Method: glPixelMapusv + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapusvBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint buffer_offset) +{ + glPixelMapusv((GLint) p0, (GLint) p1, offsetToPointer(buffer_offset)); +} +/* + * Class: org_lwjgl_opengl_GL11 * Method: glPassThrough */ static void JNICALL Java_org_lwjgl_opengl_GL11_glPassThrough(JNIEnv * env, jclass clazz, jfloat p0) @@ -2058,7 +2145,15 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glReadPixels((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glReadPixels + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglReadPixelsBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint buffer_offset) +{ + glReadPixels((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, offsetToPointer(buffer_offset)); } /* @@ -2323,7 +2418,15 @@ { const void *address = (const void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glTexSubImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glTexSubImage2D + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage2DBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint p6, jint p7, jint buffer_offset) +{ + glTexSubImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, offsetToPointer(buffer_offset)); } /* @@ -2334,7 +2437,15 @@ { const void *address = (const void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glTexSubImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, address); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glTexSubImage1D + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage1DBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint buffer_offset) +{ + glTexSubImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, offsetToPointer(buffer_offset)); } static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameterfv @@ -2377,7 +2488,15 @@ { GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset); glTexImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, buffer_ptr); +} +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glTexImage2D + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage2DBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint p6, jint p7, jint buffer_offset) +{ + glTexImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, offsetToPointer(buffer_offset)); } /* @@ -2388,9 +2507,16 @@ { GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset); glTexImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, buffer_ptr); - } +/* + * Class: org_lwjgl_opengl_GL11 + * Method: glTexImage1D + */ +static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage1DBO(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint p6, jint buffer_offset) +{ + glTexImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, offsetToPointer(buffer_offset)); +} /* * Class: org_lwjgl_opengl_GL11 @@ -2585,6 +2711,7 @@ {"glCallList", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glCallList, "glCallList", (void*)&glCallList}, {"glBlendFunc", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_glBlendFunc, "glBlendFunc", (void*)&glBlendFunc}, {"nglBitmap", "(IIFFFFLjava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglBitmap, "glBitmap", (void*)&glBitmap}, + {"nglBitmapBO", "(IIFFFFI)V", (void*)&Java_org_lwjgl_opengl_GL11_nglBitmapBO, NULL, NULL}, {"glBindTexture", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_glBindTexture, "glBindTexture", (void*)&glBindTexture}, {"glBegin", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glBegin, "glBegin", (void*)&glBegin}, {"glEnd", "()V", (void*)&Java_org_lwjgl_opengl_GL11_glEnd, "glEnd", (void*)&glEnd}, @@ -2625,6 +2752,7 @@ {"nglEdgeFlagPointerVBO", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_nglEdgeFlagPointerVBO, NULL, NULL}, {"glEdgeFlag", "(Z)V", (void*)&Java_org_lwjgl_opengl_GL11_glEdgeFlag, "glEdgeFlag", (void*)&glEdgeFlag}, {"nglDrawPixels", "(IIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglDrawPixels, "glDrawPixels", (void*)&glDrawPixels}, + {"nglDrawPixelsBO", "(IIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglDrawPixelsBO, NULL, NULL}, {"nglDrawElements", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglDrawElements, "glDrawElements", (void*)&glDrawElements}, {"nglDrawElementsVBO", "(IIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglDrawElementsVBO, NULL, NULL}, {"glDrawBuffer", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glDrawBuffer, "glDrawBuffer", (void*)&glDrawBuffer}, @@ -2634,8 +2762,11 @@ {"glDepthFunc", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glDepthFunc, "glDepthFunc", (void*)&glDepthFunc}, {"nglFeedbackBuffer", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglFeedbackBuffer, "glFeedbackBuffer", (void*)&glFeedbackBuffer}, {"nglGetPixelMapfv", "(ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapfv, "glGetPixelMapfv", (void*)&glGetPixelMapfv}, + {"nglGetPixelMapfvBO", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapfvBO, NULL, NULL}, {"nglGetPixelMapuiv", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapuiv, "glGetPixelMapuiv", (void*)&glGetPixelMapuiv}, + {"nglGetPixelMapuivBO", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapuivBO, NULL, NULL}, {"nglGetPixelMapusv", "(ILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapusv, "glGetPixelMapusv", (void*)&glGetPixelMapusv}, + {"nglGetPixelMapusvBO", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPixelMapusvBO, NULL, NULL}, {"nglGetMaterialfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetMaterialfv, "glGetMaterialfv", (void*)&glGetMaterialfv}, {"nglGetMaterialiv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetMaterialiv, "glGetMaterialiv", (void*)&glGetMaterialiv}, {"nglGetMapfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetMapfv, "glGetMapfv", (void*)&glGetMapfv}, @@ -2669,12 +2800,14 @@ {"nglGetTexLevelParameterfv", "(IIILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexLevelParameterfv, "glGetTexLevelParameterfv", (void*)&glGetTexLevelParameterfv}, {"nglGetTexLevelParameteriv", "(IIILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexLevelParameteriv, "glGetTexLevelParameteriv", (void*)&glGetTexLevelParameteriv}, {"nglGetTexImage", "(IIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexImage, "glGetTexImage", (void*)&glGetTexImage}, + {"nglGetTexImageBO", "(IIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexImageBO, NULL, NULL}, {"nglGetTexGeniv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexGeniv, "glGetTexGeniv", (void*)&glGetTexGeniv}, {"nglGetTexGenfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexGenfv, "glGetTexGenfv", (void*)&glGetTexGenfv}, {"nglGetTexEnviv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexEnviv, "glGetTexEnviv", (void*)&glGetTexEnviv}, {"nglGetTexEnvfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetTexEnvfv, "glGetTexEnvfv", (void*)&glGetTexEnvfv}, {"glGetString", "(I)Ljava/lang/String;", (void*)&Java_org_lwjgl_opengl_GL11_glGetString, "glGetString", (void*)&glGetString}, {"nglGetPolygonStipple", "(Ljava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPolygonStipple, "glGetPolygonStipple", (void*)&glGetPolygonStipple}, + {"nglGetPolygonStippleBO", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglGetPolygonStippleBO, NULL, NULL}, {"glIsList", "(I)Z", (void*)&Java_org_lwjgl_opengl_GL11_glIsList, "glIsList", (void*)&glIsList}, {"glMaterialf", "(IIF)V", (void*)&Java_org_lwjgl_opengl_GL11_glMaterialf, "glMaterialf", (void*)&glMaterialf}, {"glMateriali", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_glMateriali, "glMateriali", (void*)&glMateriali}, @@ -2702,6 +2835,7 @@ {"glIsTexture", "(I)Z", (void*)&Java_org_lwjgl_opengl_GL11_glIsTexture, "glIsTexture", (void*)&glIsTexture}, {"glMatrixMode", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glMatrixMode, "glMatrixMode", (void*)&glMatrixMode}, {"nglPolygonStipple", "(Ljava/nio/ByteBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPolygonStipple, "glPolygonStipple", (void*)&glPolygonStipple}, + {"nglPolygonStippleBO", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPolygonStippleBO, NULL, NULL}, {"glPolygonOffset", "(FF)V", (void*)&Java_org_lwjgl_opengl_GL11_glPolygonOffset, "glPolygonOffset", (void*)&glPolygonOffset}, {"glPolygonMode", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_glPolygonMode, "glPolygonMode", (void*)&glPolygonMode}, {"glPointSize", "(F)V", (void*)&Java_org_lwjgl_opengl_GL11_glPointSize, "glPointSize", (void*)&glPointSize}, @@ -2711,8 +2845,11 @@ {"glPixelStoref", "(IF)V", (void*)&Java_org_lwjgl_opengl_GL11_glPixelStoref, "glPixelStoref", (void*)&glPixelStoref}, {"glPixelStorei", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_glPixelStorei, "glPixelStorei", (void*)&glPixelStorei}, {"nglPixelMapfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapfv, "glPixelMapfv", (void*)&glPixelMapfv}, + {"nglPixelMapfvBO", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapfvBO, NULL, NULL}, {"nglPixelMapuiv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapuiv, "glPixelMapuiv", (void*)&glPixelMapuiv}, + {"nglPixelMapuivBO", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapuivBO, NULL, NULL}, {"nglPixelMapusv", "(IILjava/nio/ShortBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapusv, "glPixelMapusv", (void*)&glPixelMapusv}, + {"nglPixelMapusvBO", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_nglPixelMapusvBO, NULL, NULL}, {"glPassThrough", "(F)V", (void*)&Java_org_lwjgl_opengl_GL11_glPassThrough, "glPassThrough", (void*)&glPassThrough}, {"glOrtho", "(DDDDDD)V", (void*)&Java_org_lwjgl_opengl_GL11_glOrtho, "glOrtho", (void*)&glOrtho}, {"nglNormalPointer", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglNormalPointer, "glNormalPointer", (void*)&glNormalPointer}, @@ -2732,6 +2869,7 @@ {"glRectf", "(FFFF)V", (void*)&Java_org_lwjgl_opengl_GL11_glRectf, "glRectf", (void*)&glRectf}, {"glRecti", "(IIII)V", (void*)&Java_org_lwjgl_opengl_GL11_glRecti, "glRecti", (void*)&glRecti}, {"nglReadPixels", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglReadPixels, "glReadPixels", (void*)&glReadPixels}, + {"nglReadPixelsBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglReadPixelsBO, NULL, NULL}, {"glReadBuffer", "(I)V", (void*)&Java_org_lwjgl_opengl_GL11_glReadBuffer, "glReadBuffer", (void*)&glReadBuffer}, {"glRasterPos2f", "(FF)V", (void*)&Java_org_lwjgl_opengl_GL11_glRasterPos2f, "glRasterPos2f", (void*)&glRasterPos2f}, {"glRasterPos2i", "(II)V", (void*)&Java_org_lwjgl_opengl_GL11_glRasterPos2i, "glRasterPos2i", (void*)&glRasterPos2i}, @@ -2758,13 +2896,17 @@ {"glVertex4i", "(IIII)V", (void*)&Java_org_lwjgl_opengl_GL11_glVertex4i, "glVertex4i", (void*)&glVertex4i}, {"glTranslatef", "(FFF)V", (void*)&Java_org_lwjgl_opengl_GL11_glTranslatef, "glTranslatef", (void*)&glTranslatef}, {"nglTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexSubImage2D, "glTexSubImage2D", (void*)&glTexSubImage2D}, + {"nglTexSubImage2DBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexSubImage2DBO, NULL, NULL}, {"nglTexSubImage1D", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexSubImage1D, "glTexSubImage1D", (void*)&glTexSubImage1D}, + {"nglTexSubImage1DBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexSubImage1DBO, NULL, NULL}, {"glTexParameterf", "(IIF)V", (void*)&Java_org_lwjgl_opengl_GL11_glTexParameterf, "glTexParameterf", (void*)&glTexParameterf}, {"glTexParameteri", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_glTexParameteri, "glTexParameteri", (void*)&glTexParameteri}, {"nglTexParameterfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexParameterfv, "glTexParameterfv", (void*)&glTexParameterfv}, {"nglTexParameteriv", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexParameteriv, "glTexParameteriv", (void*)&glTexParameteriv}, {"nglTexImage2D", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexImage2D, "glTexImage2D", (void*)&glTexImage2D}, + {"nglTexImage2DBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexImage2DBO, NULL, NULL}, {"nglTexImage1D", "(IIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexImage1D, "glTexImage1D", (void*)&glTexImage1D}, + {"nglTexImage1DBO", "(IIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexImage1DBO, NULL, NULL}, {"glTexGenf", "(IIF)V", (void*)&Java_org_lwjgl_opengl_GL11_glTexGenf, "glTexGenf", (void*)&glTexGenf}, {"nglTexGenfv", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_GL11_nglTexGenfv, "glTexGenfv", (void*)&glTexGenfv}, {"glTexGeni", "(III)V", (void*)&Java_org_lwjgl_opengl_GL11_glTexGeni, "glTexGeni", (void*)&glTexGeni}, Index: org_lwjgl_opengl_GL13.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL13.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL13.c 10 Sep 2004 08:13:49 -0000 1.1 +++ org_lwjgl_opengl_GL13.c 13 Jan 2005 02:16:46 -0000 1.2 @@ -1,35 +1,35 @@ -/* +/* * 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 + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * 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 + * * 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 + * 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 + * 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. */ - + /** * $Id$ * @@ -84,7 +84,6 @@ (JNIEnv *env, jclass clazz, jint texture) { glActiveTexture(texture); - } /* @@ -96,7 +95,6 @@ (JNIEnv *env, jclass clazz, jint texture) { glClientActiveTexture(texture); - } /* @@ -109,7 +107,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexImage1D(target, level, internalformat, width, border, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexImage1DBO + * Signature: (IIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imagesize, jint buffer_offset) +{ + glCompressedTexImage1D(target, level, internalformat, width, border, imagesize, offsetToPointer(buffer_offset)); } /* @@ -122,7 +130,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexImage2D(target, level, internalformat, width, height, border, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexImage2DBO + * Signature: (IIIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imagesize, jint buffer_offset) +{ + glCompressedTexImage2D(target, level, internalformat, width, height, border, imagesize, offsetToPointer(buffer_offset)); } /* @@ -135,7 +153,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexImage3DBO + * Signature: (IIIIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imagesize, jint buffer_offset) +{ + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imagesize, offsetToPointer(buffer_offset)); } /* @@ -148,7 +176,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexSubImage1D(target, level, xoffset, width, format, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexSubImage1DBO + * Signature: (IIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imagesize, jint buffer_offset) +{ + glCompressedTexSubImage1D(target, level, xoffset, width, format, imagesize, offsetToPointer(buffer_offset)); } /* @@ -161,7 +199,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexSubImage2DBO + * Signature: (IIIIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imagesize, jint buffer_offset) +{ + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imagesize, offsetToPointer(buffer_offset)); } /* @@ -174,7 +222,17 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, address); - +} + +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glCompressedTexSubImage3DBO + * Signature: (IIIIIIIIIII)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imagesize, jint buffer_offset) +{ + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, offsetToPointer(buffer_offset)); } /* @@ -187,10 +245,18 @@ { void *address = (void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glGetCompressedTexImage(target, lod, address); - } - +/* + * Class: org_lwjgl_opengl_GL13 + * Method: glGetCompressedTexImageBO + * Signature: (III)V + */ +static void JNICALL Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImageBO + (JNIEnv *env, jclass clazz, jint target, jint lod, jint buffer_offset) +{ + glGetCompressedTexImage(target, lod, offsetToPointer(buffer_offset)); +} /* * Class: org_lwjgl_opengl_GL13 @@ -201,7 +267,7 @@ (JNIEnv *env, jclass clazz, jint target, jfloat s) { glMultiTexCoord1f(target, s); - + } @@ -214,10 +280,8 @@ (JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t) { glMultiTexCoord2f(target, s, t); - -} - +} /* * Class: org_lwjgl_opengl_GL13 @@ -228,10 +292,8 @@ (JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r) { glMultiTexCoord3f(target, s, t, r); - } - /* * Class: org_lwjgl_opengl_GL13 * Method: glMultiTexCoord4f @@ -241,10 +303,8 @@ (JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jfloat q) { glMultiTexCoord4f(target, s, t, r, q); - } - /* * Class: org_lwjgl_opengl_GL13 * Method: glLoadTransposeMatrixf @@ -255,11 +315,8 @@ { const GLfloat *address = (const GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glLoadTransposeMatrixf(address); - } - - /* * Class: org_lwjgl_opengl_GL13 * Method: glMultTransposeMatrixf @@ -270,7 +327,6 @@ { const GLfloat *address = (const GLfloat *)(*env)->GetDirectBufferAddress(env, buffer); glMultTransposeMatrixf(address); - } /* @@ -282,7 +338,6 @@ (JNIEnv *env, jclass clazz, jfloat value, jboolean invert) { glSampleCoverage(value, invert); - } #ifdef __cplusplus @@ -293,12 +348,19 @@ {"glActiveTexture", "(I)V", (void*)&Java_org_lwjgl_opengl_GL13_glActiveTexture, "glActiveTexture", (void*)&glActiveTexture}, {"glClientActiveTexture", "(I)V", (void*)&Java_org_lwjgl_opengl_GL13_glClientActiveTexture, "glClientActiveTexture", (void*)&glClientActiveTexture}, {"nglCompressedTexImage1D", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1D, "glCompressedTexImage1D", (void*)&glCompressedTexImage1D}, + {"nglCompressedTexImage1DBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1DBO, NULL, NULL}, {"nglCompressedTexImage2D", "(IIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2D, "glCompressedTexImage2D", (void*)&glCompressedTexImage2D}, + {"nglCompressedTexImage2DBO", "(IIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2DBO, NULL, NULL}, {"nglCompressedTexImage3D", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3D, "glCompressedTexImage3D", (void*)&glCompressedTexImage3D}, + {"nglCompressedTexImage3DBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3DBO, NULL, NULL}, {"nglCompressedTexSubImage1D", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1D, "glCompressedTexSubImage1D", (void*)&glCompressedTexSubImage1D}, + {"nglCompressedTexSubImage1DBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1DBO, NULL, NULL}, {"nglCompressedTexSubImage2D", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2D, "glCompressedTexSubImage2D", (void*)&glCompressedTexSubImage2D}, + {"nglCompressedTexSubImage2DBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2DBO, NULL, NULL}, {"nglCompressedTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3D, "glCompressedTexSubImage3D", (void*)&glCompressedTexSubImage3D}, + {"nglCompressedTexSubImage3DBO", "(IIIIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3DBO, NULL, NULL}, {"nglGetCompressedTexImage", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImage, "glGetCompressedTexImage", (void*)&glGetCompressedTexImage}, + {"nglGetCompressedTexImageBO", "(III)V", (void*)&Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImageBO, NULL, NULL}, {"glMultiTexCoord1f", "(IF)V", (void*)&Java_org_lwjgl_opengl_GL13_glMultiTexCoord1f, "glMultiTexCoord1f", (void*)&glMultiTexCoord1f}, {"glMultiTexCoord2f", "(IFF)V", (void*)&Java_org_lwjgl_opengl_GL13_glMultiTexCoord2f, "glMultiTexCoord2f", (void*)&glMultiTexCoord2f}, {"glMultiTexCoord3f", "(IFFF)V", (void*)&Java_org_lwjgl_opengl_GL13_glMultiTexCoord3f, "glMultiTexCoord3f", (void*)&glMultiTexCoord3f}, Index: org_lwjgl_opengl_GL12.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL12.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_GL12.c 25 Nov 2004 22:36:07 -0000 1.3 +++ org_lwjgl_opengl_GL12.c 13 Jan 2005 02:16:46 -0000 1.4 @@ -87,20 +87,37 @@ { GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset); glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, buffer_ptr); +} +/* + * Class: org_lwjgl_opengl_GL12 + * Method: glTexImage3D + */ +static void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jint buffer_offset) +{ + glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, offsetToPointer(buffer_offset)); } /* * Class: org_lwjgl_opengl_GL12 * Method: glTexSubImage3D - * Signature: (IIIIIIIIIII)V */ static void JNICALL Java_org_lwjgl_opengl_GL12_nglTexSubImage3D (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jobject buffer, jint offset) { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, address); +} +/* + * Class: org_lwjgl_opengl_GL12 + * Method: glTexSubImage3D + */ +static void JNICALL Java_org_lwjgl_opengl_GL12_nglTexSubImage3DBO + (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jint buffer_offset) +{ + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offsetToPointer(buffer_offset)); } /* @@ -123,7 +140,9 @@ {"nglDrawRangeElements", "(IIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL12_nglDrawRangeElements, "glDrawRangeElements", (void*)&glDrawRangeElements}, {"nglDrawRangeElementsVBO", "(IIIIII)V", (void*)&Java_org_lwjgl_opengl_GL12_nglDrawRangeElementsVBO, NULL, NULL}, {"nglTexImage3D", "(IIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL12_nglTexImage3D, "glTexImage3D", (void*)&glTexImage3D}, + {"nglTexImage3DBO", "(IIIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL12_nglTexImage3DBO, NULL, NULL}, {"nglTexSubImage3D", "(IIIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_GL12_nglTexSubImage3D, "glTexSubImage3D", (void*)&glTexSubImage3D}, + {"nglTexSubImage3DBO", "(IIIIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL12_nglTexSubImage3DBO, NULL, NULL}, {"glCopyTexSubImage3D", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_GL12_glCopyTexSubImage3D, "glCopyTexSubImage3D", (void*)&glCopyTexSubImage3D} }; int num_functions = NUMFUNCTIONS(functions); |
|
From: Ioannis T. <sp...@us...> - 2005-01-13 02:16:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3312 Modified Files: GL.java GLImpl.java IGL.java Log Message: Implemented PBO support Index: GLImpl.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/GLImpl.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- GLImpl.java 25 Nov 2004 22:17:33 -0000 1.6 +++ GLImpl.java 13 Jan 2005 02:15:50 -0000 1.7 @@ -249,6 +249,20 @@ } /** + * + * @param width + * @param height + * @param xorig + * @param yorig + * @param xmove + * @param ymove + * @param buffer_offect + */ + public void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, int buffer_offect) { + GL.glBitmap(width, height, xorig, yorig, xmove, ymove, buffer_offect); + } + + /** * @param red * @param green * @param blue @@ -6548,4 +6562,397 @@ GL.glStencilOpSeparate(face, sfail, dpfail, dppass); } + /** + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public void glDrawPixels(int width, int height, int format, int type, int buffer_offset) { + GL.glDrawPixels(width, height, format, type, buffer_offset); + } + + /** + * @param map + * @param buffer_offset + */ + public void glGetPixelMapfv(int map, int buffer_offset) { + GL.glGetPixelMapfv(map, buffer_offset); + } + + /** + * @param map + * @param buffer_offset + */ + public void glGetPixelMapuiv(int map, int buffer_offset) { + GL.glGetPixelMapuiv(map, buffer_offset); + } + + /** + * @param map + * @param buffer_offset + */ + public void glGetPixelMapusv(int map, int buffer_offset) { + GL.glGetPixelMapusv(map, buffer_offset); + } + + /** + * @param buffer_offset + */ + public void glGetPolygonStipple(int buffer_offset) { + GL.glGetPolygonStipple(buffer_offset); + } + + /** + * @param target + * @param level + * @param format + * @param type + * @param buffer_offset + */ + public void glGetTexImage(int target, int level, int format, int type, int buffer_offset) { + GL.glGetTexImage(target, level, format, type, buffer_offset); + } + + /** + * @param map + * @param mapsize + * @param buffer_offset + */ + public void glPixelMapfv(int map, int mapsize, int buffer_offset) { + GL.glPixelMapfv(map, mapsize, buffer_offset); + } + + /** + * @param map + * @param mapsize + * @param buffer_offset + */ + public void glPixelMapuiv(int map, int mapsize, int buffer_offset) { + GL.glPixelMapuiv(map, mapsize, buffer_offset); + } + + /** + * @param map + * @param mapsize + * @param buffer_offset + */ + public void glPixelMapusv(int map, int mapsize, int buffer_offset) { + GL.glPixelMapusv(map, mapsize, buffer_offset); + } + + /** + * @param buffer_offset + */ + public void glPolygonStipple(int buffer_offset) { + GL.glPolygonStipple(buffer_offset); + } + + /** + * @param x + * @param y + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public void glReadPixels(int x, int y, int width, int height, int format, int type, int buffer_offset) { + GL.glReadPixels(x, y, width, height, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, int buffer_offset) { + GL.glTexImage1D(target, level, internalformat, width, border, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, int buffer_offset) { + GL.glTexImage2D(target, level, internalformat, width, height, border, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param width + * @param format + * @param type + * @param buffer_offset + */ + public void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, int buffer_offset) { + GL.glTexSubImage1D(target, level, xoffset, width, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int buffer_offset) { + GL.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalFormat + * @param width + * @param height + * @param depth + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, int buffer_offset) { + GL.glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param type + * @param buffer_offset + */ + public void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int buffer_offset) { + GL.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param border + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, int buffer_offset) { + GL.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param border + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, int buffer_offset) { + GL.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param depth + * @param border + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int buffer_offset) { + GL.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param width + * @param format + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, int buffer_offset) { + GL.glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param width + * @param height + * @param format + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int buffer_offset) { + GL.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param imageSize + * @param buffer_offset + */ + public void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int buffer_offset) { + GL.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, buffer_offset); + } + + /** + * @param target + * @param lod + * @param buffer_offset + */ + public void glGetCompressedTexImage(int target, int lod, int buffer_offset) { + GL.glGetCompressedTexImage(target, lod, buffer_offset); + } + + /** + * @param target + * @param start + * @param count + * @param format + * @param type + * @param buffer_offset + */ + public void glColorSubTable(int target, int start, int count, int format, int type, int buffer_offset) { + GL.glColorSubTable(target, start, count, format, type, buffer_offset); + } + + /** + * @param target + * @param internalFormat + * @param width + * @param format + * @param type + * @param buffer_offset + */ + public void glColorTable(int target, int internalFormat, int width, int format, int type, int buffer_offset) { + GL.glColorTable(target, internalFormat, width, format, type, buffer_offset); + } + + /** + * @param target + * @param internalformat + * @param width + * @param format + * @param type + * @param buffer_offset + */ + public void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int buffer_offset) { + GL.glConvolutionFilter1D(target, internalformat, width, format, type, buffer_offset); + } + + /** + * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int buffer_offset) { + GL.glConvolutionFilter2D(target, internalformat, width, height, format, type, buffer_offset); + } + + /** + * @param target + * @param format + * @param type + * @param buffer_offset + */ + public void glGetConvolutionFilter(int target, int format, int type, int buffer_offset) { + GL.glGetConvolutionFilter(target, format, type, buffer_offset); + } + + /** + * @param target + * @param reset + * @param format + * @param type + * @param buffer_offset + */ + public void glGetHistogram(int target, boolean reset, int format, int type, int buffer_offset) { + GL.glGetHistogram(target, reset, format, type, buffer_offset); + } + + /** + * @param target + * @param reset + * @param format + * @param types + * @param buffer_offset + */ + public void glGetMinmax(int target, boolean reset, int format, int types, int buffer_offset) { + GL.glGetMinmax(target, reset, format, types, buffer_offset); + } + + /** + * @param target + * @param format + * @param type + * @param row_offset + * @param column_offset + * @param span_offset + */ + public void glGetSeparableFilter(int target, int format, int type, int row_offset, int column_offset, int span_offset) { + GL.glGetSeparableFilter(target, format, type, row_offset, column_offset, span_offset); + } + + /** + * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param row_offset + * @param column_offset + */ + public void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_offset, int column_offset) { + GL.glSeparableFilter2D(target, internalformat, width, height, format, type, row_offset, column_offset); + } + } Index: GL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/GL.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- GL.java 25 Nov 2004 22:17:33 -0000 1.6 +++ GL.java 13 Jan 2005 02:15:47 -0000 1.7 @@ -97,6 +97,19 @@ } /** + * @param width + * @param height + * @param xorig + * @param yorig + * @param xmove + * @param ymove + * @param buffer_offect + */ + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, int buffer_offect) { + GL11.glBitmap(width, height, xorig, yorig, xmove, ymove, buffer_offect); + } + + /** * @param sfactor * @param dfactor */ @@ -467,6 +480,17 @@ GL11.glDrawPixels(width, height, format, type, pixels); } + /** + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public static void glDrawPixels(int width, int height, int format, int type, int buffer_offset) { + GL11.glDrawPixels(width, height, format, type, buffer_offset); + } + /** @param flag */ public static void glEdgeFlag(boolean flag) { GL11.glEdgeFlag(flag); @@ -752,6 +776,14 @@ /** * @param map + * @param buffer_offset + */ + public static void glGetPixelMapfv(int map, int buffer_offset) { + GL11.glGetPixelMapfv(map, buffer_offset); + } + + /** + * @param map * @param values */ public static void glGetPixelMap(int map, IntBuffer values) { @@ -760,6 +792,14 @@ /** * @param map + * @param buffer_offset + */ + public static void glGetPixelMapuiv(int map, int buffer_offset) { + GL11.glGetPixelMapuiv(map, buffer_offset); + } + + /** + * @param map * @param values */ public static void glGetPixelMap(int map, ShortBuffer values) { @@ -767,6 +807,14 @@ } /** + * @param map + * @param buffer_offset + */ + public static void glGetPixelMapusv(int map, int buffer_offset) { + GL11.glGetPixelMapusv(map, buffer_offset); + } + + /** * @param pname * @param size * @@ -782,6 +830,13 @@ } /** + * @param buffer_offset + */ + public static void glGetPolygonStipple(int buffer_offset) { + GL11.glGetPolygonStipple(buffer_offset); + } + + /** * @param name * * @return @@ -862,6 +917,16 @@ /** * @param target * @param level + * @param format + * @param type + * @param buffer_offset + */ + public static void glGetTexImage(int target, int level, int format, int type, int buffer_offset) { + GL11.glGetTexImage(target, level, format, type, buffer_offset); + } + /** + * @param target + * @param level * @param pname * @param params */ @@ -1282,6 +1347,15 @@ /** * @param map + * @param mapsize + * @param buffer_offset + */ + public static void glPixelMapfv(int map, int mapsize, int buffer_offset) { + GL11.glPixelMapfv(map, mapsize, buffer_offset); + } + + /** + * @param map * @param values */ public static void glPixelMap(int map, IntBuffer values) { @@ -1290,6 +1364,15 @@ /** * @param map + * @param mapsize + * @param buffer_offset + */ + public static void glPixelMapuiv(int map, int mapsize, int buffer_offset) { + GL11.glPixelMapuiv(map, mapsize, buffer_offset); + } + + /** + * @param map * @param values */ public static void glPixelMap(int map, ShortBuffer values) { @@ -1297,6 +1380,15 @@ } /** + * @param map + * @param mapsize + * @param buffer_offset + */ + public static void glPixelMapusv(int map, int mapsize, int buffer_offset) { + GL11.glPixelMapusv(map, mapsize, buffer_offset); + } + + /** * @param pname * @param param */ @@ -1363,6 +1455,13 @@ } /** + * @param buffer_offset + */ + public static void glPolygonStipple(int buffer_offset) { + GL11.glPolygonStipple(buffer_offset); + } + + /** * */ public static void glPopAttrib() { @@ -1511,6 +1610,19 @@ } /** + * @param x + * @param y + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public static void glReadPixels(int x, int y, int width, int height, int format, int type, int buffer_offset) { + GL11.glReadPixels(x, y, width, height, format, type, buffer_offset); + } + + /** * @param x1 * @param y1 * @param x2 @@ -1785,6 +1897,20 @@ * @param level * @param internalformat * @param width + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, int buffer_offset) { + GL11.glTexImage1D(target, level, internalformat, width, border, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param internalformat + * @param width * @param height * @param border * @param format @@ -1842,6 +1968,21 @@ /** * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, int buffer_offset) { + GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, buffer_offset); + } + + /** + * @param target * @param pname * @param param */ @@ -1919,6 +2060,19 @@ * @param target * @param level * @param xoffset + * @param width + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, int buffer_offset) { + GL11.glTexSubImage1D(target, level, xoffset, width, format, type, buffer_offset); + } + + /** + * @param target + * @param level + * @param xoffset * @param yoffset * @param width * @param height @@ -1961,6 +2115,21 @@ } /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int buffer_offset) { + GL11.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, buffer_offset); + } + + /** * @param x * @param y * @param z @@ -2185,6 +2354,22 @@ /** * @param target * @param level + * @param internalFormat + * @param width + * @param height + * @param depth + * @param border + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, int buffer_offset) { + GL12.glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, buffer_offset); + } + + /** + * @param target + * @param level * @param xoffset * @param yoffset * @param zoffset @@ -2250,6 +2435,23 @@ GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param type + * @param buffer_offset + */ + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int buffer_offset) { + GL12.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, buffer_offset); + } + /** @param texture */ public static void glActiveTexture(int texture) { GL13.glActiveTexture(texture); @@ -2317,6 +2519,18 @@ * @param level * @param internalformat * @param width + * @param border + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, int buffer_offset) { + GL13.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, buffer_offset); + } + /** + * @param target + * @param level + * @param internalformat + * @param width * @param height * @param border * @param imageSize @@ -2374,6 +2588,19 @@ * @param internalformat * @param width * @param height + * @param border + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, int buffer_offset) { + GL13.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, buffer_offset); + } + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height * @param depth * @param border * @param imageSize @@ -2431,6 +2658,20 @@ /** * @param target * @param level + * @param internalformat + * @param width + * @param height + * @param depth + * @param border + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int buffer_offset) { + GL13.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, buffer_offset); + } + /** + * @param target + * @param level * @param xoffset * @param width * @param format @@ -2484,6 +2725,18 @@ * @param target * @param level * @param xoffset + * @param width + * @param format + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, int buffer_offset) { + GL13.glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, buffer_offset); + } + /** + * @param target + * @param level + * @param xoffset * @param yoffset * @param width * @param height @@ -2545,6 +2798,20 @@ * @param level * @param xoffset * @param yoffset + * @param width + * @param height + * @param format + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int buffer_offset) { + GL13.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, buffer_offset); + } + /** + * @param target + * @param level + * @param xoffset + * @param yoffset * @param zoffset * @param width * @param height @@ -2610,6 +2877,22 @@ /** * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param imageSize + * @param buffer_offset + */ + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int buffer_offset) { + GL13.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, buffer_offset); + } + /** + * @param target * @param lod * @param img */ @@ -2635,6 +2918,15 @@ GL13.glGetCompressedTexImage(target, lod, img); } + /** + * @param target + * @param lod + * @param buffer_offset + */ + public static void glGetCompressedTexImage(int target, int lod, int buffer_offset) { + GL13.glGetCompressedTexImage(target, lod, buffer_offset); + } + /** @param m */ public static void glLoadTransposeMatrix(FloatBuffer m) { GL13.glLoadTransposeMatrix(m); @@ -3413,6 +3705,18 @@ /** * @param target + * @param start + * @param count + * @param format + * @param type + * @param buffer_offset + */ + public static void glColorSubTable(int target, int start, int count, int format, int type, int buffer_offset) { + ARBImaging.glColorSubTable(target, start, count, format, type, buffer_offset); + } + + /** + * @param target * @param internalFormat * @param width * @param format @@ -3437,6 +3741,18 @@ /** * @param target + * @param internalFormat + * @param width + * @param format + * @param type + * @param buffer_offset + */ + public static void glColorTable(int target, int internalFormat, int width, int format, int type, int buffer_offset) { + ARBImaging.glColorTable(target, internalFormat, width, format, type, buffer_offset); + } + + /** + * @param target * @param pname * @param params */ @@ -3505,6 +3821,18 @@ * @param target * @param internalformat * @param width + * @param format + * @param type + * @param buffer_offset + */ + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int buffer_offset) { + ARBImaging.glConvolutionFilter1D(target, internalformat, width, format, type, buffer_offset); + + } + /** + * @param target + * @param internalformat + * @param width * @param height * @param format * @param type @@ -3542,6 +3870,19 @@ /** * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int buffer_offset) { + ARBImaging.glConvolutionFilter2D(target, internalformat, width, height, format, type, buffer_offset); + } + + /** + * @param target * @param pname * @param params */ @@ -3701,6 +4042,16 @@ /** * @param target + * @param format + * @param type + * @param buffer_offset + */ + public static void glGetConvolutionFilter(int target, int format, int type, int buffer_offset) { + ARBImaging.glGetConvolutionFilter(target, format, type, buffer_offset); + } + + /** + * @param target * @param pname * @param params */ @@ -3761,6 +4112,10 @@ ARBImaging.glGetHistogram(target, reset, format, type, values); } + public static void glGetHistogram(int target, boolean reset, int format, int type, int buffer_offset) { + ARBImaging.glGetHistogram(target, reset, format, type, buffer_offset); + } + /** * @param target * @param pname @@ -3825,6 +4180,17 @@ /** * @param target + * @param reset + * @param format + * @param types + * @param buffer_offset + */ + public static void glGetMinmax(int target, boolean reset, int format, int types, int buffer_offset) { + ARBImaging.glGetMinmax(target, reset, format, types, buffer_offset); + } + + /** + * @param target * @param pname * @param params */ @@ -3850,8 +4216,19 @@ * @param span */ public static void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span) { - ARBImaging - .glGetSeparableFilter(target, format, type, row, column, span); + ARBImaging.glGetSeparableFilter(target, format, type, row, column, span); + } + + /** + * @param target + * @param format + * @param type + * @param row_offset + * @param column_offset + * @param span_offset + */ + public static void glGetSeparableFilter(int target, int format, int type, int row_offset, int column_offset, int span_offset) { + ARBImaging.glGetSeparableFilter(target, format, type, row_offset, column_offset, span_offset); } /** @@ -3897,6 +4274,20 @@ ARBImaging.glSeparableFilter2D(target, internalformat, width, height, format, type, row, column); } + /** + * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param row_offset + * @param column_offset + */ + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_offset, int column_offset) { + ARBImaging.glSeparableFilter2D(target, internalformat, width, height, format, type, row_offset, column_offset); + } + /** @param index */ public static void glCurrentPaletteMatrixARB(int index) { ARBMatrixPalette.glCurrentPaletteMatrixARB(index); Index: IGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/IGL.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IGL.java 25 Nov 2004 22:17:33 -0000 1.5 +++ IGL.java 13 Jan 2005 02:15:51 -0000 1.6 @@ -83,6 +83,18 @@ void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap); /** + * + * @param width + * @param height + * @param xorig + * @param yorig + * @param xmove + * @param ymove + * @param buffer_offect + */ + void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, int buffer_offect); + + /** * @param sfactor * @param dfactor */ @@ -397,6 +409,16 @@ void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels); /** + * + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + void glDrawPixels(int width, int height, int format, int type, int buffer_offset); + + /** * @param flag */ void glEdgeFlag(boolean flag); @@ -623,17 +645,35 @@ /** * @param map + * @param buffer_offset + */ + void glGetPixelMapfv(int map, int buffer_offset); + + /** + * @param map * @param values */ void glGetPixelMap(int map, IntBuffer values); /** * @param map + * @param buffer_offset + */ + void glGetPixelMapuiv(int map, int buffer_offset); + + /** + * @param map * @param values */ void glGetPixelMap(int map, ShortBuffer values); /** + * @param map + * @param buffer_offset + */ + void glGetPixelMapusv(int map, int buffer_offset); + + /** * @param pname * @param size * @@ -647,6 +687,11 @@ void glGetPolygonStipple(ByteBuffer mask); /** + * @param buffer_offset + */ + void glGetPolygonStipple(int buffer_offset); + + /** * @param name * * @return @@ -711,6 +756,15 @@ /** * @param target * @param level + * @param format + * @param type + * @param buffer_offset + */ + void glGetTexImage(int target, int level, int format, int type, int buffer_offset); + + /** + * @param target + * @param level * @param pname * @param params */ @@ -1059,6 +1113,30 @@ void glPixelMap(int map, ShortBuffer values); /** + * + * @param map + * @param mapsize + * @param buffer_offset + */ + void glPixelMapfv(int map, int mapsize, int buffer_offset); + + /** + * + * @param map + * @param mapsize + * @param buffer_offset + */ + void glPixelMapuiv(int map, int mapsize, int buffer_offset); + + /** + * + * @param map + * @param mapsize + * @param buffer_offset + */ + void glPixelMapusv(int map, int mapsize, int buffer_offset); + + /** * @param pname * @param param */ @@ -1112,6 +1190,12 @@ /** * + * @param buffer_offset + */ + void glPolygonStipple(int buffer_offset); + + /** + * */ void glPopAttrib(); @@ -1231,6 +1315,17 @@ void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels); /** + * @param x + * @param y + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + void glReadPixels(int x, int y, int width, int height, int format, int type, int buffer_offset); + + /** * @param x1 * @param y1 * @param x2 @@ -1453,6 +1548,18 @@ */ void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels); + /** + * + * @param target + * @param level + * @param internalformat + * @param width + * @param border + * @param format + * @param type + * @param buffer_offset + */ + void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, int buffer_offset); /** * @param target @@ -1509,6 +1616,19 @@ */ void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels); + /** + * + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param border + * @param format + * @param type + * @param buffer_offset + */ + void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, int buffer_offset); /** * @param target @@ -1561,6 +1681,17 @@ */ void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels); + /** + * + * @param target + * @param level + * @param xoffset + * @param width + * @param format + * @param type + * @param buffer_offset + */ + void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, int buffer_offset); /** * @param target @@ -1615,6 +1746,19 @@ */ void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels); + /** + * + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, int buffer_offset); /** * @param x @@ -1787,7 +1931,6 @@ */ void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels); - /** * @param target * @param level @@ -1802,6 +1945,19 @@ */ void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels); + /** + * @param target + * @param level + * @param internalFormat + * @param width + * @param height + * @param depth + * @param border + * @param format + * @param type + * @param buffer_offset + */ + void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, int buffer_offset); /** * @param target @@ -1866,6 +2022,21 @@ */ void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels); + /** + * + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param type + * @param buffer_offset + */ + void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, int buffer_offset); /** * @param texture @@ -1924,6 +2095,16 @@ */ void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param border + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int imageSize, int buffer_offset); /** * @param target @@ -1974,6 +2155,17 @@ */ void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param border + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int imageSize, int buffer_offset); /** * @param target @@ -2027,6 +2219,18 @@ */ void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param internalformat + * @param width + * @param height + * @param depth + * @param border + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, int buffer_offset); /** * @param target @@ -2075,6 +2279,16 @@ */ void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param xoffset + * @param width + * @param format + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int imageSize, int buffer_offset); /** * @param target @@ -2089,7 +2303,6 @@ */ void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ByteBuffer data); - /** * @param target * @param level @@ -2103,7 +2316,6 @@ */ void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, FloatBuffer data); - /** * @param target * @param level @@ -2131,6 +2343,18 @@ */ void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param width + * @param height + * @param format + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, int buffer_offset); /** * @param target @@ -2147,7 +2371,6 @@ */ void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer data); - /** * @param target * @param level @@ -2163,7 +2386,6 @@ */ void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, FloatBuffer data); - /** * @param target * @param level @@ -2179,7 +2401,6 @@ */ void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, IntBuffer data); - /** * @param target * @param level @@ -2195,6 +2416,20 @@ */ void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ShortBuffer data); + /** + * @param target + * @param level + * @param xoffset + * @param yoffset + * @param zoffset + * @param width + * @param height + * @param depth + * @param format + * @param imageSize + * @param buffer_offset + */ + void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, int buffer_offset); /** * @param target @@ -2218,6 +2453,13 @@ void glGetCompressedTexImage(int target, int lod, ShortBuffer img); /** + * @param target + * @param lod + * @param buffer_offset + */ + void glGetCompressedTexImage(int target, int lod, int buffer_offset); + + /** * @param m */ void glLoadTransposeMatrix(FloatBuffer m); @@ -2846,6 +3088,16 @@ /** * @param target + * @param start + * @param count + * @param format + * @param type + * @param buffer_offset + */ + void glColorSubTable(int target, int start, int count, int format, int type, int buffer_offset); + + /** + * @param target * @param internalFormat * @param width * @param format @@ -2865,6 +3117,15 @@ */ void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data); + /** + * @param target + * @param internalFormat + * @param width + * @param format + * @param type + * @param buffer_offset + */ + void glColorTable(int target, int internalFormat, int width, int format, int type, int buffer_offset); /** * @param target @@ -2890,7 +3151,6 @@ */ void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image); - /** * @param target * @param internalformat @@ -2901,7 +3161,6 @@ */ void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image); - /** * @param target * @param internalformat @@ -2912,7 +3171,6 @@ */ void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image); - /** * @param target * @param internalformat @@ -2923,6 +3181,15 @@ */ void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image); + /** + * @param target + * @param internalformat + * @param width + * @param format + * @param type + * @param buffer_offset + */ + void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int buffer_offset); /** * @param target @@ -2935,7 +3202,6 @@ */ void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image); - /** * @param target * @param internalformat @@ -2947,7 +3213,6 @@ */ void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image); - /** * @param target * @param internalformat @@ -2959,6 +3224,16 @@ */ void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image); + /** + * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param buffer_offset + */ + void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int buffer_offset); /** * @param target @@ -3091,6 +3366,14 @@ /** * @param target + * @param format + * @param type + * @param buffer_offset + */ + void glGetConvolutionFilter(int target, int format, int type, int buffer_offset); + + /** + * @param target * @param pname * @param params */ @@ -3141,6 +3424,15 @@ /** * @param target + * @param reset + * @param format + * @param type + * @param buffer_offset + */ + void glGetHistogram(int target, boolean reset, int format, int type, int buffer_offset); + + /** + * @param target * @param pname * @param params */ @@ -3191,6 +3483,15 @@ /** * @param target + * @param reset + * @param format + * @param types + * @param buffer_offset + */ + void glGetMinmax(int target, boolean reset, int format, int types, int buffer_offset); + + /** + * @param target * @param pname * @param params */ @@ -3213,6 +3514,15 @@ */ void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span); + /** + * @param target + * @param format + * @param type + * @param row_offset + * @param column_offset + * @param span_offset + */ + void glGetSeparableFilter(int target, int format, int type, int row_offset, int column_offset, int span_offset); /** * @param target @@ -3251,6 +3561,17 @@ */ void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column); + /** + * @param target + * @param internalformat + * @param width + * @param height + * @param format + * @param type + * @param row_offset + * @param column_offset + */ + void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_offset, int column_offset); /** * @param index @@ -5204,7 +5525,7 @@ * @param name */ void glGetActiveUniform(int program, int index, - IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name); + IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name); /** * @param program @@ -5243,7 +5564,7 @@ * @param name */ void glGetActiveAttrib(int program, int index, - IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name); + IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name); /** * @param program |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3068 Modified Files: ARBBufferObject.java ARBImaging.java GL11.java GL12.java GL13.java GLBufferChecks.java VBOTracker.java Log Message: Implemented PBO support Index: ARBImaging.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBImaging.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ARBImaging.java 25 Nov 2004 22:20:43 -0000 1.12 +++ ARBImaging.java 13 Jan 2005 02:14:44 -0000 1.13 @@ -133,72 +133,84 @@ static native void initNativeStubs() throws LWJGLException; + // --------------------------- public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position()); } - public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorTable(target, internalFormat, width, format, type, data, data.position() << 2); } - private static native void nglColorTable(int target, int internalFormat, int width, int format, int type, Buffer data, int data_offset); + public static void glColorTable(int target, int internalFormat, int width, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglColorTableBO(target, internalFormat, width, format, type, buffer_offset); + } + private static native void nglColorTableBO(int target, int internalFormat, int width, int format, int type, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position()); } - public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(data, 256); nglColorSubTable(target, start, count, format, type, data, data.position() << 2); } - private static native void nglColorSubTable(int target, int start, int count, int format, int type, Buffer data, int data_offset); + public static void glColorSubTable(int target, int start, int count, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglColorSubTableBO(target, start, count, format, type, buffer_offset); + } + private static native void nglColorSubTableBO(int target, int start, int count, int format, int type, int buffer_offset); + // --------------------------- + public static void glColorTableParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglColorTableParameteriv(target, pname, params, params.position()); } - private static native void nglColorTableParameteriv(int target, int pname, IntBuffer params, int data_offset); public static void glColorTableParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglColorTableParameterfv(target, pname, params, params.position()); } - private static native void nglColorTableParameterfv(int target, int pname, FloatBuffer params, int data_offset); public static native void glCopyColorSubTable(int target, int start, int x, int y, int width); public static native void glCopyColorTable(int target, int internalformat, int x, int y, int width); + // --------------------------- public static void glGetColorTable(int target, int format, int type, ByteBuffer data) { BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position()); } - public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { BufferChecks.checkBuffer(data, 256); nglGetColorTable(target, format, type, data, data.position()); } - private static native void nglGetColorTable(int target, int format, int type, Buffer data, int data_offset); + // --------------------------- public static void glGetColorTableParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetColorTableParameteriv(target, pname, params, params.position()); } - private static native void nglGetColorTableParameteriv(int target, int pname, IntBuffer params, int params_offset); public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetColorTableParameterfv(target, pname, params, params.position()); } - private static native void nglGetColorTableParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static native void glBlendEquation(int mode); @@ -209,128 +221,155 @@ public static native void glResetHistogram(int target); + // --------------------------- public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position()); } - public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 1); } - public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2); } - public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetHistogram(target, reset, format, type, values, values.position() << 2); } - private static native void nglGetHistogram(int target, boolean reset, int format, int type, Buffer values, int values_offset); + public static void glGetHistogram(int target, boolean reset, int format, int type, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetHistogramBO(target, reset, format, type, buffer_offset); + } + private static native void nglGetHistogramBO(int target, boolean reset, int format, int type, int buffer_offset); + // --------------------------- + public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params, 256); nglGetHistogramParameterfv(target, pname, params, params.position()); } - private static native void nglGetHistogramParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static void glGetHistogramParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetHistogramParameteriv(target, pname, params, params.position()); } - private static native void nglGetHistogramParameteriv(int target, int pname, IntBuffer params, int params_offset); public static native void glMinmax(int target, int internalformat, boolean sink); public static native void glResetMinmax(int target); + // --------------------------- public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values); nglGetMinmax(target, reset, format, types, values, values.position()); } - public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values); nglGetMinmax(target, reset, format, types, values, values.position() << 1); } - public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values); nglGetMinmax(target, reset, format, types, values, values.position() << 2); } - public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values); nglGetMinmax(target, reset, format, types, values, values.position() << 2); } - private static native void nglGetMinmax(int target, boolean reset, int format, int types, Buffer values, int values_offset); + public static void glGetMinmax(int target, boolean reset, int format, int types, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetMinmaxBO(target, reset, format, types, buffer_offset); + } + private static native void nglGetMinmaxBO(int target, boolean reset, int format, int types, int buffer_offset); + // --------------------------- + public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetMinmaxParameterfv(target, pname, params, params.position()); } - private static native void nglGetMinmaxParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetMinmaxParameteriv(target, pname, params, params.position()); } - private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_offset); + // --------------------------- public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 1); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } - public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } - private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_offset); + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglConvolutionFilter1DBO(target, internalformat, width, format, type, buffer_offset); + } + private static native void nglConvolutionFilter1DBO(int target, int internalformat, int width, int format, int type, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position()); } - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 1); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 1); } - public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 2); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2); } - private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_offset); + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglConvolutionFilter2DBO(target, internalformat, width, height, format, type, buffer_offset); + } + private static native void nglConvolutionFilter2DBO(int target, int internalformat, int width, int height, int format, int type, int buffer_offset); + // --------------------------- + public static native void glConvolutionParameterf(int target, int pname, float params); public static void glConvolutionParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglConvolutionParameterfv(target, pname, params, params.position()); } - private static native void nglConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static native void glConvolutionParameteri(int target, int pname, int params); @@ -339,70 +378,91 @@ BufferChecks.checkBuffer(params); nglConvolutionParameteriv(target, pname, params, params.position()); } - private static native void nglConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); public static native void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width); public static native void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height); + // --------------------------- public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); // TODO: check buffer size valid nglGetConvolutionFilter(target, format, type, image, image.position()); } - public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); // TODO: check buffer size valid nglGetConvolutionFilter(target, format, type, image, image.position() << 1); } - public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); // TODO: check buffer size valid nglGetConvolutionFilter(target, format, type, image, image.position() << 2); } - public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirect(image); // TODO: check buffer size valid nglGetConvolutionFilter(target, format, type, image, image.position() << 2); } - private static native void nglGetConvolutionFilter(int target, int format, int type, Buffer image, int image_offset); + public static void glGetConvolutionFilter(int target, int format, int type, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetConvolutionFilterBO(target, format, type, buffer_offset); + } + private static native void nglGetConvolutionFilterBO(int target, int format, int type, int buffer_offset); + // --------------------------- + public static void glGetConvolutionParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetConvolutionParameterfv(target, pname, params, params.position()); } - private static native void nglGetConvolutionParameterfv(int target, int pname, FloatBuffer params, int params_offset); public static void glGetConvolutionParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetConvolutionParameteriv(target, pname, params, params.position()); } - private static native void nglGetConvolutionParameteriv(int target, int pname, IntBuffer params, int params_offset); + // --------------------------- public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, Buffer column) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirectBuffer(row); BufferChecks.checkDirectBuffer(column); // TODO: check buffer size valid nglSeparableFilter2D(target, internalformat, width, height, format, type, row, BufferUtils.getOffset(row), column, BufferUtils.getOffset(column)); } - private static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset); + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, int row_offset, int column_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglSeparableFilter2DBO(target, internalformat, width, height, format, type, row_offset, column_offset); + } + private static native void nglSeparableFilter2DBO(int target, int internalformat, int width, int height, int format, int type, int row_offset, int column_offset); + // --------------------------- + + // --------------------------- public static void glGetSeparableFilter(int target, int format, int type, Buffer row, Buffer column, Buffer span) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkDirectBuffer(row); BufferChecks.checkDirectBuffer(column); BufferChecks.checkDirectBuffer(span); // TODO: check buffer size valid nglGetSeparableFilter(target, format, type, row, BufferUtils.getOffset(row), column, BufferUtils.getOffset(column), span, BufferUtils.getOffset(span)); } - private static native void nglGetSeparableFilter(int target, int format, int type, Buffer row, int row_offset, Buffer column, int column_offset, Buffer span, int span_offset); + + public static void glGetSeparableFilter(int target, int format, int type, int row_offset, int column_offset, int span_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetSeparableFilterBO(target, format, type, row_offset, column_offset, span_offset); + } + private static native void nglGetSeparableFilterBO(int target, int format, int type, int row_offset, int column_offset, int span_offset); + // --------------------------- } Index: GL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL11.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- GL11.java 25 Nov 2004 22:18:29 -0000 1.22 +++ GL11.java 13 Jan 2005 02:14:44 -0000 1.23 @@ -731,6 +731,8 @@ public static native void glClearColor(float red, float green, float blue, float alpha); public static native void glClearAccum(float red, float green, float blue, float alpha); public static native void glClear(int mask); + + // --------------------------- public static void glCallLists(ByteBuffer lists) { BufferChecks.checkDirect(lists); nglCallLists(lists.remaining(), GL_UNSIGNED_BYTE, lists, lists.position()); @@ -744,24 +746,39 @@ nglCallLists(lists.remaining(), GL_UNSIGNED_INT, lists, lists.position() << 2); } private static native void nglCallLists(int n, int type, Buffer lists, int lists_offset); + // --------------------------- + public static native void glCallList(int list); public static native void glBlendFunc(int sfactor, int dfactor); + + // --------------------------- public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) { - BufferChecks.checkBuffer(bitmap, ((width+7)/8) * height); + GLBufferChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(bitmap, ((width + 7) / 8) * height); nglBitmap(width, height, xorig, yorig, xmove, ymove, bitmap, bitmap.position()); } private static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap, int bitmap_offset); + + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, int buffer_offect) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglBitmapBO(width, height, xorig, yorig, xmove, ymove, buffer_offect); + } + private static native void nglBitmapBO(int width, int height, float xorig, float yorig, float xmove, float ymove, int buffer_offset); + // --------------------------- + public static native void glBindTexture(int target, int texture); public static native void glBegin(int mode); public static native void glEnd(); public static native void glArrayElement(int i); public static native void glClearDepth(double depth); public static native void glDeleteLists(int list, int range); + public static void glDeleteTextures(IntBuffer textures) { BufferChecks.checkDirect(textures); nglDeleteTextures(textures.remaining(), textures, textures.position()); } private static native void nglDeleteTextures(int n, IntBuffer textures, int textures_offset); + public static native void glCullFace(int mode); public static native void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height); public static native void glCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width); @@ -769,6 +786,7 @@ public static native void glCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, int border); public static native void glCopyPixels(int x, int y, int width, int height, int type); + // --------------------------- public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); GLBufferChecks.ensureArrayVBOdisabled(); @@ -780,11 +798,14 @@ nglColorPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); } private static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); + public static void glColorPointer(int size, int type, int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglColorPointerVBO(size, type, stride, buffer_offset); } private static native void nglColorPointerVBO(int size, int type, int stride, int buffer_offset); + // --------------------------- + public static native void glColorMaterial(int face, int mode); public static native void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); public static native void glColor3b(byte red, byte green, byte blue); @@ -793,11 +814,13 @@ public static native void glColor4b(byte red, byte green, byte blue, byte alpha); public static native void glColor4f(float red, float green, float blue, float alpha); public static native void glColor4ub(byte red, byte green, byte blue, byte alpha); + public static void glClipPlane(int plane, DoubleBuffer equation) { BufferChecks.checkBuffer(equation, 4); nglClipPlane(plane, equation, equation.position() << 3); } private static native void nglClipPlane(int plane, DoubleBuffer equation, int equation_offset); + public static native void glClearStencil(int s); public static native void glClearIndex(float c); public static native void glEvalPoint1(int i); @@ -810,31 +833,50 @@ public static native void glDisableClientState(int cap); public static native void glEnable(int cap); public static native void glDisable(int cap); + + // --------------------------- public static void glEdgeFlagPointer(int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); GLBufferChecks.ensureArrayVBOdisabled(); nglEdgeFlagPointer(stride, pointer, pointer.position()); } private static native void nglEdgeFlagPointer(int stride, Buffer pointer, int pointer_offset); + public static void glEdgeFlagPointer(int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglEdgeFlagPointerVBO(stride, buffer_offset); } private static native void nglEdgeFlagPointerVBO(int stride, int buffer_offset); + // --------------------------- + public static native void glEdgeFlag(boolean flag); + + // --------------------------- public static void glDrawPixels(int width, int height, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglDrawPixels(width, height, format, type, pixels, pixels.position()); } public static void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglDrawPixels(width, height, format, type, pixels, pixels.position() << 1); } public static void glDrawPixels(int width, int height, int format, int type, IntBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglDrawPixels(width, height, format, type, pixels, pixels.position() << 2); } private static native void nglDrawPixels(int width, int height, int format, int type, Buffer pixels, int pixels_offset); + + public static void glDrawPixels(int width, int height, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglDrawPixelsBO(width, height, format, type, buffer_offset); + } + private static native void nglDrawPixelsBO(int width, int height, int format, int type, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glDrawElements(int mode, ByteBuffer indices) { BufferChecks.checkDirect(indices); GLBufferChecks.ensureElementVBOdisabled(); @@ -851,113 +893,163 @@ nglDrawElements(mode, indices.remaining(), GL_UNSIGNED_INT, indices, indices.position() << 2); } private static native void nglDrawElements(int mode, int count, int type, Buffer indices, int indices_offset); + public static void glDrawElements(int mode, int count, int type, int buffer_offset) { GLBufferChecks.ensureElementVBOenabled(); nglDrawElementsVBO(mode, count, type, buffer_offset); } private static native void nglDrawElementsVBO(int mode, int count, int type, int buffer_offset); + // --------------------------- + public static native void glDrawBuffer(int mode); public static native void glDrawArrays(int mode, int first, int count); public static native void glDepthRange(double zNear, double zFar); public static native void glDepthMask(boolean flag); public static native void glDepthFunc(int func); + public static void glFeedbackBuffer(int type, FloatBuffer buffer) { BufferChecks.checkDirect(buffer); nglFeedbackBuffer(buffer.remaining(), type, buffer, buffer.position()); } private static native void nglFeedbackBuffer(int size, int type, FloatBuffer buffer, int buffer_offset); + // --------------------------- public static void glGetPixelMap(int map, FloatBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetPixelMapfv(map, values, values.position()); } private static native void nglGetPixelMapfv(int map, FloatBuffer values, int values_offset); + + public static void glGetPixelMapfv(int map, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetPixelMapfvBO(map, buffer_offset); + } + private static native void nglGetPixelMapfvBO(int map, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glGetPixelMap(int map, IntBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetPixelMapuiv(map, values, values.position()); } private static native void nglGetPixelMapuiv(int map, IntBuffer values, int values_offset); + + public static void glGetPixelMapuiv(int map, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetPixelMapuivBO(map, buffer_offset); + } + private static native void nglGetPixelMapuivBO(int map, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glGetPixelMap(int map, ShortBuffer values) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(values, 256); nglGetPixelMapusv(map, values, values.position()); } private static native void nglGetPixelMapusv(int map, ShortBuffer values, int values_offset); + + public static void glGetPixelMapusv(int map, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetPixelMapusvBO(map, buffer_offset); + } + private static native void nglGetPixelMapusvBO(int map, int buffer_offset); + // --------------------------- + public static void glGetMaterial(int face, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetMaterialfv(face, pname, params, params.position()); } private static native void nglGetMaterialfv(int face, int pname, FloatBuffer params, int params_offset); + public static void glGetMaterial(int face, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetMaterialiv(face, pname, params, params.position()); } private static native void nglGetMaterialiv(int face, int pname, IntBuffer params, int params_offset); + public static void glGetMap(int target, int query, FloatBuffer v) { BufferChecks.checkBuffer(v, 256); nglGetMapfv(target, query, v, v.position()); } + private static native void nglGetMapfv(int target, int query, FloatBuffer v, int v_offset); + public static void glGetMap(int target, int query, IntBuffer v) { BufferChecks.checkBuffer(v, 256); nglGetMapiv(target, query, v, v.position()); } - private static native void nglGetMapfv(int target, int query, FloatBuffer v, int v_offset); private static native void nglGetMapiv(int target, int query, IntBuffer v, int v_offset); + public static void glGetLight(int light, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetLightfv(light, pname, params, params.position()); } private static native void nglGetLightfv(int light, int pname, FloatBuffer params, int params_offset); + public static void glGetLight(int light, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetLightiv(light, pname, params, params.position()); } private static native void nglGetLightiv(int light, int pname, IntBuffer params, int params_offset); + public static native int glGetError(); + public static void glGetClipPlane(int plane, DoubleBuffer equation) { BufferChecks.checkBuffer(equation); nglGetClipPlane(plane, equation, equation.position()); } private static native void nglGetClipPlane(int plane, DoubleBuffer equation, int equation_offset); + public static void glGetBoolean(int pname, ByteBuffer params) { BufferChecks.checkBuffer(params, 16); nglGetBooleanv(pname, params, params.position()); } private static native void nglGetBooleanv(int pname, ByteBuffer params, int params_offset); + public static void glGetDouble(int pname, DoubleBuffer params) { BufferChecks.checkBuffer(params, 16); nglGetDoublev(pname, params, params.position()); } private static native void nglGetDoublev(int pname, DoubleBuffer params, int params_offset); + public static void glGetFloat(int pname, FloatBuffer params) { BufferChecks.checkBuffer(params, 16); nglGetFloatv(pname, params, params.position()); } private static native void nglGetFloatv(int pname, FloatBuffer params, int params_offset); + public static void glGetInteger(int pname, IntBuffer params) { BufferChecks.checkBuffer(params, 16); nglGetIntegerv(pname, params, params.position()); } private static native void nglGetIntegerv(int pname, IntBuffer params, int params_offset); + public static void glGenTextures(IntBuffer textures) { BufferChecks.checkDirect(textures); nglGenTextures(textures.remaining(), textures, textures.position()); } private static native void nglGenTextures(int n, IntBuffer textures, int textures_offset); + public static native int glGenLists(int range); public static native void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar); public static native void glFrontFace(int mode); public static native void glFogf(int pname, float param); public static native void glFogi(int pname, int param); + public static void glFog(int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglFogfv(pname, params, params.position()); } private static native void nglFogfv(int pname, FloatBuffer params, int params_offset); + public static void glFog(int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglFogiv(pname, params, params.position()); } private static native void nglFogiv(int pname, IntBuffer params, int params_offset); + public static native void glFlush(); public static native void glFinish(); /** @@ -969,6 +1061,8 @@ */ public static native ByteBuffer glGetPointerv(int pname, int size); public static native boolean glIsEnabled(int cap); + + // --------------------------- public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); GLBufferChecks.ensureArrayVBOdisabled(); @@ -990,56 +1084,66 @@ nglInterleavedArrays(format, stride, pointer, pointer.position() << 2); } private static native void nglInterleavedArrays(int format, int stride, Buffer pointer, int pointer_offset); + public static void glInterleavedArrays(int format, int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglInterleavedArraysVBO(format, stride, buffer_offset); } private static native void nglInterleavedArraysVBO(int format, int stride, int buffer_offset); + // --------------------------- + public static native void glInitNames(); public static native void glHint(int target, int mode); + public static void glGetTexParameter(int target, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetTexParameterfv(target, pname, params, params.position()); } private static native void nglGetTexParameterfv(int target, int pname, FloatBuffer params, int params_offset); + public static void glGetTexParameter(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetTexParameteriv(target, pname, params, params.position()); } private static native void nglGetTexParameteriv(int target, int pname, IntBuffer params, int params_offset); + public static void glGetTexLevelParameter(int target, int level, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetTexLevelParameterfv(target, level, pname, params, params.position()); } private static native void nglGetTexLevelParameterfv(int target, int level, int pname, FloatBuffer params, int params_offset); + public static void glGetTexLevelParameter(int target, int level, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetTexLevelParameteriv(target, level, pname, params, params.position()); } private static native void nglGetTexLevelParameteriv(int target, int level, int pname, IntBuffer params, int params_offset); + + // --------------------------- public static void glGetTexImage(int target, int level, int format, int type, ByteBuffer pixels) { - int width = 1; - int height = 1; - int depth = 1; - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, 1, 1, 1)); nglGetTexImage(target, level, format, type, pixels, pixels.position()); } public static void glGetTexImage(int target, int level, int format, int type, ShortBuffer pixels) { - int width = 1; - int height = 1; - int depth = 1; - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, 1, 1, 1)>>1); nglGetTexImage(target, level, format, type, pixels, pixels.position() << 1); } public static void glGetTexImage(int target, int level, int format, int type, IntBuffer pixels) { - int width = 1; - int height = 1; - int depth = 1; - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + GLBufferChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, 1, 1, 1)>>2); nglGetTexImage(target, level, format, type, pixels, pixels.position() << 2); } private static native void nglGetTexImage(int target, int level, int format, int type, Buffer pixels, int pixels_offset); + public static void glGetTexImage(int target, int level, int format, int type, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetTexImageBO(target, level, format, type, buffer_offset); + } + private static native void nglGetTexImageBO(int target, int level, int format, int type, int buffer_offset); + // --------------------------- + public static void glGetTexGen(int coord, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetTexGeniv(coord, pname, params, params.position()); @@ -1057,6 +1161,7 @@ nglGetTexEnviv(coord, pname, params, params.position()); } private static native void nglGetTexEnviv(int coord, int pname, IntBuffer params, int params_offset); + public static void glGetTexEnv(int coord, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetTexEnvfv(coord, pname, params, params.position()); @@ -1064,80 +1169,116 @@ private static native void nglGetTexEnvfv(int coord, int pname, FloatBuffer params, int params_offset); public static native String glGetString(int name); + + // --------------------------- public static void glGetPolygonStipple(ByteBuffer mask) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(mask, 1024); nglGetPolygonStipple(mask, mask.position()); } private static native void nglGetPolygonStipple(ByteBuffer mask, int mask_offset); + + public static void glGetPolygonStipple(int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglGetPolygonStippleBO(buffer_offset); + } + private static native void nglGetPolygonStippleBO(int buffer_offset); + // --------------------------- + public static native boolean glIsList(int list); public static native void glMaterialf(int face, int pname, float param); public static native void glMateriali(int face, int pname, int param); + public static void glMaterial(int face, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglMaterialfv(face, pname, params, params.position()); } private static native void nglMaterialfv(int face, int pname, FloatBuffer params, int params_offset); + public static void glMaterial(int face, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglMaterialiv(face, pname, params, params.position()); } private static native void nglMaterialiv(int face, int pname, IntBuffer params, int params_offset); + public static native void glMapGrid1f(int un, float u1, float u2); public static native void glMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2); + public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) { BufferChecks.checkDirect(points); // TODO: check buffer size valid nglMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points, points.position()); } private static native void nglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points, int points_offset); + public static void glMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points) { BufferChecks.checkDirect(points); // TODO: check buffer size valid nglMap1f(target, u1, u2, stride, order, points, points.position()); } private static native void nglMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points, int points_offset); + public static native void glLogicOp(int opcode); public static native void glLoadName(int name); + public static void glLoadMatrix(FloatBuffer m) { BufferChecks.checkBuffer(m, 16); nglLoadMatrixf(m, m.position()); } private static native void nglLoadMatrixf(FloatBuffer m, int m_offset); + public static native void glLoadIdentity(); public static native void glListBase(int base); public static native void glLineWidth(float width); public static native void glLineStipple(int factor, short pattern); public static native void glLightModelf(int pname, float param); public static native void glLightModeli(int pname, int param); + public static void glLightModel(int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglLightModelfv( pname, params, params.position()); } private static native void nglLightModelfv(int pname, FloatBuffer params, int params_offset); + public static void glLightModel(int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglLightModeliv(pname, params, params.position()); } private static native void nglLightModeliv(int pname, IntBuffer params, int params_offset); + public static native void glLightf(int light, int pname, float param); public static native void glLighti(int light, int pname, int param); + public static void glLight(int light, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); nglLightfv(light, pname, params, params.position()); } private static native void nglLightfv(int light, int pname, FloatBuffer params, int params_offset); + public static void glLight(int light, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglLightiv(light, pname, params, params.position()); } private static native void nglLightiv(int light, int pname, IntBuffer params, int params_offset); + public static native boolean glIsTexture(int texture); public static native void glMatrixMode(int mode); + + // --------------------------- public static void glPolygonStipple(ByteBuffer mask) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(mask, 1024); nglPolygonStipple(mask, mask.position()); } private static native void nglPolygonStipple(ByteBuffer mask, int mask_offset); + + public static void glPolygonStipple(int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglPolygonStippleBO(buffer_offset); + } + private static native void nglPolygonStippleBO(int buffer_offset); + // --------------------------- + public static native void glPolygonOffset(float factor, float units); public static native void glPolygonMode(int face, int mode); public static native void glPointSize(float size); @@ -1146,23 +1287,56 @@ public static native void glPixelTransferi(int pname, int param); public static native void glPixelStoref(int pname, float param); public static native void glPixelStorei(int pname, int param); + + // --------------------------- public static void glPixelMap(int map, FloatBuffer values) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(values); nglPixelMapfv(map, values.remaining(), values, values.position()); } private static native void nglPixelMapfv(int map, int mapsize, FloatBuffer values, int values_offset); + + public static void glPixelMapfv(int map, int mapsize, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglPixelMapfvBO(map, mapsize, buffer_offset); + } + private static native void nglPixelMapfvBO(int map, int mapsize, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glPixelMap(int map, IntBuffer values) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(values); nglPixelMapuiv(map, values.remaining(), values, values.position()); } private static native void nglPixelMapuiv(int map, int mapsize, IntBuffer values, int values_offset); + + public static void glPixelMapuiv(int map, int mapsize, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglPixelMapuivBO(map, mapsize, buffer_offset); + } + private static native void nglPixelMapuivBO(int map, int mapsize, int buffer_offset); + // --------------------------- + + // --------------------------- public static void glPixelMap(int map, ShortBuffer values) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkDirect(values); nglPixelMapusv(map, values.remaining(), values, values.position()); } private static native void nglPixelMapusv(int map, int mapsize, ShortBuffer values, int values_offset); + + public static void glPixelMapusv(int map, int mapsize, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglPixelMapusvBO(map, mapsize, buffer_offset); + } + private static native void nglPixelMapusvBO(int map, int mapsize, int buffer_offset); + // --------------------------- + public static native void glPassThrough(float token); public static native void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar); + + // --------------------------- public static void glNormalPointer(int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); GLBufferChecks.ensureArrayVBOdisabled(); @@ -1179,46 +1353,66 @@ nglNormalPointer(GL_FLOAT, stride, pointer, pointer.position() << 2); } private static native void nglNormalPointer(int type, int stride, Buffer pointer, int pointer_offset); + public static void glNormalPointer(int type, int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglNormalPointerVBO(type, stride, buffer_offset); } private static native void nglNormalPointerVBO(int type, int stride, int buffer_offset); + // --------------------------- + public static native void glNormal3b(byte nx, byte ny, byte nz); public static native void glNormal3f(float nx, float ny, float nz); public static native void glNormal3i(int nx, int ny, int nz); public static native void glNewList(int list, int mode); public static native void glEndList(); + public static void glMultMatrix(FloatBuffer m) { BufferChecks.checkBuffer(m, 16); nglMultMatrixf(m, m.position()); } private static native void nglMultMatrixf(FloatBuffer m, int m_offset); + public static native void glShadeModel(int mode); + public static void glSelectBuffer(IntBuffer buffer) { BufferChecks.checkDirect(buffer); nglSelectBuffer(buffer.remaining(), buffer, buffer.position()); } private static native void nglSelectBuffer(int size, IntBuffer buffer, int buffer_offset); + public static native void glScissor(int x, int y, int width, int height); public static native void glScalef(float x, float y, float z); public static native void glRotatef(float angle, float x, float y, float z); public static native int glRenderMode(int mode); public static native void glRectf(float x1, float y1, float x2, float y2); public static native void glRecti(int x1, int y1, int x2, int y2); + + // --------------------------- public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position()); } public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 1); } public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { + GLBufferChecks.ensurePackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 2); } private static native void nglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels, int pixels_offset); + + public static void glReadPixels(int x, int y, int width, int height, int format, int type, int buffer_offset) { + GLBufferChecks.ensurePackPBOenabled(); + nglReadPixelsBO(x, y, width, height, format, type, buffer_offset); + } + private static native void nglReadPixelsBO(int x, int y, int width, int height, int format, int type, int buffer_offset); + // --------------------------- + public static native void glReadBuffer(int mode); public static native void glRasterPos2f(float x, float y); public static native void glRasterPos2i(int x, int y); @@ -1230,27 +1424,36 @@ public static native void glPopName(); public static native void glPushMatrix(); public static native void glPopMatrix(); + public static void glPushClientAttrib(int mask) { VBOTracker.getClientAttribStack().pushState(); VBOTracker.getClientAttribStack().setState(mask); if ((mask & GL_CLIENT_VERTEX_ARRAY_BIT) != 0) { VBOTracker.getVBOArrayStack().pushState(); VBOTracker.getVBOElementStack().pushState(); + VBOTracker.getPBOPackStack().pushState(); + VBOTracker.getPBOUnpackStack().pushState(); } nglPushClientAttrib(mask); } private static native void nglPushClientAttrib(int mask); + public static void glPopClientAttrib() { if ((VBOTracker.getClientAttribStack().popState() & GL_CLIENT_VERTEX_ARRAY_BIT) != 0) { VBOTracker.getVBOArrayStack().popState(); - VBOTracker.getVBOElementStack().popState(); + VBOTracker.getVBOElementStack().popState(); + VBOTracker.getPBOPackStack().popState(); + VBOTracker.getPBOUnpackStack().popState(); } nglPopClientAttrib(); } private static native void nglPopClientAttrib(); + public static native void glPushAttrib(int mask); public static native void glPopAttrib(); public static native void glStencilFunc(int func, int ref, int mask); + + // --------------------------- public static void glVertexPointer(int size, int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); GLBufferChecks.ensureArrayVBOdisabled(); @@ -1262,11 +1465,14 @@ nglVertexPointer(size, GL_INT, stride, pointer, pointer.position() << 2); } private static native void nglVertexPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); + public static void glVertexPointer(int size, int type, int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglVertexPointerVBO(size, type, stride, buffer_offset); } private static native void nglVertexPointerVBO(int size, int type, int stride, int buffer_offset); + // --------------------------- + public static native void glVertex2f(float x, float y); public static native void glVertex2i(int x, int y); public static native void glVertex3f(float x, float y, float z); @@ -1277,99 +1483,141 @@ // --------------------------- public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border)); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() : 0); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 1); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 2); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 2); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_offset); + + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglTexImage1DBO(target, level, internalformat, width, border, format, type, buffer_offset); + } + private static native void nglTexImage1DBO(int target, int level, int internalformat, int width, int border, int format, int type, int buffer_offset); // --------------------------- // --------------------------- public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border)); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() : 0); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 1); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 2); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); if ( pixels != null ) BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 2); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_offset); + + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglTexImage2DBO(target, level, internalformat, width, height, border, format, type, buffer_offset); + } + private static native void nglTexImage2DBO(int target, int level, int internalformat, int width, int height, int border, int format, int type, int buffer_offset); // --------------------------- // --------------------------- public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position()); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 1); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 1); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); } private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_offset); + + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, int buffer_offset) { + GLBufferChecks.ensureUnpackPBOenabled(); + nglTexSubImage1DBO(target, level, xoffset, width, format, type, buffer_offset); + } + private static native void nglTexSubImage1DBO(int target, int level, int xoffset, int width, int format, int type, int buffer_offset); // --------------------------- // --------------------------- public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + GLBufferChecks.ensureUnpackPBOdisabled(); BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, ... [truncated message content] |
|
From: Mark B. <cap...@us...> - 2005-01-12 12:32:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11093/src/native/common/devil Modified Files: org_lwjgl_devil_ILUT.c Log Message: Should be ASCII Index: org_lwjgl_devil_ILUT.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_ILUT.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_devil_ILUT.c 12 Jan 2005 12:30:31 -0000 1.1 +++ org_lwjgl_devil_ILUT.c 12 Jan 2005 12:32:37 -0000 1.2 @@ -1,226 +1,226 @@ -#include "extil.h" - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutRenderer - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutRenderer(JNIEnv *env, jclass clazz, jint renderer){ - return ilutRenderer((ILenum)renderer); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutDisable - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutDisable(JNIEnv *env, jclass clazz, jint mode){ - return ilutDisable((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutEnable - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutEnable(JNIEnv *env, jclass clazz, jint mode){ - return ilutEnable((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGetBoolean - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGetBoolean(JNIEnv *env, jclass clazz, jint mode){ - return ilutGetBoolean((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGetInteger - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGetInteger(JNIEnv *env, jclass clazz, jint mode){ - return ilutGetInteger((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGetString - * Signature: (I)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_org_lwjgl_devil_ILUT_ilutGetString(JNIEnv *env, jclass clazz, jint stringName){ - return NewStringNative(env, ilutGetString((ILenum)stringName)); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutInit - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutInit(JNIEnv *env, jclass clazz){ - ilutInit(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutIsDisabled - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsDisabled(JNIEnv *env, jclass clazz, jint mode){ - return ilutIsDisabled((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutIsEnabled - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsEnabled(JNIEnv *env, jclass clazz, jint mode){ - return ilutIsEnabled((ILenum)mode); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutPopAttrib - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPopAttrib(JNIEnv *env, jclass clazz){ - ilutPopAttrib(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutPushAttrib - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPushAttrib(JNIEnv *env, jclass clazz, jint bits){ - ilutPushAttrib((ILuint)bits); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutSetInteger - * Signature: (II)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutSetInteger(JNIEnv *env, jclass clazz, jint mode, jint param){ - ilutSetInteger((ILenum)mode, (ILint)param); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLBindTexImage - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindTexImage(JNIEnv *env, jclass clazz){ - return ilutGLBindTexImage(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLBindMipmaps - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindMipmaps(JNIEnv *env, jclass clazz){ - return ilutGLBindMipmaps(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLBuildMipmaps - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBuildMipmaps(JNIEnv *env, jclass clazz){ - return ilutGLBuildMipmaps(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLLoadImage - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLLoadImage(JNIEnv *env, jclass clazz, jstring fileName){ - char *strFileName = GetStringNativeChars(env, fileName); - jint result = ilutGLLoadImage((const ILstring)strFileName); - free(strFileName); - - return result; -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLScreen - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreen(JNIEnv *env, jclass clazz){ - return ilutGLScreen(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLScreenie - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreenie(JNIEnv *env, jclass clazz){ - return ilutGLScreenie(); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLSaveImage - * Signature: (Ljava/lang/String;I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSaveImage(JNIEnv *env, jclass clazz, jstring fileName, jint texID){ - char *strFileName = GetStringNativeChars(env, fileName); - jboolean result = ilutGLSaveImage((const ILstring)strFileName, texID); - free(strFileName); - - return result; -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLSetTex - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSetTex(JNIEnv *env, jclass clazz, jint texID){ - return ilutGLSetTex(texID); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: ilutGLTexImage - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLTexImage(JNIEnv *env, jclass clazz, jint level){ - return ilutGLTexImage(level); -} - -/* - * Class: org_lwjgl_devil_ILUT - * Method: nCreate - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate(JNIEnv *env, jclass clazz){ - /*if (!extilut_Open(env)) { - throwException(env, "Failed to load ILUT library"); - return; - }*/ -} - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Class: org_lwjgl_devil_ILUT - * Method: initNativeStubs - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs(JNIEnv *env, jclass clazz){ -} - -#ifdef __cplusplus -} -#endif +#include "extil.h" + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutRenderer + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutRenderer(JNIEnv *env, jclass clazz, jint renderer){ + return ilutRenderer((ILenum)renderer); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutDisable + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutDisable(JNIEnv *env, jclass clazz, jint mode){ + return ilutDisable((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutEnable + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutEnable(JNIEnv *env, jclass clazz, jint mode){ + return ilutEnable((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGetBoolean + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGetBoolean(JNIEnv *env, jclass clazz, jint mode){ + return ilutGetBoolean((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGetInteger + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGetInteger(JNIEnv *env, jclass clazz, jint mode){ + return ilutGetInteger((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGetString + * Signature: (I)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_devil_ILUT_ilutGetString(JNIEnv *env, jclass clazz, jint stringName){ + return NewStringNative(env, ilutGetString((ILenum)stringName)); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutInit + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutInit(JNIEnv *env, jclass clazz){ + ilutInit(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutIsDisabled + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsDisabled(JNIEnv *env, jclass clazz, jint mode){ + return ilutIsDisabled((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutIsEnabled + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsEnabled(JNIEnv *env, jclass clazz, jint mode){ + return ilutIsEnabled((ILenum)mode); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutPopAttrib + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPopAttrib(JNIEnv *env, jclass clazz){ + ilutPopAttrib(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutPushAttrib + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPushAttrib(JNIEnv *env, jclass clazz, jint bits){ + ilutPushAttrib((ILuint)bits); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutSetInteger + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutSetInteger(JNIEnv *env, jclass clazz, jint mode, jint param){ + ilutSetInteger((ILenum)mode, (ILint)param); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLBindTexImage + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindTexImage(JNIEnv *env, jclass clazz){ + return ilutGLBindTexImage(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLBindMipmaps + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindMipmaps(JNIEnv *env, jclass clazz){ + return ilutGLBindMipmaps(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLBuildMipmaps + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBuildMipmaps(JNIEnv *env, jclass clazz){ + return ilutGLBuildMipmaps(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLLoadImage + * Signature: (Ljava/lang/String;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLLoadImage(JNIEnv *env, jclass clazz, jstring fileName){ + char *strFileName = GetStringNativeChars(env, fileName); + jint result = ilutGLLoadImage((const ILstring)strFileName); + free(strFileName); + + return result; +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLScreen + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreen(JNIEnv *env, jclass clazz){ + return ilutGLScreen(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLScreenie + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreenie(JNIEnv *env, jclass clazz){ + return ilutGLScreenie(); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLSaveImage + * Signature: (Ljava/lang/String;I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSaveImage(JNIEnv *env, jclass clazz, jstring fileName, jint texID){ + char *strFileName = GetStringNativeChars(env, fileName); + jboolean result = ilutGLSaveImage((const ILstring)strFileName, texID); + free(strFileName); + + return result; +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLSetTex + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSetTex(JNIEnv *env, jclass clazz, jint texID){ + return ilutGLSetTex(texID); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: ilutGLTexImage + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLTexImage(JNIEnv *env, jclass clazz, jint level){ + return ilutGLTexImage(level); +} + +/* + * Class: org_lwjgl_devil_ILUT + * Method: nCreate + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate(JNIEnv *env, jclass clazz){ + /*if (!extilut_Open(env)) { + throwException(env, "Failed to load ILUT library"); + return; + }*/ +} + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Class: org_lwjgl_devil_ILUT + * Method: initNativeStubs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs(JNIEnv *env, jclass clazz){ +} + +#ifdef __cplusplus +} +#endif |
|
From: Mark B. <cap...@us...> - 2005-01-12 12:31:14
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10492/src/native/common/devil Modified Files: extil.h org_lwjgl_devil_ILU.c Added Files: org_lwjgl_devil_ILUT.c Log Message: Add files for ILUT portion of DevIL. --- NEW FILE: org_lwjgl_devil_ILUT.c --- #include "extil.h" /* * Class: org_lwjgl_devil_ILUT * Method: ilutRenderer * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutRenderer(JNIEnv *env, jclass clazz, jint renderer){ return ilutRenderer((ILenum)renderer); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutDisable * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutDisable(JNIEnv *env, jclass clazz, jint mode){ return ilutDisable((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutEnable * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutEnable(JNIEnv *env, jclass clazz, jint mode){ return ilutEnable((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGetBoolean * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGetBoolean(JNIEnv *env, jclass clazz, jint mode){ return ilutGetBoolean((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGetInteger * Signature: (I)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGetInteger(JNIEnv *env, jclass clazz, jint mode){ return ilutGetInteger((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGetString * Signature: (I)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_devil_ILUT_ilutGetString(JNIEnv *env, jclass clazz, jint stringName){ return NewStringNative(env, ilutGetString((ILenum)stringName)); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutInit * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutInit(JNIEnv *env, jclass clazz){ ilutInit(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutIsDisabled * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsDisabled(JNIEnv *env, jclass clazz, jint mode){ return ilutIsDisabled((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutIsEnabled * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutIsEnabled(JNIEnv *env, jclass clazz, jint mode){ return ilutIsEnabled((ILenum)mode); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutPopAttrib * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPopAttrib(JNIEnv *env, jclass clazz){ ilutPopAttrib(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutPushAttrib * Signature: (I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutPushAttrib(JNIEnv *env, jclass clazz, jint bits){ ilutPushAttrib((ILuint)bits); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutSetInteger * Signature: (II)V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_ilutSetInteger(JNIEnv *env, jclass clazz, jint mode, jint param){ ilutSetInteger((ILenum)mode, (ILint)param); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLBindTexImage * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindTexImage(JNIEnv *env, jclass clazz){ return ilutGLBindTexImage(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLBindMipmaps * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBindMipmaps(JNIEnv *env, jclass clazz){ return ilutGLBindMipmaps(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLBuildMipmaps * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLBuildMipmaps(JNIEnv *env, jclass clazz){ return ilutGLBuildMipmaps(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLLoadImage * Signature: (Ljava/lang/String;)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_devil_ILUT_ilutGLLoadImage(JNIEnv *env, jclass clazz, jstring fileName){ char *strFileName = GetStringNativeChars(env, fileName); jint result = ilutGLLoadImage((const ILstring)strFileName); free(strFileName); return result; } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLScreen * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreen(JNIEnv *env, jclass clazz){ return ilutGLScreen(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLScreenie * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLScreenie(JNIEnv *env, jclass clazz){ return ilutGLScreenie(); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLSaveImage * Signature: (Ljava/lang/String;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSaveImage(JNIEnv *env, jclass clazz, jstring fileName, jint texID){ char *strFileName = GetStringNativeChars(env, fileName); jboolean result = ilutGLSaveImage((const ILstring)strFileName, texID); free(strFileName); return result; } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLSetTex * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLSetTex(JNIEnv *env, jclass clazz, jint texID){ return ilutGLSetTex(texID); } /* * Class: org_lwjgl_devil_ILUT * Method: ilutGLTexImage * Signature: (I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_ILUT_ilutGLTexImage(JNIEnv *env, jclass clazz, jint level){ return ilutGLTexImage(level); } /* * Class: org_lwjgl_devil_ILUT * Method: nCreate * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_nCreate(JNIEnv *env, jclass clazz){ /*if (!extilut_Open(env)) { throwException(env, "Failed to load ILUT library"); return; }*/ } #ifdef __cplusplus extern "C" { #endif /* * Class: org_lwjgl_devil_ILUT * Method: initNativeStubs * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILUT_initNativeStubs(JNIEnv *env, jclass clazz){ } #ifdef __cplusplus } #endif Index: extil.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/extil.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- extil.h 9 Jan 2005 04:59:48 -0000 1.4 +++ extil.h 12 Jan 2005 12:30:31 -0000 1.5 @@ -4,10 +4,13 @@ #include <jni.h> #include <stdio.h> #include <string.h> +//#include <gl/gl.h> #include <IL/il.h> #include <IL/ilu.h> +#include <IL/ilut.h> #include "org_lwjgl_devil_IL.h" #include "org_lwjgl_devil_ILU.h" +#include "org_lwjgl_devil_ILUT.h" #include "common_tools.h" Index: org_lwjgl_devil_ILU.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_ILU.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_devil_ILU.c 9 Jan 2005 04:59:48 -0000 1.1 +++ org_lwjgl_devil_ILU.c 12 Jan 2005 12:30:31 -0000 1.2 @@ -183,9 +183,67 @@ /* * Class: org_lwjgl_devil_ILU * Method: iluGetImageInfo - * Signature: ([Lorg/lwjgl/devil/ILinfo;)V + * Signature: (Lorg/lwjgl/devil/ILinfo;)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluGetImageInfo(JNIEnv *env, jclass clazz, jobjectArray info) { +JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluGetImageInfo(JNIEnv *env, jclass clazz, jobject info) { + jfieldID fieldId; + ILinfo *imageInfo; + + if(info == 0) { + throwException(env, "ILinfo object must not be null."); + } + + imageInfo = (ILinfo *)malloc(sizeof(ILinfo)); + iluGetImageInfo(imageInfo); + + clazz = (*env)->GetObjectClass(env, info); + + fieldId = (*env)->GetFieldID(env, clazz, "id", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Id); + + fieldId = (*env)->GetFieldID(env, clazz, "width", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Width); + + fieldId = (*env)->GetFieldID(env, clazz, "height", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Height); + + fieldId = (*env)->GetFieldID(env, clazz, "depth", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Depth); + + fieldId = (*env)->GetFieldID(env, clazz, "bpp", "B"); + (*env)->SetByteField(env, info, fieldId, (jbyte)imageInfo->Bpp); + + fieldId = (*env)->GetFieldID(env, clazz, "sizeOfData", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->SizeOfData); + + fieldId = (*env)->GetFieldID(env, clazz, "format", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Format); + + fieldId = (*env)->GetFieldID(env, clazz, "type", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Type); + + fieldId = (*env)->GetFieldID(env, clazz, "origin", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->Origin); + + fieldId = (*env)->GetFieldID(env, clazz, "palType", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->PalType); + + fieldId = (*env)->GetFieldID(env, clazz, "palSize", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->PalSize); + + fieldId = (*env)->GetFieldID(env, clazz, "cubeFlags", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->CubeFlags); + + fieldId = (*env)->GetFieldID(env, clazz, "numNext", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumNext); + + fieldId = (*env)->GetFieldID(env, clazz, "numMips", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumMips); + + fieldId = (*env)->GetFieldID(env, clazz, "numLayers", "I"); + (*env)->SetIntField(env, info, fieldId, (jint)imageInfo->NumLayers); + + free(imageInfo); } /* @@ -298,6 +356,43 @@ * Signature: ([Lorg/lwjgl/devil/ILpointf;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_iluRegionfv(JNIEnv *env, jclass clazz, jobjectArray points, jint n) { + jfieldID fieldId; + jmethodID methodId; + jobject element; + int i; + ILpointf *pointInfo; + + if(points == 0) { + throwException(env, "ILpointf array must not be null."); + } + + pointInfo = (ILpointf *)malloc(sizeof(ILpointf) * n); + iluGetImageInfo(pointInfo, n); + + clazz = (*env)->FindClass(env, "org/lwjgl/devil/ILpointf"); + methodId = (*env)->GetMethodID(env, clazz, "<init>", "()V"); + + for(i=1;i<n;i++) { + element = (*env)->NewObject(env, clazz, methodId); + + fieldId = (*env)->GetFieldID(env, clazz, "x", "F"); + (*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->x)); + + fieldId = (*env)->GetFieldID(env, clazz, "y", "F"); + (*env)->SetFloatField(env, element, fieldId, (jfloat)((pointInfo + i)->y)); + printf("\nHere 3"); + printf("\n (pointInfo + i)->x) = %f", (pointInfo + i)->x); + printf("\n(*env)->GetFloatField(env, element, fieldId) = %f", (*env)->GetFloatField(env, element, fieldId)); + + printf("\npoints address=%p", points); + printf("\nelement address=%p", element); + printf("\ni = %d", i); + (*env)->SetObjectArrayElement(env, points, i, element); + printf("\nHere 4"); + } + printf("\nHere 5"); + + free(pointInfo); } /* @@ -395,7 +490,7 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_devil_ILU_nCreate(JNIEnv *env, jclass clazz) { /*if (!extilu_Open(env)) { - throwException(env, "Failed to load DevIL library"); + throwException(env, "Failed to load ILU library"); return; }*/ } |
|
From: Mark B. <cap...@us...> - 2005-01-12 12:31:14
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10492/platform_build/win32_ms_cmdline Modified Files: build-devil.bat Log Message: Add files for ILUT portion of DevIL. Index: build-devil.bat =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline/build-devil.bat,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- build-devil.bat 9 Jan 2005 04:59:48 -0000 1.4 +++ build-devil.bat 12 Jan 2005 12:30:32 -0000 1.5 @@ -6,7 +6,7 @@ if "%DEVILHOME%" == "" goto errordevilhome set COPTIONS=/I"%DEVILHOME%\include" /I"%PLTSDKHOME%\include" /I"%CHOME%\include" /I"%JAVA_HOME%\include" /I"%JAVA_HOME%\include\win32" /I"..\..\src\native\common" /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W0 /nologo /c /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LWJGL_EXPORTS" /D "_WINDLL" set LINKEROPTS=/link /LIBPATH:"%PLTSDKHOME%\Lib" /LIBPATH:"%CHOME%\Lib" /LIBPATH:"%DEVILHOME%\Lib" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /MACHINE:X86 /NOLOGO /DLL -set LIBS=user32.lib Gdi32.lib Advapi32.lib ILU.lib DevIL.lib +set LIBS=user32.lib Gdi32.lib Advapi32.lib DevIL.lib ILU.lib ILUT.lib for %%x in (..\..\src\native\common\devil\*.c) do cl %COPTIONS% %%x for %%x in (..\..\src\native\common\*common*.c) do cl %COPTIONS% %%x |
|
From: Mark B. <cap...@us...> - 2005-01-12 12:31:02
|
Update of /cvsroot/java-game-lib/LWJGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10492 Modified Files: .cvsignore build.xml Log Message: Add files for ILUT portion of DevIL. Index: .cvsignore =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/.cvsignore,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- .cvsignore 30 Mar 2004 17:09:28 -0000 1.3 +++ .cvsignore 12 Jan 2005 12:30:32 -0000 1.4 @@ -1 +1,4 @@ -.classpath *.class *.class~ *.java~ .nbattrs .project \ No newline at end of file +.classpath *.class *.class~ *.java~ .nbattrs .project +dist +libs +temp Index: build.xml =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/build.xml,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- build.xml 9 Jan 2005 04:59:49 -0000 1.46 +++ build.xml 12 Jan 2005 12:30:32 -0000 1.47 @@ -420,6 +420,7 @@ <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/devil" force="yes"> <class name="org.lwjgl.devil.IL"/> <class name="org.lwjgl.devil.ILU"/> + <class name="org.lwjgl.devil.ILUT"/> </javah> </target> |
|
From: Mark B. <cap...@us...> - 2005-01-12 12:30:45
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10492/src/java/org/lwjgl/devil Added Files: ILUT.java Log Message: Add files for ILUT portion of DevIL. --- NEW FILE: ILUT.java --- /* * 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. */ package org.lwjgl.devil; import org.lwjgl.LWJGLException; /** * $Id: ILUT.java,v 1.1 2005/01/12 12:30:34 captainjester Exp $ * * The DevIL ILUT API. * * @author captainjester <cap...@us...> * @version $Revision: 1.1 $ */ public class ILUT { /** Have we been created? */ protected static boolean created; public static final int ILUT_VERSION_1_6_7 = 1; public static final int ILUT_VERSION = 167; // Attribute Bits public static final int ILUT_OPENGL_BIT = 0x00000001; public static final int ILUT_ALL_ATTRIB_BITS = 0x000FFFFF; // Error Types public static final int ILUT_INVALID_ENUM = 0x0501; public static final int ILUT_OUT_OF_MEMORY = 0x0502; public static final int ILUT_INVALID_VALUE = 0x0505; public static final int ILUT_ILLEGAL_OPERATION = 0x0506; public static final int ILUT_INVALID_PARAM = 0x0509; public static final int ILUT_COULD_NOT_OPEN_FILE = 0x050A; public static final int ILUT_STACK_OVERFLOW = 0x050E; public static final int ILUT_STACK_UNDERFLOW = 0x050F; public static final int ILUT_BAD_DIMENSIONS = 0x0511; public static final int ILUT_NOT_SUPPORTED = 0x0550; // State Definitions public static final int ILUT_PALETTE_MODE = 0x0600; public static final int ILUT_OPENGL_CONV = 0x0610; public static final int ILUT_MAXTEX_WIDTH = 0x0630; public static final int ILUT_MAXTEX_HEIGHT = 0x0631; public static final int ILUT_MAXTEX_DEPTH = 0x0632; public static final int ILUT_GL_USE_S3TC = 0x0634; public static final int ILUT_GL_GEN_S3TC = 0x0635; // This new state does automatic texture target detection // if enabled. Currently, only cubemap detection is supported. // if the current image is no cubemap, the 2d texture is chosen. public static final int ILUT_GL_AUTODETECT_TEXTURE_TARGET = 0x0807; // The different rendering api's...more to be added later? public static final int ILUT_OPENGL = 0; static { System.loadLibrary("ILU"); System.loadLibrary("lwjgl-devil"); } /** * @return true if DevIL has been created */ public static boolean isCreated() { return created; } public static native void initNativeStubs() throws LWJGLException; public static native boolean ilutRenderer(int renderer); // ImageLib Utility Toolkit Functions public static native boolean ilutDisable(int mode); public static native boolean ilutEnable(int mode); public static native boolean ilutGetBoolean(int mode); // public static native void ilutGetBooleanv(int mode, ILboolean *Param); public static native int ilutGetInteger(int mode); // public static native void ilutGetIntegerv(int mode, ILint *Param); public static native String ilutGetString(int stringName); public static native void ilutInit(); public static native boolean ilutIsDisabled(int mode); public static native boolean ilutIsEnabled(int mode); public static native void ilutPopAttrib(); public static native void ilutPushAttrib(int bits); public static native void ilutSetInteger(int Mode, int param); // ImageLib Utility Toolkit's OpenGL Functions public static native int ilutGLBindTexImage(); public static native int ilutGLBindMipmaps(); public static native boolean ilutGLBuildMipmaps(); public static native int ilutGLLoadImage(String fileName); public static native boolean ilutGLScreen(); public static native boolean ilutGLScreenie(); public static native boolean ilutGLSaveImage(String fileName, int texID); public static native boolean ilutGLSetTex(int texID); public static native boolean ilutGLTexImage(int level); public static void create() throws LWJGLException { if (!created) { nCreate(); ILUT.initNativeStubs(); ILUT.ilutInit(); ilutRenderer(ILUT_OPENGL); created = true; } } public static native void nCreate(); } |
|
From: Elias N. <eli...@us...> - 2005-01-12 12:21:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8377 Modified Files: Window.h org_lwjgl_opengl_Display.c org_lwjgl_opengl_Pbuffer.c Log Message: Linux: Release context before destroying it Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 15:22:12 -0000 1.4 +++ org_lwjgl_opengl_Pbuffer.c 12 Jan 2005 12:20:53 -0000 1.5 @@ -62,6 +62,7 @@ GLXPbuffer buffer = buffer_info->buffer; GLXContext context = buffer_info->context; glXDestroyPbuffer(getDisplay(), buffer); + releaseContext(context); glXDestroyContext(getDisplay(), context); decDisplay(); } @@ -143,7 +144,7 @@ throwException(env, "Handle buffer not large enough"); return; } - GLXContext shared_context = getCurrentGLXContext(); + GLXContext shared_context = getDisplayContext(); if (shared_context_handle_buffer != NULL) { PbufferInfo *shared_buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer); shared_context = shared_buffer_info->context; Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- org_lwjgl_opengl_Display.c 11 Jan 2005 15:22:10 -0000 1.19 +++ org_lwjgl_opengl_Display.c 12 Jan 2005 12:20:52 -0000 1.20 @@ -69,7 +69,7 @@ typedef enum {FULLSCREEN_LEGACY, FULLSCREEN_NETWM, WINDOWED} window_mode; -static GLXContext context = NULL; // OpenGL rendering context +static GLXContext display_context = NULL; // OpenGL rendering context static GLXFBConfig *configs = NULL; static GLXWindow glx_window; static XVisualInfo *vis_info = NULL; @@ -101,8 +101,8 @@ return configs[0]; } -GLXContext getCurrentGLXContext(void) { - return context; +GLXContext getDisplayContext(void) { + return display_context; } int getCurrentScreen(void) { @@ -443,11 +443,20 @@ handleMessages(env); } +bool releaseContext(GLXContext context) { + if (glXGetCurrentContext() != context) + return true; + if (USEGLX13) + return glXMakeContextCurrent(getDisplay(), None, None, NULL) == True; + else + return glXMakeCurrent(getDisplay(), None, NULL) == True; +} + static bool makeCurrent(void) { if (USEGLX13) - return glXMakeContextCurrent(getDisplay(), glx_window, glx_window, context) == True; + return glXMakeContextCurrent(getDisplay(), glx_window, glx_window, display_context) == True; else - return glXMakeCurrent(getDisplay(), getCurrentWindow(), context) == True; + return glXMakeCurrent(getDisplay(), getCurrentWindow(), display_context) == True; } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nMakeCurrent @@ -472,10 +481,6 @@ return bpe; } -GLXContext getCurrentContext(void) { - return context; -} - static GLXFBConfig *chooseVisualGLX13FromBPP(JNIEnv *env, jobject pixel_format, int bpp, int drawable_type, bool double_buffer) { jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); @@ -600,8 +605,9 @@ } XFree(vis_info); vis_info = NULL; - glXDestroyContext(getDisplay(), context); - context = NULL; + releaseContext(display_context); + glXDestroyContext(getDisplay(), display_context); + display_context = NULL; } static bool initWindowGLX13(JNIEnv *env, jobject pixel_format) { @@ -610,28 +616,28 @@ throwException(env, "Could not find a matching pixel format"); return false; } - context = glXCreateNewContext(getDisplay(), configs[0], GLX_RGBA_TYPE, NULL, True); - if (context == NULL) { + display_context = glXCreateNewContext(getDisplay(), configs[0], GLX_RGBA_TYPE, NULL, True); + if (display_context == NULL) { XFree(configs); throwException(env, "Could not create a GLX context"); return false; } jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL"); - if (!allow_software_acceleration && (glXIsDirect(getDisplay(), context) == False)) { - glXDestroyContext(getDisplay(), context); + if (!allow_software_acceleration && (glXIsDirect(getDisplay(), display_context) == False)) { + glXDestroyContext(getDisplay(), display_context); XFree(configs); throwException(env, "Could not create a direct GLX context"); return false; } vis_info = glXGetVisualFromFBConfig(getDisplay(), configs[0]); if (vis_info == NULL) { - glXDestroyContext(getDisplay(), context); + glXDestroyContext(getDisplay(), display_context); XFree(configs); throwException(env, "Could not get visual from FB config"); return false; } if (!checkXError(env)) { - glXDestroyContext(getDisplay(), context); + glXDestroyContext(getDisplay(), display_context); XFree(configs); XFree(vis_info); return false; @@ -647,21 +653,21 @@ } if (isDebugEnabled()) dumpVisualInfo(env, vis_info); - context = glXCreateContext(getDisplay(), vis_info, NULL, True); - if (context == NULL) { + display_context = glXCreateContext(getDisplay(), vis_info, NULL, True); + if (display_context == NULL) { XFree(vis_info); throwException(env, "Could not create a GLX context"); return false; } jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL"); - if (!allow_software_acceleration && glXIsDirect(getDisplay(), context) == False) { - glXDestroyContext(getDisplay(), context); + if (!allow_software_acceleration && glXIsDirect(getDisplay(), display_context) == False) { + glXDestroyContext(getDisplay(), display_context); XFree(vis_info); throwException(env, "Could not create a direct GLX context"); return false; } if (!checkXError(env)) { - glXDestroyContext(getDisplay(), context); + glXDestroyContext(getDisplay(), display_context); XFree(vis_info); return false; } @@ -741,7 +747,7 @@ dumpVisualInfo(env, vis_info); if (USEGLX13) glx_window = glXCreateWindow(getDisplay(), configs[0], getCurrentWindow(), NULL); - if (!makeCurrent() || !checkXError(env)) { + if (!checkXError(env)) { glXDestroyWindow(getDisplay(), glx_window); destroyWindow(env); } Index: Window.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Window.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Window.h 11 Dec 2004 20:09:03 -0000 1.24 +++ Window.h 12 Jan 2005 12:20:52 -0000 1.25 @@ -108,11 +108,16 @@ * get the current window */ extern Window getCurrentWindow(void); + + /* + * Release the context if it is current + */ + extern bool releaseContext(GLXContext context); /* * get the current context */ - extern GLXContext getCurrentGLXContext(void); + extern GLXContext getDisplayContext(void); /* * get the current GLXFBConfig for the current context |
|
From: Elias N. <eli...@us...> - 2005-01-12 08:58:52
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv688/src/java/org/lwjgl/opengl Modified Files: GLContext.java Log Message: Added sanity check to GLContext.java Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- GLContext.java 28 Dec 2004 20:21:37 -0000 1.35 +++ GLContext.java 12 Jan 2005 08:58:41 -0000 1.36 @@ -278,6 +278,8 @@ where the numbers all have one or more digits. */ String version = GL11.glGetString(GL11.GL_VERSION); + if (version == null) + throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context."); StringTokenizer version_tokenizer = new StringTokenizer(version, ". "); String major_string = version_tokenizer.nextToken(); String minor_string = version_tokenizer.nextToken(); @@ -285,7 +287,7 @@ int majorVersion = Integer.parseInt(major_string); int minorVersion = Integer.parseInt(minor_string); - if ( majorVersion == 2 ) { + if (majorVersion == 2) { // ----------------------[ 2.X ]---------------------- addExtensionClass(exts, exts_names, "GL20", "OpenGL20"); // ----------------------[ 1.X ]---------------------- @@ -294,7 +296,7 @@ addExtensionClass(exts, exts_names, "GL13", "OpenGL13"); addExtensionClass(exts, exts_names, "GL12", "OpenGL12"); } else { - switch ( minorVersion ) { + switch (minorVersion) { case 5: addExtensionClass(exts, exts_names, "GL15", "OpenGL15"); // Intentional fall through |
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19397/src/native/linux Modified Files: Makefile org_lwjgl_input_Cursor.c org_lwjgl_input_Keyboard.c org_lwjgl_input_Mouse.c org_lwjgl_opengl_Display.c org_lwjgl_opengl_Pbuffer.c Log Message: Linux: Implemented AWT synchronization through JAWT. Needed because Xlib is not guaranteed thread safe Index: org_lwjgl_input_Keyboard.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Keyboard.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_input_Keyboard.c 14 Dec 2004 19:12:56 -0000 1.13 +++ org_lwjgl_input_Keyboard.c 11 Jan 2005 15:22:10 -0000 1.14 @@ -120,7 +120,7 @@ XSetICFocus(xic); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createKeyboard +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateKeyboard (JNIEnv * env, jobject this) { Display *disp = incDisplay(env); @@ -172,7 +172,7 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyKeyboard +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyKeyboard (JNIEnv * env, jobject this) { closeUnicodeStructs(); @@ -285,27 +285,23 @@ bufferEvent(event); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_pollKeyboard(JNIEnv * env, jobject this, jobject buffer) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nPollKeyboard(JNIEnv * env, jobject this, jobject buffer) { unsigned char *new_keyboard_buffer = (unsigned char *)(*env)->GetDirectBufferAddress(env, buffer); handleMessages(env); memcpy(new_keyboard_buffer, key_buf, KEYBOARD_SIZE*sizeof(unsigned char)); } -JNIEXPORT int JNICALL Java_org_lwjgl_opengl_LinuxDisplay_readKeyboard(JNIEnv * env, jobject this, jobject buffer, jint buffer_position) { +JNIEXPORT int JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReadKeyboard(JNIEnv * env, jobject this, jobject buffer, jint buffer_position) { handleMessages(env); jint* buffer_ptr = (jint *)(*env)->GetDirectBufferAddress(env, buffer); int buffer_size = ((*env)->GetDirectBufferCapacity(env, buffer))/sizeof(jint) - buffer_position; return copyEvents(&event_queue, buffer_ptr + buffer_position, buffer_size); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_enableTranslation(JNIEnv *env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nEnableTranslation(JNIEnv *env, jobject this) { translation_enabled = true; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_enableKeyboardBuffer(JNIEnv * env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nEnableKeyboardBuffer(JNIEnv * env, jobject this) { buffer_enabled = true; } - -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_isStateKeySet(JNIEnv *env, jobject this, jint key) { - return org_lwjgl_input_Keyboard_STATE_UNKNOWN; -} Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 13:53:11 -0000 1.3 +++ org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 15:22:12 -0000 1.4 @@ -51,7 +51,7 @@ GLXContext context; } PbufferInfo; -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getPbufferCaps +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCaps (JNIEnv *env, jobject this) { // Only support the GLX 1.3 Pbuffers and ignore the GLX_SGIX_pbuffer extension @@ -158,7 +158,7 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_makePbufferCurrent +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nMakePbufferCurrent (JNIEnv *env, jobject this, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer); @@ -169,7 +169,7 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyPbuffer +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyPbuffer (JNIEnv *env, jobject this, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer); Index: Makefile =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile 12 Nov 2004 14:32:42 -0000 1.15 +++ Makefile 11 Jan 2005 15:22:09 -0000 1.16 @@ -4,7 +4,7 @@ LINKER=gcc STRIP=strip CFLAGS_LINK=-shared -Wall -LIBS=-L/usr/X11/lib -lX11 -lXext -lXxf86vm -lpthread -Wl,-static,-lXcursor,-lXrender,-lXrandr,-call_shared +LIBS=-L/usr/X11/lib -lX11 -lXext -lXxf86vm -lpthread -L/usr/lib/jvm/java-1.4.2-sun-1.4.2.05/jre/lib/i386/ -ljawt -Wl,-static,-lXcursor,-lXrender,-lXrandr,-call_shared CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c) OBJECTS=$(subst .c,.o,$(SRC)) Index: org_lwjgl_opengl_Display.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_opengl_Display.c 6 Jan 2005 14:03:48 -0000 1.18 +++ org_lwjgl_opengl_Display.c 11 Jan 2005 15:22:10 -0000 1.19 @@ -46,6 +46,7 @@ #include <stdlib.h> #include <assert.h> #include <jni.h> +#include <jawt.h> #include "common_tools.h" #include "extgl.h" #include "extgl_glx.h" @@ -317,7 +318,7 @@ XStoreName(getDisplay(), current_win, title); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setTitle(JNIEnv * env, jobject this, jstring title_obj) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jobject this, jstring title_obj) { char * title = GetStringNativeChars(env, title_obj); setWindowTitle(title); free(title); @@ -356,7 +357,7 @@ return supported; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_reshape(JNIEnv *env, jobject this, jint x, jint y, jint width, jint height) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReshape(JNIEnv *env, jobject this, jint x, jint y, jint width, jint height) { XMoveWindow(getDisplay(), getCurrentWindow(), x, y); } @@ -436,7 +437,7 @@ return current_height; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_update +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUpdate (JNIEnv *env, jobject this) { handleMessages(env); @@ -449,7 +450,7 @@ return glXMakeCurrent(getDisplay(), getCurrentWindow(), context) == True; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_makeCurrent +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nMakeCurrent (JNIEnv *env, jobject this) { if (!makeCurrent()) @@ -667,31 +668,31 @@ return true; } -JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getAvailableDisplayModes(JNIEnv *env, jobject this) { +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes(JNIEnv *env, jobject this) { return getAvailableDisplayModes(env, getCurrentScreen()); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_switchDisplayMode(JNIEnv *env, jobject this, jobject mode) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode(JNIEnv *env, jobject this, jobject mode) { switchDisplayMode(env, mode, getCurrentScreen()); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_resetDisplayMode(JNIEnv *env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nResetDisplayMode(JNIEnv *env, jobject this) { resetDisplayMode(env, getCurrentScreen(), false); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getGammaRampLength(JNIEnv *env, jobject this) { +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength(JNIEnv *env, jobject this) { return (jint)getGammaRampLength(env, getCurrentScreen()); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setGammaRamp(JNIEnv *env, jobject this, jobject gamma_buffer) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp(JNIEnv *env, jobject this, jobject gamma_buffer) { setGammaRamp(env, gamma_buffer, getCurrentScreen()); } -JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_init(JNIEnv *env, jobject this) { +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInit(JNIEnv *env, jobject this) { return initDisplay(env, getCurrentScreen()); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateContext(JNIEnv *env, jobject this, jobject pixel_format) { Display *disp = incDisplay(env); if (disp == NULL) { return; @@ -710,12 +711,12 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyContext(JNIEnv *env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyContext(JNIEnv *env, jobject this) { destroyContext(); decDisplay(); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createWindow(JNIEnv *env, jobject this, jobject mode, jboolean fullscreen, int x, int y) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jobject this, jobject mode, jboolean fullscreen, int x, int y) { bool current_fullscreen = fullscreen == JNI_TRUE; if (current_fullscreen) { if (getCurrentDisplayModeExtension() == XRANDR && isNetWMFullscreenSupported(env)) { @@ -746,11 +747,11 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyWindow(JNIEnv *env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow(JNIEnv *env, jobject this) { destroyWindow(env); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_swapBuffers(JNIEnv * env, jobject this) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwapBuffers(JNIEnv * env, jobject this) { dirty = false; if (USEGLX13) @@ -759,31 +760,31 @@ glXSwapBuffers(getDisplay(), getCurrentWindow()); } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_isDirty +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsDirty (JNIEnv *env, jobject this) { bool result = dirty; dirty = false; return result ? JNI_TRUE : JNI_FALSE; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_isVisible +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsVisible (JNIEnv *env, jobject this) { return minimized ? JNI_FALSE : JNI_TRUE; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_isCloseRequested +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsCloseRequested (JNIEnv *env, jobject this) { bool saved = closerequested; closerequested = false; return saved; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_isActive +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsActive (JNIEnv *env, jobject this) { return focused || isLegacyFullscreen() ? JNI_TRUE : JNI_FALSE; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setVSyncEnabled +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetVSyncEnabled (JNIEnv *env, jobject this, jboolean sync) { if (extgl_Extensions.GLX_SGI_swap_control) { @@ -796,3 +797,22 @@ } } +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_lockAWT(JNIEnv *env, jobject this) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwGeneralException(env, "java/lang/RuntimeException", "GetAWT failed"); + return; + } + jawt.Lock(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_unlockAWT(JNIEnv *env, jobject this) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwGeneralException(env, "java/lang/RuntimeException", "GetAWT failed"); + return; + } + jawt.Unlock(env); +} Index: org_lwjgl_input_Mouse.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- org_lwjgl_input_Mouse.c 6 Jan 2005 14:03:48 -0000 1.29 +++ org_lwjgl_input_Mouse.c 11 Jan 2005 15:22:10 -0000 1.30 @@ -193,7 +193,7 @@ XWarpPointer(getDisplay(), None, getCurrentWindow(), 0, 0, 0, 0, center_x, center_y); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getNativeCursorCaps +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCaps (JNIEnv *env, jobject this) { int caps = 0; Display *disp = incDisplay(env); @@ -209,7 +209,7 @@ return caps; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setNativeCursor(JNIEnv *env, jobject this, jobject cursor_handle) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetNativeCursor(JNIEnv *env, jobject this, jobject cursor_handle) { if (cursor_handle != NULL) { Cursor *cursor = (Cursor *)(*env)->GetDirectBufferAddress(env, cursor_handle); current_cursor = *cursor; @@ -218,7 +218,7 @@ updateCursor(); } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getMinCursorSize +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMinCursorSize (JNIEnv *env, jobject this) { unsigned int width_return = 0; @@ -227,7 +227,7 @@ return width_return > height_return ? width_return : height_return; } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getMaxCursorSize +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMaxCursorSize (JNIEnv *env, jobject this) { unsigned int width_return = 0; @@ -236,7 +236,7 @@ return width_return > height_return ? height_return : width_return; } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getButtonCount(JNIEnv *env, jobject this) { +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetButtonCount(JNIEnv *env, jobject this) { return NUM_BUTTONS; } @@ -244,7 +244,7 @@ initEventQueue(&event_queue, EVENT_SIZE); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createMouse +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateMouse (JNIEnv * env, jobject this) { Display *disp = incDisplay(env); @@ -267,7 +267,7 @@ initEventQueue(&event_queue, EVENT_SIZE); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyMouse +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyMouse (JNIEnv * env, jobject this) { ungrabPointer(); @@ -355,7 +355,7 @@ doHandlePointerMotion(event->x_root, event->y_root, event->x, event->y); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_pollMouse(JNIEnv * env, jobject this, jobject coord_buffer_obj, jobject button_buffer_obj) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nPollMouse(JNIEnv * env, jobject this, jobject coord_buffer_obj, jobject button_buffer_obj) { int *coords = (int *)(*env)->GetDirectBufferAddress(env, coord_buffer_obj); int coords_length = (*env)->GetDirectBufferCapacity(env, coord_buffer_obj); unsigned char *buttons_buffer = (unsigned char *)(*env)->GetDirectBufferAddress(env, button_buffer_obj); @@ -382,18 +382,18 @@ buttons_buffer[i] = buttons[i]; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_enableMouseBuffer(JNIEnv *env, jobject this) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nEnableMouseBuffer(JNIEnv *env, jobject this) { buffer_enabled = true; } -JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_readMouse(JNIEnv *env, jobject this, jobject buffer, jint buffer_position) { +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReadMouse(JNIEnv *env, jobject this, jobject buffer, jint buffer_position) { jint* buffer_ptr = (jint *)(*env)->GetDirectBufferAddress(env, buffer); int buffer_size = ((*env)->GetDirectBufferCapacity(env, buffer))/sizeof(jint) - buffer_position; handleMessages(env); return copyEvents(&event_queue, buffer_ptr + buffer_position, buffer_size); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_grabMouse(JNIEnv * env, jobject this, jboolean new_grab) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabMouse(JNIEnv * env, jobject this, jboolean new_grab) { Window root_return, child_return; int root_x, root_y, win_x, win_y; unsigned int mask_return; Index: org_lwjgl_input_Cursor.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Cursor.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_input_Cursor.c 11 Nov 2004 16:58:21 -0000 1.4 +++ org_lwjgl_input_Cursor.c 11 Jan 2005 15:22:10 -0000 1.5 @@ -84,7 +84,7 @@ XcursorImagesDestroy(cursor_images); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyCursor +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyCursor (JNIEnv *env, jobject this, jobject cursor_handle_buffer) { Cursor *cursor = (Cursor *)(*env)->GetDirectBufferAddress(env, cursor_handle_buffer); |
|
From: Elias N. <eli...@us...> - 2005-01-11 15:22:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19397/src/native/common Modified Files: common_tools.c common_tools.h Log Message: Linux: Implemented AWT synchronization through JAWT. Needed because Xlib is not guaranteed thread safe Index: common_tools.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- common_tools.c 13 Dec 2004 17:16:47 -0000 1.15 +++ common_tools.c 11 Jan 2005 15:22:08 -0000 1.16 @@ -167,7 +167,7 @@ return num_events; } -static void throwGeneralException(JNIEnv * env, const char *exception_name, const char * err) { +void throwGeneralException(JNIEnv * env, const char *exception_name, const char * err) { jclass cls; if ((*env)->ExceptionCheck(env) == JNI_TRUE) Index: common_tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- common_tools.h 11 Dec 2004 19:44:53 -0000 1.32 +++ common_tools.h 11 Jan 2005 15:22:09 -0000 1.33 @@ -126,6 +126,7 @@ extern void initEventQueue(event_queue_t *event_queue, int event_size); extern int copyEvents(event_queue_t *event_queue, jint *output_event_buffer, int buffer_size); extern bool putEvent(event_queue_t *queue, jint *event); +extern void throwGeneralException(JNIEnv * env, const char *exception_name, const char * err); extern void throwException(JNIEnv *env, const char *msg); extern void throwOpenALException(JNIEnv * env, const char * err); extern void throwFMODException(JNIEnv * env, const char * err); |
|
From: Elias N. <eli...@us...> - 2005-01-11 15:22:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19397/src/java/org/lwjgl/opengl Modified Files: LinuxDisplay.java Log Message: Linux: Implemented AWT synchronization through JAWT. Needed because Xlib is not guaranteed thread safe Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- LinuxDisplay.java 11 Jan 2005 13:53:09 -0000 1.8 +++ LinuxDisplay.java 11 Jan 2005 15:22:06 -0000 1.9 @@ -43,6 +43,7 @@ import java.nio.IntBuffer; import java.io.IOException; +import org.lwjgl.input.Keyboard; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; @@ -50,12 +51,56 @@ private static final int CURSOR_HANDLE_SIZE = 8; private static final int PBUFFER_HANDLE_SIZE = 24; - public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; - public native void destroyWindow(); - public native void switchDisplayMode(DisplayMode mode) throws LWJGLException; - public native void resetDisplayMode(); - public native int getGammaRampLength(); - public native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; + /* Since Xlib is not guaranteed to be thread safe, we need a way to synchronize LWJGL + * Xlib calls with AWT Xlib calls. Fortunately, JAWT implements LockAWT and UnlockAWT(), to + * do just that. + */ + private native void lockAWT(); + private native void unlockAWT(); + + public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException { + lockAWT(); + nCreateWindow(mode, fullscreen, x, y); + unlockAWT(); + } + public native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; + + + public void destroyWindow() { + lockAWT(); + nDestroyWindow(); + unlockAWT(); + } + public native void nDestroyWindow(); + + public void switchDisplayMode(DisplayMode mode) throws LWJGLException { + lockAWT(); + nSwitchDisplayMode(mode); + unlockAWT(); + } + public native void nSwitchDisplayMode(DisplayMode mode) throws LWJGLException; + + public void resetDisplayMode() { + lockAWT(); + nResetDisplayMode(); + unlockAWT(); + } + public native void nResetDisplayMode(); + + public int getGammaRampLength() { + lockAWT(); + int length = nGetGammaRampLength(); + unlockAWT(); + return length; + } + public native int nGetGammaRampLength(); + + public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException { + lockAWT(); + nSetGammaRamp(gammaRamp); + unlockAWT(); + } + public native void nSetGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; public String getAdapter() { return null; @@ -65,66 +110,288 @@ return null; } - public native DisplayMode init(); - public native void setTitle(String title); - public native boolean isCloseRequested(); - public native boolean isVisible(); - public native boolean isActive(); - public native boolean isDirty(); - public native void swapBuffers(); - public native void makeCurrent() throws LWJGLException; - public native void createContext(PixelFormat pixel_format) throws LWJGLException; - public native void destroyContext(); - public native void update(); - public native void setVSyncEnabled(boolean sync); - public native void reshape(int x, int y, int width, int height); - public native DisplayMode[] getAvailableDisplayModes(); + public DisplayMode init() { + lockAWT(); + DisplayMode mode = nInit(); + unlockAWT(); + return mode; + } + public native DisplayMode nInit(); + + public void setTitle(String title) { + lockAWT(); + nSetTitle(title); + unlockAWT(); + } + public native void nSetTitle(String title); + + public boolean isCloseRequested() { + lockAWT(); + boolean result = nIsCloseRequested(); + unlockAWT(); + return result; + } + public native boolean nIsCloseRequested(); + + public boolean isVisible() { + lockAWT(); + boolean result = nIsVisible(); + unlockAWT(); + return result; + } + public native boolean nIsVisible(); + + public boolean isActive() { + lockAWT(); + boolean result = nIsActive(); + unlockAWT(); + return result; + } + public native boolean nIsActive(); + + public boolean isDirty() { + lockAWT(); + boolean result = nIsDirty(); + unlockAWT(); + return result; + } + public native boolean nIsDirty(); + + public void swapBuffers() { + lockAWT(); + nSwapBuffers(); + unlockAWT(); + } + public native void nSwapBuffers(); + + public void makeCurrent() throws LWJGLException { + lockAWT(); + nMakeCurrent(); + unlockAWT(); + } + public native void nMakeCurrent() throws LWJGLException; + + public void createContext(PixelFormat pixel_format) throws LWJGLException { + lockAWT(); + nCreateContext(pixel_format); + unlockAWT(); + } + public native void nCreateContext(PixelFormat pixel_format) throws LWJGLException; + + public void destroyContext() { + lockAWT(); + nDestroyContext(); + unlockAWT(); + } + public native void nDestroyContext(); + + public void update() { + lockAWT(); + nUpdate(); + unlockAWT(); + } + public native void nUpdate(); + + public void setVSyncEnabled(boolean sync) { + lockAWT(); + nSetVSyncEnabled(sync); + unlockAWT(); + } + public native void nSetVSyncEnabled(boolean sync); + + public void reshape(int x, int y, int width, int height) { + lockAWT(); + nReshape(x, y, width, height); + unlockAWT(); + } + public native void nReshape(int x, int y, int width, int height); + + public DisplayMode[] getAvailableDisplayModes() { + lockAWT(); + DisplayMode[] modes = nGetAvailableDisplayModes(); + unlockAWT(); + return modes; + } + public native DisplayMode[] nGetAvailableDisplayModes(); + /* Mouse */ public boolean hasWheel() { return true; } - public native int getButtonCount(); - public native void createMouse(); - public native void destroyMouse(); - public native void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); - public native void enableMouseBuffer() throws LWJGLException; - public native int readMouse(IntBuffer buffer, int buffer_position); - public native void grabMouse(boolean grab); - public native int getNativeCursorCaps(); - public native void setNativeCursor(Object handle) throws LWJGLException; - public native int getMinCursorSize(); - public native int getMaxCursorSize(); + public int getButtonCount() { + lockAWT(); + int num_buttons = nGetButtonCount(); + unlockAWT(); + return num_buttons; + } + public native int nGetButtonCount(); + + public void createMouse() { + lockAWT(); + nCreateMouse(); + unlockAWT(); + } + public native void nCreateMouse(); + public void destroyMouse() { + lockAWT(); + nDestroyMouse(); + unlockAWT(); + } + public native void nDestroyMouse(); + + public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) { + lockAWT(); + nPollMouse(coord_buffer, buttons); + unlockAWT(); + } + public native void nPollMouse(IntBuffer coord_buffer, ByteBuffer buttons); + + public void enableMouseBuffer() throws LWJGLException { + lockAWT(); + nEnableMouseBuffer(); + unlockAWT(); + } + public native void nEnableMouseBuffer() throws LWJGLException; + + public int readMouse(IntBuffer buffer, int buffer_position) { + lockAWT(); + int count = nReadMouse(buffer, buffer_position); + unlockAWT(); + return count; + } + public native int nReadMouse(IntBuffer buffer, int buffer_position); + + public void grabMouse(boolean grab) { + lockAWT(); + nGrabMouse(grab); + unlockAWT(); + } + public native void nGrabMouse(boolean grab); + + public int getNativeCursorCaps() { + lockAWT(); + int caps = nGetNativeCursorCaps(); + unlockAWT(); + return caps; + } + public native int nGetNativeCursorCaps(); + + public void setNativeCursor(Object handle) throws LWJGLException { + lockAWT(); + nSetNativeCursor(handle); + unlockAWT(); + } + public native void nSetNativeCursor(Object handle) throws LWJGLException; + + public int getMinCursorSize() { + lockAWT(); + int min_size = nGetMinCursorSize(); + unlockAWT(); + return min_size; + } + public native int nGetMinCursorSize(); + + public int getMaxCursorSize() { + lockAWT(); + int max_size = nGetMaxCursorSize(); + unlockAWT(); + return max_size; + } + public native int nGetMaxCursorSize(); + /* Keyboard */ - public native void createKeyboard() throws LWJGLException; - public native void destroyKeyboard(); - public native void pollKeyboard(ByteBuffer keyDownBuffer); - public native int readKeyboard(IntBuffer buffer, int buffer_position); - public native void enableTranslation() throws LWJGLException; - public native void enableKeyboardBuffer() throws LWJGLException; - public native int isStateKeySet(int key); + public void createKeyboard() throws LWJGLException { + lockAWT(); + nCreateKeyboard(); + unlockAWT(); + } + public native void nCreateKeyboard() throws LWJGLException; + + public void destroyKeyboard() { + lockAWT(); + nDestroyKeyboard(); + unlockAWT(); + } + public native void nDestroyKeyboard(); + + public void pollKeyboard(ByteBuffer keyDownBuffer) { + lockAWT(); + nPollKeyboard(keyDownBuffer); + unlockAWT(); + } + public native void nPollKeyboard(ByteBuffer keyDownBuffer); + + public int readKeyboard(IntBuffer buffer, int buffer_position) { + lockAWT(); + int count = nReadKeyboard(buffer, buffer_position); + unlockAWT(); + return count; + } + public native int nReadKeyboard(IntBuffer buffer, int buffer_position); + + public void enableTranslation() throws LWJGLException { + lockAWT(); + nEnableTranslation(); + unlockAWT(); + } + public native void nEnableTranslation() throws LWJGLException; + + public void enableKeyboardBuffer() throws LWJGLException { + lockAWT(); + nEnableKeyboardBuffer(); + unlockAWT(); + } + public native void nEnableKeyboardBuffer() throws LWJGLException; + + public int isStateKeySet(int key) { + return Keyboard.STATE_UNKNOWN; + } public native void nCreateCursor(ByteBuffer handle, int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException; public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + lockAWT(); ByteBuffer handle = BufferUtils.createByteBuffer(CURSOR_HANDLE_SIZE); nCreateCursor(handle, width, height, xHotspot, yHotspot, numImages, images, images.position(), delays, delays != null ? delays.position() : -1); + unlockAWT(); return handle; } - public native void destroyCursor(Object cursorHandle); - public native int getPbufferCaps(); + public void destroyCursor(Object cursorHandle) { + lockAWT(); + nDestroyCursor(cursorHandle); + unlockAWT(); + } + public native void nDestroyCursor(Object cursorHandle); + + public int getPbufferCaps() { + lockAWT(); + int caps = nGetPbufferCaps(); + unlockAWT(); + return caps; + } + public native int nGetPbufferCaps(); + public boolean isBufferLost(ByteBuffer handle) { return false; } - public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; + public void makePbufferCurrent(ByteBuffer handle) throws LWJGLException { + lockAWT(); + nMakePbufferCurrent(handle); + unlockAWT(); + } + + public native void nMakePbufferCurrent(ByteBuffer handle) throws LWJGLException; public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException { + lockAWT(); ByteBuffer handle = BufferUtils.createByteBuffer(PBUFFER_HANDLE_SIZE); nCreatePbuffer(handle, width, height, pixel_format, pixelFormatCaps, pBufferAttribs, shared_pbuffer_handle); + unlockAWT(); return handle; } @@ -132,7 +399,12 @@ IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException; - public native void destroyPbuffer(ByteBuffer handle); + public void destroyPbuffer(ByteBuffer handle) { + lockAWT(); + nDestroyPbuffer(handle); + unlockAWT(); + } + public native void nDestroyPbuffer(ByteBuffer handle); public void setPbufferAttrib(ByteBuffer handle, int attrib, int value) { throw new UnsupportedOperationException(); |
|
From: Elias N. <eli...@us...> - 2005-01-11 14:05:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1100/src/native/win32 Modified Files: org_lwjgl_opengl_Pbuffer.c Log Message: Win32: Compile fixes Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 13:53:12 -0000 1.2 +++ org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 14:05:14 -0000 1.3 @@ -198,7 +198,7 @@ return buffer_lost ? JNI_TRUE : JNI_FALSE; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_makePbufferCurrent +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_makePbufferCurrent (JNIEnv *env, jobject self, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); @@ -207,7 +207,7 @@ throwException(env, "Could not make pbuffer context current"); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_destroyPbuffer +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_destroyPbuffer (JNIEnv *env, jobject self, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); @@ -216,7 +216,7 @@ wglDestroyPbufferARB(Pbuffer_info->Pbuffer); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_setPbufferAttrib +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_setPbufferAttrib (JNIEnv *env, jobject self, jobject buffer_handle, jint attrib, jint value) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); |
|
From: Elias N. <eli...@us...> - 2005-01-11 14:04:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv819 Modified Files: org_lwjgl_opengl_Pbuffer.m Log Message: macosx compile fix Index: org_lwjgl_opengl_Pbuffer.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Pbuffer.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Pbuffer.m 11 Jan 2005 13:53:12 -0000 1.2 +++ org_lwjgl_opengl_Pbuffer.m 11 Jan 2005 14:03:50 -0000 1.3 @@ -75,7 +75,7 @@ [pool release]; } -static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, NSOpenGLContext shared_context) { +static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, NSOpenGLContext *shared_context) { if (!checkCapacity(env, pbuffer_handle)) return; NSOpenGLPixelBuffer *pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height]; @@ -87,8 +87,8 @@ if (context == nil) return; int screen; - if (display_context != NULL) - screen = [display_context currentVirtualScreen]; + if (getDisplayContext() != NULL) + screen = [getDisplayContext() currentVirtualScreen]; else screen = 0; [context setPixelBuffer:pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:screen]; @@ -99,7 +99,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreatePbuffer(JNIEnv *env, jobject this, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSOpenGLContext shared_context = getDisplayContext(); + NSOpenGLContext *shared_context = getDisplayContext(); if (shared_context_handle_buffer != NULL) { PbufferInfo *pbuffer_handle_ptr = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer); shared_context = pbuffer_handle_ptr->context; |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:51
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/java/org/lwjgl/opengl Modified Files: DisplayImplementation.java LinuxDisplay.java MacOSXDisplay.java Pbuffer.java Win32Display.java Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Win32Display.java 25 Nov 2004 22:31:38 -0000 1.6 +++ Win32Display.java 11 Jan 2005 13:53:09 -0000 1.7 @@ -47,6 +47,7 @@ final class Win32Display implements DisplayImplementation { private static final int CURSOR_HANDLE_SIZE = 8; + private static final int PBUFFER_HANDLE_SIZE = 24; public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; public native void destroyWindow(); @@ -104,6 +105,27 @@ public native void destroyCursor(Object cursorHandle); public native int getPbufferCaps(); + public native boolean isBufferLost(ByteBuffer handle); + public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; + + public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException { + ByteBuffer handle = BufferUtils.createByteBuffer(PBUFFER_HANDLE_SIZE); + nCreatePbuffer(handle, width, height, pixel_format, pixelFormatCaps, pBufferAttribs, shared_pbuffer_handle); + return handle; + } + + private native void nCreatePbuffer(ByteBuffer handle, int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException; + + public native void destroyPbuffer(ByteBuffer handle); + + public native void setPbufferAttrib(ByteBuffer handle, int attrib, int value); + public native void bindTexImageToPbuffer(ByteBuffer handle, int buffer); + public native void releaseTexImageFromPbuffer(ByteBuffer handle, int buffer); + public boolean openURL(String url) { nOpenURL(url); return true; Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Pbuffer.java 18 Nov 2004 12:10:27 -0000 1.32 +++ Pbuffer.java 11 Jan 2005 13:53:09 -0000 1.33 @@ -137,11 +137,6 @@ public static final int DEPTH_BUFFER = RenderTexture.WGL_DEPTH_COMPONENT_NV; /** - * The maximum number of bytes in the native handle - */ - private static final int HANDLE_SIZE = 24; - - /** * Handle to the native GL rendering context */ private final ByteBuffer handle; @@ -163,38 +158,38 @@ /** * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. * <p/> - * NOTE: The Pbuffer will have its own context that shares display lists and textures with the Display context (if it is created), - * but it will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. - * <p/> - * This kind of Pbuffer is primarily intended for non interactive use, since the makeCurrent context switch will be more expensive - * than a Pbuffer using the Display context. + * NOTE: The Pbuffer will have its own context that shares display lists and textures with <code>shared_context</code>, + * or, if <code>shared_context</code> is <code>null</code>, the Display context if it is created. The Pbuffer + * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. * <p/> * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, * render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that * it is supported. + * <p/> * * @param width Pbuffer width * @param height Pbuffer height * @param pixel_format Minimum Pbuffer context properties * @param renderTexture + * @param shared_context If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share + * with the Display context (if created). */ - public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture) throws LWJGLException { + public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Pbuffer shared_context) throws LWJGLException { this.width = width; this.height = height; - this.handle = createPbuffer(width, height, pixel_format, renderTexture); + this.handle = createPbuffer(width, height, pixel_format, renderTexture, shared_context != null ? shared_context.handle : null); } - private static ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture) throws LWJGLException { + private static ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, ByteBuffer shared_context_handle) throws LWJGLException { GLContext.loadOpenGLLibrary(); try { - ByteBuffer handle = BufferUtils.createByteBuffer(HANDLE_SIZE); if ( renderTexture == null ) - nCreate(handle, width, height, pixel_format, null, null); + return Display.getImplementation().createPbuffer(width, height, pixel_format, null, null, shared_context_handle); else - nCreate(handle, width, height, pixel_format, + return Display.getImplementation().createPbuffer(width, height, pixel_format, renderTexture.pixelFormatCaps, - renderTexture.pBufferAttribs); - return handle; + renderTexture.pBufferAttribs, + shared_context_handle); } catch (LWJGLException e) { GLContext.unloadOpenGLLibrary(); throw e; @@ -209,29 +204,19 @@ * @return true if the buffer is lost and destroyed, false if the buffer is valid. */ public boolean isBufferLost() { - return nIsBufferLost(handle); + return Display.getImplementation().isBufferLost(handle); } /** - * Native method to test for buffer integrity - */ - private static native boolean nIsBufferLost(ByteBuffer handle); - - /** * Method to make the Pbuffer context current. All subsequent OpenGL calls will go to this buffer. * @throws LWJGLException if the context could not be made current */ public void makeCurrent() throws LWJGLException { - nMakeCurrent(handle); + Display.getImplementation().makePbufferCurrent(handle); GLContext.useContext(this); } /** - * Native method to make a pbuffer current. - */ - private static native void nMakeCurrent(ByteBuffer handle) throws LWJGLException; - - /** * Gets the Pbuffer capabilities. * * @return a bitmask of Pbuffer capabilities. @@ -241,13 +226,6 @@ } /** - * Native method to create a Pbuffer - */ - private static native void nCreate(ByteBuffer handle, int width, int height, PixelFormat pixel_format, - IntBuffer pixelFormatCaps, - IntBuffer pBufferAttribs) throws LWJGLException; - - /** * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was * the current rendering context or not. */ @@ -255,7 +233,7 @@ try { makeCurrent(); int error = GL11.glGetError(); - nDestroy(handle); + Display.getImplementation().destroyPbuffer(handle); GLContext.useContext(null); GLContext.unloadOpenGLLibrary(); if (error != GL11.GL_NO_ERROR) @@ -265,11 +243,6 @@ } } - /** - * Natively destroy any GL-related stuff - */ - private static native void nDestroy(ByteBuffer handle); - // ----------------------------------------------------------------------------------------- // ------------------------------- Render-to-Texture Methods ------------------------------- // ----------------------------------------------------------------------------------------- @@ -287,11 +260,9 @@ * @param value */ public void setAttrib(int attrib, int value) { - nSetAttrib(handle, attrib, value); + Display.getImplementation().setPbufferAttrib(handle, attrib, value); } - private static native void nSetAttrib(ByteBuffer handle, int attrib, int value); - /** * Binds the currently bound texture to the buffer specified. The buffer can be one of the following: * <p/> @@ -300,22 +271,18 @@ * @param buffer */ public void bindTexImage(int buffer) { - nBindTexImage(handle, buffer); + Display.getImplementation().bindTexImageToPbuffer(handle, buffer); } - private static native void nBindTexImage(ByteBuffer handle, int buffer); - /** * Releases the currently bound texture from the buffer specified. * * @param buffer */ public void releaseTexImage(int buffer) { - nReleaseTexImage(handle, buffer); + Display.getImplementation().releaseTexImageFromPbuffer(handle, buffer); } - private static native void nReleaseTexImage(ByteBuffer handle, int buffer); - /** * @return Returns the height. */ Index: DisplayImplementation.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- DisplayImplementation.java 25 Nov 2004 22:31:38 -0000 1.5 +++ DisplayImplementation.java 11 Jan 2005 13:53:09 -0000 1.6 @@ -233,8 +233,36 @@ void destroyCursor(Object cursor_handle); - /* Pbuffer caps */ + /* Pbuffer */ int getPbufferCaps(); + /** + * Method to test for buffer integrity + */ + public boolean isBufferLost(ByteBuffer handle); + + /** + * Method to make a pbuffer current. + */ + public void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; + + /** + * Method to create a Pbuffer + */ + public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException; + + /** + * Destroy pbuffer + */ + public void destroyPbuffer(ByteBuffer handle); + + public void setPbufferAttrib(ByteBuffer handle, int attrib, int value); + + public void bindTexImageToPbuffer(ByteBuffer handle, int buffer); + + public void releaseTexImageFromPbuffer(ByteBuffer handle, int buffer); + boolean openURL(String url); } Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- MacOSXDisplay.java 25 Nov 2004 22:31:38 -0000 1.15 +++ MacOSXDisplay.java 11 Jan 2005 13:53:09 -0000 1.16 @@ -55,9 +55,11 @@ import java.util.List; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferUtils; import org.lwjgl.input.Keyboard; final class MacOSXDisplay implements DisplayImplementation { + private static final int PBUFFER_HANDLE_SIZE = 24; private static final int GAMMA_LENGTH = 256; private MacOSXFrame frame; @@ -426,4 +428,36 @@ return null; } } + + public boolean isBufferLost(ByteBuffer handle) { + return false; + } + + public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; + + public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException { + ByteBuffer handle = BufferUtils.createByteBuffer(PBUFFER_HANDLE_SIZE); + nCreatePbuffer(handle, width, height, pixel_format, pixelFormatCaps, pBufferAttribs, shared_pbuffer_handle); + return handle; + } + + private native void nCreatePbuffer(ByteBuffer handle, int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException; + + public native void destroyPbuffer(ByteBuffer handle); + + public void setPbufferAttrib(ByteBuffer handle, int attrib, int value) { + throw new UnsupportedOperationException(); + } + + public void bindTexImageToPbuffer(ByteBuffer handle, int buffer) { + throw new UnsupportedOperationException(); + } + + public void releaseTexImageFromPbuffer(ByteBuffer handle, int buffer) { + throw new UnsupportedOperationException(); + } } Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- LinuxDisplay.java 6 Jan 2005 14:03:39 -0000 1.7 +++ LinuxDisplay.java 11 Jan 2005 13:53:09 -0000 1.8 @@ -48,6 +48,7 @@ final class LinuxDisplay implements DisplayImplementation { private static final int CURSOR_HANDLE_SIZE = 8; + private static final int PBUFFER_HANDLE_SIZE = 24; public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; public native void destroyWindow(); @@ -113,6 +114,37 @@ public native void destroyCursor(Object cursorHandle); public native int getPbufferCaps(); + public boolean isBufferLost(ByteBuffer handle) { + return false; + } + + public native void makePbufferCurrent(ByteBuffer handle) throws LWJGLException; + + public ByteBuffer createPbuffer(int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException { + ByteBuffer handle = BufferUtils.createByteBuffer(PBUFFER_HANDLE_SIZE); + nCreatePbuffer(handle, width, height, pixel_format, pixelFormatCaps, pBufferAttribs, shared_pbuffer_handle); + return handle; + } + + private native void nCreatePbuffer(ByteBuffer handle, int width, int height, PixelFormat pixel_format, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs, ByteBuffer shared_pbuffer_handle) throws LWJGLException; + + public native void destroyPbuffer(ByteBuffer handle); + + public void setPbufferAttrib(ByteBuffer handle, int attrib, int value) { + throw new UnsupportedOperationException(); + } + + public void bindTexImageToPbuffer(ByteBuffer handle, int buffer) { + throw new UnsupportedOperationException(); + } + + public void releaseTexImageFromPbuffer(ByteBuffer handle, int buffer) { + throw new UnsupportedOperationException(); + } public boolean openURL(String url) { // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/java/org/lwjgl/test/opengl Modified Files: PbufferTest.java Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: PbufferTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/PbufferTest.java,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- PbufferTest.java 2 Aug 2004 14:32:51 -0000 1.39 +++ PbufferTest.java 11 Jan 2005 13:53:10 -0000 1.40 @@ -96,7 +96,7 @@ private void initialize() { try { //find displaymode - pbuffer = new Pbuffer(512, 512, new PixelFormat(), null); + pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null); mode = findDisplayMode(800, 600, 16); Display.setDisplayMode(mode); // start of in windowed mode @@ -176,7 +176,7 @@ System.out.println("Buffer contents lost - will recreate the buffer"); pbuffer.destroy(); try { - pbuffer = new Pbuffer(512, 512, new PixelFormat(), null); + pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null); initPbuffer(); } catch (LWJGLException e) { e.printStackTrace(); |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/native/win32 Modified Files: org_lwjgl_opengl_Pbuffer.c Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_Pbuffer.c 9 Dec 2004 15:36:13 -0000 1.1 +++ org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 13:53:12 -0000 1.2 @@ -125,13 +125,13 @@ return Pbuffer; } -static HGLRC createPbufferContext(JNIEnv *env, HDC Pbuffer_dc) { +static HGLRC createPbufferContext(JNIEnv *env, HDC Pbuffer_dc, HGLRC shared_context) { HGLRC Pbuffer_context = wglCreateContext(Pbuffer_dc); if (Pbuffer_context == NULL) { throwException(env, "Failed to create Pbuffer rendering context"); return NULL; } - if (getCurrentContext() != NULL && !wglShareLists(getCurrentContext(), Pbuffer_context)) { + if (getCurrentContext() != NULL && !wglShareLists(shared_context, Pbuffer_context)) { wglDeleteContext(Pbuffer_context); throwException(env, "Could not share buffer context."); return NULL; @@ -139,15 +139,16 @@ return Pbuffer_context; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate - (JNIEnv *env, jclass clazz, jobject buffer_handle, +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_nCreatePbuffer + (JNIEnv *env, jobject self, jobject buffer_handle, jint width, jint height, jobject pixel_format, - jobject pixelFormatCaps, jobject pBufferAttribs) + jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) { HPBUFFERARB Pbuffer; const int *pBufferAttribs_ptr; HDC Pbuffer_dc; HGLRC Pbuffer_context; + HGLRC shared_context; PbufferInfo *Pbuffer_info; if ((*env)->GetDirectBufferCapacity(env, buffer_handle) < sizeof(PbufferInfo)) { throwException(env, "Buffer handle not large enough"); @@ -171,7 +172,12 @@ throwException(env, "Could not get Pbuffer dc."); return; } - Pbuffer_context = createPbufferContext(env, Pbuffer_dc); + shared_context = getCurrentContext(); + if (shared_context_handle_buffer != NULL) { + Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); + shared_context = Pbuffer_info->Pbuffer_context; + } + Pbuffer_context = createPbufferContext(env, Pbuffer_dc, shared_context); if (Pbuffer_context == NULL) { wglReleasePbufferDCARB(Pbuffer, Pbuffer_dc); wglDestroyPbufferARB(Pbuffer); @@ -183,8 +189,8 @@ Pbuffer_info->Pbuffer_dc = Pbuffer_dc; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost - (JNIEnv *env, jclass clazz, jobject buffer_handle) +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Win32Display_isBufferLost + (JNIEnv *env, jobject self, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); BOOL buffer_lost; @@ -192,8 +198,8 @@ return buffer_lost ? JNI_TRUE : JNI_FALSE; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nMakeCurrent - (JNIEnv *env, jclass clazz, jobject buffer_handle) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_makePbufferCurrent + (JNIEnv *env, jobject self, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); // PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; @@ -201,8 +207,8 @@ throwException(env, "Could not make pbuffer context current"); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nDestroy - (JNIEnv *env, jclass clazz, jobject buffer_handle) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_destroyPbuffer + (JNIEnv *env, jobject self, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); wglDeleteContext(Pbuffer_info->Pbuffer_context); @@ -210,8 +216,8 @@ wglDestroyPbufferARB(Pbuffer_info->Pbuffer); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nSetAttrib - (JNIEnv *env, jclass clazz, jobject buffer_handle, jint attrib, jint value) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_setPbufferAttrib + (JNIEnv *env, jobject self, jobject buffer_handle, jint attrib, jint value) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); @@ -224,15 +230,15 @@ wglSetPbufferAttribARB(Pbuffer_info->Pbuffer, attribs); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nBindTexImage - (JNIEnv *env, jclass clazz, jobject buffer_handle, jint buffer) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_bindTexImageToPbuffer + (JNIEnv *env, jobject self, jobject buffer_handle, jint buffer) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); wglBindTexImageARB(Pbuffer_info->Pbuffer, buffer); } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nReleaseTexImage - (JNIEnv *env, jclass clazz, jobject buffer_handle, jint buffer) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_releaseTexImageFromPbuffer + (JNIEnv *env, jobject self, jobject buffer_handle, jint buffer) { PbufferInfo *Pbuffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, buffer_handle); wglReleaseTexImageARB(Pbuffer_info->Pbuffer, buffer); |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/native/macosx Modified Files: org_lwjgl_opengl_Pbuffer.m Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: org_lwjgl_opengl_Pbuffer.m =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_opengl_Pbuffer.m,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_Pbuffer.m 18 Nov 2004 12:10:28 -0000 1.1 +++ org_lwjgl_opengl_Pbuffer.m 11 Jan 2005 13:53:12 -0000 1.2 @@ -41,6 +41,7 @@ #import <jni.h> #import <OpenGL/gl.h> +#import "org_lwjgl_opengl_MacOSXDisplay.h" #import "org_lwjgl_opengl_Pbuffer.h" #import "display.h" @@ -65,11 +66,7 @@ return NULL; } -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { - return JNI_FALSE; -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nMakeCurrent(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_makePbufferCurrent(JNIEnv *env, jobject this, jobject pbuffer_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; PbufferInfo *pbuffer_handle_ptr = getPbufferInfoFromBuffer(env, pbuffer_handle); if (pbuffer_handle_ptr == NULL) @@ -78,7 +75,7 @@ [pool release]; } -static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format) { +static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, NSOpenGLContext shared_context) { if (!checkCapacity(env, pbuffer_handle)) return; NSOpenGLPixelBuffer *pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height]; @@ -86,8 +83,7 @@ throwException(env, "Could not allocate Pbuffer"); return; } - NSOpenGLContext *display_context = getDisplayContext(); - NSOpenGLContext *context = createContext(env, pixel_format, false, false, NSOpenGLPFAPixelBuffer, display_context); + NSOpenGLContext *context = createContext(env, pixel_format, false, false, NSOpenGLPFAPixelBuffer, shared_context); if (context == nil) return; int screen; @@ -101,13 +97,18 @@ pbuffer_handle_ptr->context = context; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate(JNIEnv *env, jclass clazz, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreatePbuffer(JNIEnv *env, jobject this, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - createPbuffer(env, pbuffer_handle, width, height, pixel_format); + NSOpenGLContext shared_context = getDisplayContext(); + if (shared_context_handle_buffer != NULL) { + PbufferInfo *pbuffer_handle_ptr = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer); + shared_context = pbuffer_handle_ptr->context; + } + createPbuffer(env, pbuffer_handle, width, height, pixel_format, shared_context); [pool release]; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nDestroy(JNIEnv *env, jclass clazz, jobject pbuffer_handle) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_destroyPbuffer(JNIEnv *env, jobject this, jobject pbuffer_handle) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; PbufferInfo *pbuffer_handle_ptr = getPbufferInfoFromBuffer(env, pbuffer_handle); if (pbuffer_handle_ptr == NULL) |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/native/linux Modified Files: org_lwjgl_opengl_Pbuffer.c Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: org_lwjgl_opengl_Pbuffer.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_Pbuffer.c 18 Nov 2004 12:10:27 -0000 1.2 +++ org_lwjgl_opengl_Pbuffer.c 11 Jan 2005 13:53:11 -0000 1.3 @@ -51,13 +51,6 @@ GLXContext context; } PbufferInfo; -JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost - (JNIEnv *env, jclass clazz, jobject handle_buffer) -{ - // The buffer is never lost, because of the GLX_PRESERVED_CONTENTS flag - return JNI_FALSE; -} - JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getPbufferCaps (JNIEnv *env, jobject this) { @@ -96,7 +89,7 @@ return true; } -static bool createPbufferUsingUniqueContext(JNIEnv *env, PbufferInfo *pbuffer_info, jobject pixel_format, int width, int height, const int *buffer_attribs) { +static bool createPbufferUsingUniqueContext(JNIEnv *env, PbufferInfo *pbuffer_info, jobject pixel_format, int width, int height, const int *buffer_attribs, GLXContext shared_context) { GLXFBConfig *configs = chooseVisualGLX13(env, pixel_format, false, GLX_PBUFFER_BIT, false); if (configs == NULL) { throwException(env, "No matching pixel format"); @@ -106,7 +99,7 @@ XFree(configs); return false; } - GLXContext context = glXCreateNewContext(getDisplay(), configs[0], GLX_RGBA_TYPE, getCurrentGLXContext(), True); + GLXContext context = glXCreateNewContext(getDisplay(), configs[0], GLX_RGBA_TYPE, shared_context, True); if (context == NULL) { XFree(configs); throwException(env, "Could not create a GLX context"); @@ -126,7 +119,7 @@ return true; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate(JNIEnv *env, jclass clazz, jobject handle_buffer, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreatePbuffer(JNIEnv *env, jobject this, jobject handle_buffer, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) { Display *disp = incDisplay(env); if (disp == NULL) { @@ -150,9 +143,14 @@ throwException(env, "Handle buffer not large enough"); return; } + GLXContext shared_context = getCurrentGLXContext(); + if (shared_context_handle_buffer != NULL) { + PbufferInfo *shared_buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer); + shared_context = shared_buffer_info->context; + } PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer); bool result; - result = createPbufferUsingUniqueContext(env, buffer_info, pixel_format, width, height, buffer_attribs); + result = createPbufferUsingUniqueContext(env, buffer_info, pixel_format, width, height, buffer_attribs, shared_context); if (!result || !checkXError(env)) { decDisplay(); destroyPbuffer(buffer_info); @@ -160,8 +158,8 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nMakeCurrent - (JNIEnv *env, jclass clazz, jobject handle_buffer) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_makePbufferCurrent + (JNIEnv *env, jobject this, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer); GLXPbuffer buffer = buffer_info->buffer; @@ -171,27 +169,9 @@ } } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nDestroy - (JNIEnv *env, jclass clazz, jobject handle_buffer) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_destroyPbuffer + (JNIEnv *env, jobject this, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, handle_buffer); destroyPbuffer(buffer_info); } - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nSetAttrib - (JNIEnv *env, jclass clazz, jobject handle_buffer, jint attrib, jint value) -{ - throwException(env, "The render-to-texture extension is not supported."); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nBindTexImage - (JNIEnv *env, jclass clazz, jobject handle_buffer, jint buffer) -{ - throwException(env, "The render-to-texture extension is not supported."); -} - -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nReleaseTexImage - (JNIEnv *env, jclass clazz, jobject handle_buffer, jint buffer) -{ - throwException(env, "The render-to-texture extension is not supported."); -} |
|
From: Elias N. <eli...@us...> - 2005-01-11 13:53:21
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31429/src/java/org/lwjgl/test/opengl/pbuffers Modified Files: UniqueRenderer.java UniqueRendererRTT.java Log Message: Added a Pbuffer argument to the Pbuffer constructor to enable sharing between pbuffers when the display is not created. Moved Pbuffer native methods into DisplayImplementation. Index: UniqueRenderer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRenderer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- UniqueRenderer.java 5 Sep 2004 08:38:53 -0000 1.2 +++ UniqueRenderer.java 11 Jan 2005 13:53:11 -0000 1.3 @@ -47,7 +47,7 @@ Pbuffer pbuffer = null; try { - pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), null); + pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), null, null); // Initialise state of the pbuffer context. pbuffer.makeCurrent(); Index: UniqueRendererRTT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- UniqueRendererRTT.java 5 Sep 2004 08:38:53 -0000 1.3 +++ UniqueRendererRTT.java 11 Jan 2005 13:53:11 -0000 1.4 @@ -46,7 +46,7 @@ try { final RenderTexture rt = new RenderTexture(true, false, false, false, RenderTexture.RENDER_TEXTURE_2D, 0); - pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), rt); + pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), rt, null); // Initialise state of the pbuffer context. pbuffer.makeCurrent(); |
|
From: Brian M. <ma...@us...> - 2005-01-10 19:04:29
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28096 Modified Files: projects.php Log Message: added puppytron Index: projects.php =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/www/projects.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- projects.php 17 Dec 2004 17:28:49 -0000 1.5 +++ projects.php 10 Jan 2005 19:04:09 -0000 1.6 @@ -78,6 +78,17 @@ 2 => array('small' => 'gravitybattle_small_3.jpg', 'big' => 'gravitybattle_3.jpg'))); +$projects[] = array('name' => 'Puppytron', + 'url' => 'http://www.puppygames.net/', + 'type' => 'Freeware game', + 'desc' => 'Intense shoot-em-up with 100% pure frenzied gameplay. Play for the glory. Only hiscores matter. Play it <a href="http://puppygames.net/applets/puppytron.jnlp">here</a>', + 'screens' => array(0 => array('small' => 'puppytron_small_1.jpg', + 'big' => 'puppytron_1.jpg'), + 1 => array('small' => 'puppytron_small_2.jpg', + 'big' => 'puppytron_2.jpg'), + 2 => array('small' => 'puppytron_small_3.jpg', + 'big' => 'puppytron_3.jpg'))); + function displayProjects() { GLOBAL $projects; |