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
(5) |
2
(5) |
3
(1) |
4
(1) |
5
(5) |
6
|
|
7
(22) |
8
(2) |
9
(10) |
10
(5) |
11
(5) |
12
(1) |
13
|
|
14
|
15
(2) |
16
|
17
|
18
(2) |
19
|
20
|
|
21
(13) |
22
(4) |
23
(3) |
24
(14) |
25
(6) |
26
(26) |
27
(26) |
|
28
(2) |
29
(13) |
30
(17) |
31
(2) |
|
|
|
|
From: Elias N. <eli...@us...> - 2004-03-29 19:20:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25376/src/java/org/lwjgl/opengl Modified Files: BufferChecks.java Log Message: Add error message to the buffer overflow exception Index: BufferChecks.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BufferChecks.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- BufferChecks.java 18 Feb 2004 22:31:00 -0000 1.7 +++ BufferChecks.java 29 Mar 2004 19:09:10 -0000 1.8 @@ -66,7 +66,7 @@ */ static void checkBuffer(Buffer buf, int size) { if (buf.remaining() < size) { - throw new BufferOverflowException(); + throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size); } } /** |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:07:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30361 Modified Files: Makefile.am Added Files: org_lwjgl_opengl_EXTDepthBoundsTest.cpp Log Message: New extensions and static import modifications --- NEW FILE: org_lwjgl_opengl_EXTDepthBoundsTest.cpp --- /* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTDepthBoundsTest // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glDepthBoundsEXTPROC) (GLclampd zmin, GLclampd zmax); static glDepthBoundsEXTPROC glDepthBoundsEXT; /* * Class: org.lwjgl.opengl.EXTDepthBoundsTest * Method: glDepthBoundsEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT (JNIEnv * env, jclass clazz, jfloat zmin, jfloat zmax) { glDepthBoundsEXT(zmin, zmax); } void extgl_InitEXTDepthBoundsTest(JNIEnv *env, jobject ext_set) { JavaMethodAndExtFunction functions[] = { {"glDepthBoundsEXT", "(FF)V", (void*)&Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT, "glDepthBoundsEXT", (void**)&glDepthBoundsEXT} }; int num_functions = NUMFUNCTIONS(functions); jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/EXTDepthBoundsTest"); if (extgl_Extensions.GL_EXT_depth_bounds_test) extgl_InitializeClass(env, clazz, ext_set, "GL_EXT_depth_bounds_test", num_functions, functions); } Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/ext/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 8 Feb 2004 20:30:29 -0000 1.2 +++ Makefile.am 29 Mar 2004 16:55:26 -0000 1.3 @@ -4,6 +4,7 @@ INCLUDES=-I.. SRC=org_lwjgl_opengl_EXTBlendFuncSeparate.cpp \ org_lwjgl_opengl_EXTCompiledVertexArray.cpp \ + org_lwjgl_opengl_EXTDepthBoundsTest.cpp \ org_lwjgl_opengl_EXTDrawRangeElements.cpp \ org_lwjgl_opengl_EXTFogCoord.cpp \ org_lwjgl_opengl_EXTMultiDrawArrays.cpp \ |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:03:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/nv In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29576 Modified Files: org_lwjgl_opengl_NVFragmentProgram.cpp Log Message: New extensions and static import modifications Index: org_lwjgl_opengl_NVFragmentProgram.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/nv/org_lwjgl_opengl_NVFragmentProgram.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_opengl_NVFragmentProgram.cpp 9 Mar 2004 09:25:10 -0000 1.5 +++ org_lwjgl_opengl_NVFragmentProgram.cpp 29 Mar 2004 16:51:57 -0000 1.6 @@ -1,110 +1,78 @@ -/* -* Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// ---------------------------------- -// IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFragmentProgram -// ---------------------------------- - -#include "extgl.h" - - -typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * glProgramLocalParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRY * glGetProgramLocalParameterfvARBPROC) (GLenum target, GLuint index, GLfloat *params); - -static glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; -static glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB; -static glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; -static glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB; - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglProgramNamedParameter4fNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV - (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jfloat x, jfloat y, jfloat z, jfloat w) -{ - GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; - glProgramNamedParameter4fNV(id, length, name_ptr, x, y, z, w); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglGetProgramNamedParameterfvNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV - (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jobject params, jint paramsOffset) -{ - GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; - GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + paramsOffset; - glGetProgramNamedParameterfvNV(id, length, name_ptr, params_ptr); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: glProgramLocalParameter4fNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_glProgramLocalParameter4fARB - (JNIEnv * env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w) -{ - glProgramLocalParameter4fARB(target, index, x, y, z, w); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglGetProgramLocalParameterfvNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramLocalParameterfvARB - (JNIEnv * env, jclass clazz, jint target, jint index, jobject params, jint params_offset) -{ - GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + params_offset; - glGetProgramLocalParameterfvARB(target, index, params_ptr); - -} - -void extgl_InitNVFragmentProgram(JNIEnv *env, jobject ext_set) -{ - JavaMethodAndExtFunction functions[] = { - {"nglProgramNamedParameter4fNV", "(IILjava/nio/ByteBuffer;IFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV, "glProgramNamedParameter4fNV", (void**)&glProgramNamedParameter4fNV}, - {"nglGetProgramNamedParameterfvNV", "(IILjava/nio/ByteBuffer;ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV, "glGetProgramNamedParameterfvNV", (void**)&glGetProgramNamedParameterfvNV}, - {"glProgramLocalParameter4fARB", "(IIFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_glProgramLocalParameter4fARB, "glProgramLocalParameter4fARB", (void**)&glProgramLocalParameter4fARB}, - {"nglGetProgramLocalParameterfvARB", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramLocalParameterfvARB, "glGetProgramLocalParameterfvARB", (void**)&glGetProgramLocalParameterfvARB} - }; - int num_functions = NUMFUNCTIONS(functions); - jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/NVFragmentProgram"); - if (extgl_Extensions.GL_NV_fragment_program) - extgl_InitializeClass(env, clazz, ext_set, "GL_NV_fragment_program", num_functions, functions); -} +/* +* Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' nor the names of +* its contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// ---------------------------------- +// IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFragmentProgram +// ---------------------------------- + +#include "extgl.h" + +typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); + +static glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; +static glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; + +/* + * Class: org.lwjgl.opengl.NVFragmentProgram + * Method: nglProgramNamedParameter4fNV + */ +static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV + (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jfloat x, jfloat y, jfloat z, jfloat w) +{ + GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; + glProgramNamedParameter4fNV(id, length, name_ptr, x, y, z, w); +} + +/* + * Class: org.lwjgl.opengl.NVFragmentProgram + * Method: nglGetProgramNamedParameterfvNV + */ +static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV + (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jobject params, jint paramsOffset) +{ + GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; + GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + paramsOffset; + glGetProgramNamedParameterfvNV(id, length, name_ptr, params_ptr); +} + +void extgl_InitNVFragmentProgram(JNIEnv *env, jobject ext_set) +{ + JavaMethodAndExtFunction functions[] = { + {"nglProgramNamedParameter4fNV", "(IILjava/nio/ByteBuffer;IFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV, "glProgramNamedParameter4fNV", (void**)&glProgramNamedParameter4fNV}, + {"nglGetProgramNamedParameterfvNV", "(IILjava/nio/ByteBuffer;ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV, "glGetProgramNamedParameterfvNV", (void**)&glGetProgramNamedParameterfvNV}, + }; + int num_functions = NUMFUNCTIONS(functions); + jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/NVFragmentProgram"); + if (extgl_Extensions.GL_NV_fragment_program) + extgl_InitializeClass(env, clazz, ext_set, "GL_NV_fragment_program", num_functions, functions); +} |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:02:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29475 Modified Files: Makefile.am Added Files: org_lwjgl_opengl_ARBBufferObject.cpp Removed Files: org_lwjgl_opengl_ARBVertexBufferObject.cpp Log Message: New extensions and static import modifications --- NEW FILE: org_lwjgl_opengl_ARBBufferObject.cpp --- /* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.ARBBufferObject // ---------------------------------- #include "extgl.h" #include "common_tools.h" typedef int GLintptrARB; typedef unsigned int GLsizeiptrARB; typedef void (APIENTRY * glBindBufferARBPROC) (GLenum target, GLuint buffer); typedef void (APIENTRY * glDeleteBuffersARBPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRY * glGenBuffersARBPROC) (GLsizei n, GLuint *buffers); typedef GLboolean (APIENTRY * glIsBufferARBPROC) (GLuint buffer); typedef void (APIENTRY * glBufferDataARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); typedef void (APIENTRY * glBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); typedef void (APIENTRY * glGetBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); typedef void * (APIENTRY * glMapBufferARBPROC) (GLenum target, GLenum access); typedef GLboolean (APIENTRY * glUnmapBufferARBPROC) (GLenum target); typedef void (APIENTRY * glGetBufferParameterivARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRY * glGetBufferPointervARBPROC) (GLenum target, GLenum pname, GLvoid **params); static glBindBufferARBPROC glBindBufferARB; static glDeleteBuffersARBPROC glDeleteBuffersARB; static glGenBuffersARBPROC glGenBuffersARB; static glIsBufferARBPROC glIsBufferARB; static glBufferDataARBPROC glBufferDataARB; static glBufferSubDataARBPROC glBufferSubDataARB; static glGetBufferSubDataARBPROC glGetBufferSubDataARB; static glMapBufferARBPROC glMapBufferARB; static glUnmapBufferARBPROC glUnmapBufferARB; static glGetBufferParameterivARBPROC glGetBufferParameterivARB; static glGetBufferPointervARBPROC glGetBufferPointervARB; /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBindBufferARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBindBufferARB (JNIEnv * env, jclass clazz, jint target, jint buffer) { glBindBufferARB(target, buffer); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglDeleteBuffersARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglDeleteBuffersARB (JNIEnv * env, jclass clazz, jint n, jobject buffers, jint buffers_offset) { GLuint *buffers_ptr = (GLuint *)env->GetDirectBufferAddress(buffers) + buffers_offset; glDeleteBuffersARB(n, buffers_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGenBuffersARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGenBuffersARB (JNIEnv * env, jclass clazz, jint n, jobject buffers, jint buffers_offset) { GLuint *buffers_ptr = (GLuint *)env->GetDirectBufferAddress(buffers) + buffers_offset; glGenBuffersARB(n, buffers_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glIsBufferARB */ static jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glIsBufferARB (JNIEnv * env, jclass clazz, jint buffer) { GLboolean result = glIsBufferARB(buffer); return result; } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBufferDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB (JNIEnv * env, jclass clazz, jint target, jint size, jobject data, jint data_offset, jint usage) { GLvoid *data_ptr = (GLvoid *)safeGetBufferAddress(env, data, data_offset); glBufferDataARB(target, size, data_ptr, usage); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBufferSubDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferSubDataARB (JNIEnv * env, jclass clazz, jint target, jint offset, jint size, jobject data, jint data_offset) { GLvoid *data_ptr = (GLvoid *)((GLubyte *)env->GetDirectBufferAddress(data) + data_offset); glBufferSubDataARB(target, offset, size, data_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGetBufferSubDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferSubDataARB (JNIEnv * env, jclass clazz, jint target, jint offset, jint size, jobject data, jint data_offset) { GLvoid *data_ptr = (GLvoid *)((GLubyte *)env->GetDirectBufferAddress(data) + data_offset); glGetBufferSubDataARB(target, offset, size, data_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glMapBufferARB */ static jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glMapBufferARB (JNIEnv * env, jclass clazz, jint target, jint access, jint size, jobject oldBuffer) { void *buffer_address = glMapBufferARB((GLenum)target, (GLenum)access); void *old_buffer_address = safeGetBufferAddress(env, oldBuffer, 0); if (old_buffer_address == buffer_address) return oldBuffer; else return safeNewBuffer(env, buffer_address, size); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glUnmapBufferARB */ static jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glUnmapBufferARB (JNIEnv * env, jclass clazz, jint target) { GLboolean result = glUnmapBufferARB(target); return result; } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGetBufferParameterivARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferParameterivARB (JNIEnv * env, jclass clazz, jint target, jint pname, jobject params, jint params_offset) { GLint *params_ptr = (GLint *)env->GetDirectBufferAddress(params) + params_offset; glGetBufferParameterivARB(target, pname, params_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glGetBufferPointerARB */ static jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glGetBufferPointerARB (JNIEnv * env, jclass clazz, jint target, jint pname, jint size) { void *pointer; glGetBufferPointervARB((GLenum)target, (GLenum)pname, &pointer); return safeNewBuffer(env, pointer, size); } void extgl_InitARBBufferObject(JNIEnv *env, jobject ext_set) { JavaMethodAndExtFunction functions[] = { {"nglBindBufferARB", "(II)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBindBufferARB, "glBindBufferARB", (void**)&glBindBufferARB}, {"nglDeleteBuffersARB", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglDeleteBuffersARB, "glDeleteBuffersARB", (void**)&glDeleteBuffersARB}, {"nglGenBuffersARB", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGenBuffersARB, "glGenBuffersARB", (void**)&glGenBuffersARB}, {"glIsBufferARB", "(I)Z", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glIsBufferARB, "glIsBufferARB", (void**)&glIsBufferARB}, {"nglBufferDataARB", "(IILjava/nio/Buffer;II)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB, "glBufferDataARB", (void**)&glBufferDataARB}, {"nglBufferSubDataARB", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBufferSubDataARB, "glBufferSubDataARB", (void**)&glBufferSubDataARB}, {"nglGetBufferSubDataARB", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferSubDataARB, "glGetBufferSubDataARB", (void**)&glGetBufferSubDataARB}, {"glMapBufferARB", "(IIILjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glMapBufferARB, "glMapBufferARB", (void**)&glMapBufferARB}, {"glUnmapBufferARB", "(I)Z", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glUnmapBufferARB, "glUnmapBufferARB", (void**)&glUnmapBufferARB}, {"nglGetBufferParameterivARB", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferParameterivARB, "glGetBufferParameterivARB", (void**)&glGetBufferParameterivARB}, {"glGetBufferPointerARB", "(III)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glGetBufferPointerARB, "glGetBufferPointervARB", (void**)&glGetBufferPointervARB} }; int num_functions = NUMFUNCTIONS(functions); jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/ARBBufferObject"); extgl_InitializeClass(env, clazz, NULL, "<ARBBufferObject>", num_functions, functions); } Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 17 Feb 2004 21:59:09 -0000 1.5 +++ Makefile.am 29 Mar 2004 16:51:29 -0000 1.6 @@ -2,7 +2,8 @@ libarb_la_SOURCES = $(SRC) INCLUDES=-I.. -SRC = org_lwjgl_opengl_ARBProgram.cpp \ +SRC = org_lwjgl_opengl_ARBBufferObject.cpp \ + org_lwjgl_opengl_ARBProgram.cpp \ org_lwjgl_opengl_ARBProgram.cpp \ org_lwjgl_opengl_ARBMatrixPalette.cpp \ org_lwjgl_opengl_ARBMultisample.cpp \ @@ -12,7 +13,6 @@ org_lwjgl_opengl_ARBTextureCompression.cpp \ org_lwjgl_opengl_ARBTransposeMatrix.cpp \ org_lwjgl_opengl_ARBVertexBlend.cpp \ - org_lwjgl_opengl_ARBVertexBufferObject.cpp \ org_lwjgl_opengl_ARBVertexProgram.cpp \ org_lwjgl_opengl_ARBWindowPos.cpp \ org_lwjgl_opengl_ARBOcclusionQuery.cpp \ --- org_lwjgl_opengl_ARBVertexBufferObject.cpp DELETED --- |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 16:59:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28608 Modified Files: extgl.cpp extgl.h Log Message: New extensions and static import modifications Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- extgl.cpp 18 Mar 2004 21:58:02 -0000 1.34 +++ extgl.cpp 29 Mar 2004 16:47:53 -0000 1.35 @@ -545,8 +545,6 @@ } } - extgl_Extensions.GL_ARB_depth_texture = GLQueryExtension(env, ext_set, "GL_ARB_depth_texture"); - extgl_Extensions.GL_ARB_imaging = GLQueryExtension(env, ext_set, "GL_ARB_imaging"); extgl_Extensions.GL_ARB_depth_texture = GLQueryExtension(env, ext_set, "GL_ARB_depth_texture"); extgl_Extensions.GL_ARB_fragment_program = GLQueryExtension(env, ext_set, "GL_ARB_fragment_program"); @@ -582,11 +580,14 @@ extgl_Extensions.GL_EXT_bgra = GLQueryExtension(env, ext_set, "GL_EXT_bgra"); extgl_Extensions.GL_EXT_blend_func_separate = GLQueryExtension(env, ext_set, "GL_EXT_blend_func_separate"); extgl_Extensions.GL_EXT_blend_subtract = GLQueryExtension(env, ext_set, "GL_EXT_blend_subtract"); + extgl_Extensions.GL_EXT_Cg_shader = GLQueryExtension(env, ext_set, "GL_EXT_Cg_shader"); extgl_Extensions.GL_EXT_compiled_vertex_array = GLQueryExtension(env, ext_set, "GL_EXT_compiled_vertex_array"); + extgl_Extensions.GL_EXT_depth_bounds_test = GLQueryExtension(env, ext_set, "GL_EXT_depth_bounds_test"); extgl_Extensions.GL_EXT_draw_range_elements = GLQueryExtension(env, ext_set, "GL_EXT_draw_range_elements"); extgl_Extensions.GL_EXT_fog_coord = GLQueryExtension(env, ext_set, "GL_EXT_fog_coord"); extgl_Extensions.GL_EXT_multi_draw_arrays = GLQueryExtension(env, ext_set, "GL_EXT_multi_draw_arrays"); extgl_Extensions.GL_EXT_packed_pixels = GLQueryExtension(env, ext_set, "GL_EXT_packed_pixels"); + extgl_Extensions.GL_EXT_pixel_buffer_object = GLQueryExtension(env, ext_set, "GL_EXT_pixel_buffer_object"); extgl_Extensions.GL_EXT_point_parameters = GLQueryExtension(env, ext_set, "GL_EXT_point_parameters"); extgl_Extensions.GL_EXT_rescale_normal = GLQueryExtension(env, ext_set, "GL_EXT_rescale_normal"); extgl_Extensions.GL_EXT_secondary_color = GLQueryExtension(env, ext_set, "GL_EXT_secondary_color"); @@ -625,6 +626,7 @@ extgl_Extensions.GL_NV_float_buffer = GLQueryExtension(env, ext_set, "GL_NV_float_buffer"); extgl_Extensions.GL_NV_fog_distance = GLQueryExtension(env, ext_set, "GL_NV_fog_distance"); extgl_Extensions.GL_NV_fragment_program = GLQueryExtension(env, ext_set, "GL_NV_fragment_program"); + extgl_Extensions.GL_NV_fragment_program_option = GLQueryExtension(env, ext_set, "GL_NV_fragment_program_option"); extgl_Extensions.GL_NV_half_float = GLQueryExtension(env, ext_set, "GL_NV_half_float"); extgl_Extensions.GL_NV_light_max_exponent = GLQueryExtension(env, ext_set, "GL_NV_light_max_exponent"); extgl_Extensions.GL_NV_multisample_filter_hint = GLQueryExtension(env, ext_set, "GL_NV_multisample_filter_hint"); @@ -648,10 +650,12 @@ extgl_Extensions.GL_NV_vertex_program = GLQueryExtension(env, ext_set, "GL_NV_vertex_program"); extgl_Extensions.GL_NV_vertex_program1_1 = GLQueryExtension(env, ext_set, "GL_NV_vertex_program1_1"); extgl_Extensions.GL_NV_vertex_program2 = GLQueryExtension(env, ext_set, "GL_NV_vertex_program2"); + extgl_Extensions.GL_NV_vertex_program2_option = GLQueryExtension(env, ext_set, "GL_NV_vertex_program2_option"); } extern bool extgl_InitOpenGL1_1(JNIEnv *env); -//extern void extgl_InitARBFragmentProgram(JNIEnv *env, jobject ext_set); + +extern void extgl_InitARBBufferObject(JNIEnv *env, jobject ext_set); extern void extgl_InitARBImaging(JNIEnv *env, jobject ext_set); extern void extgl_InitARBMatrixPalette(JNIEnv *env, jobject ext_set); extern void extgl_InitARBMultisample(JNIEnv *env, jobject ext_set); @@ -663,13 +667,13 @@ extern void extgl_InitARBTextureCompression(JNIEnv *env, jobject ext_set); extern void extgl_InitARBTransposeMatrix(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexBlend(JNIEnv *env, jobject ext_set); -extern void extgl_InitARBVertexBufferObject(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexProgram(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexShader(JNIEnv *env, jobject ext_set); extern void extgl_InitARBWindowPos(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTBlendFuncSeparate(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTCompiledVertexArray(JNIEnv *env, jobject ext_set); +extern void extgl_InitEXTDepthBoundsTest(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTDrawRangeElements(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTFogCoord(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTMultiDrawArrays(JNIEnv *env, jobject ext_set); @@ -722,7 +726,7 @@ //extgl_InitEXTNurbsTesselator(env, ext_set); /* first load the extensions */ - // extgl_InitARBFragmentProgram(env, ext_set); + extgl_InitARBBufferObject(env, ext_set); extgl_InitARBImaging(env, ext_set); extgl_InitARBMatrixPalette(env, ext_set); extgl_InitARBMultisample(env, ext_set); @@ -734,14 +738,13 @@ extgl_InitARBTextureCompression(env, ext_set); extgl_InitARBTransposeMatrix(env, ext_set); extgl_InitARBVertexBlend(env, ext_set); - extgl_InitARBVertexBufferObject(env, ext_set); extgl_InitARBVertexProgram(env, ext_set); extgl_InitARBVertexShader(env, ext_set); extgl_InitARBWindowPos(env, ext_set); extgl_InitEXTBlendFuncSeparate(env, ext_set); extgl_InitEXTCompiledVertexArray(env, ext_set); - //extgl_InitEXTCullVertex(env, ext_set); + extgl_InitEXTDepthBoundsTest(env, ext_set); extgl_InitEXTDrawRangeElements(env, ext_set); extgl_InitEXTFogCoord(env, ext_set); extgl_InitEXTMultiDrawArrays(env, ext_set); @@ -751,7 +754,6 @@ extgl_InitEXTVertexShader(env, ext_set); extgl_InitEXTVertexWeighting(env, ext_set); - //extgl_InitNVElementArray(env, ext_set); extgl_InitNVEvaluators(env, ext_set); extgl_InitNVFence(env, ext_set); extgl_InitNVFragmentProgram(env, ext_set); Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- extgl.h 18 Mar 2004 21:58:02 -0000 1.35 +++ extgl.h 29 Mar 2004 16:47:53 -0000 1.36 @@ -2088,11 +2088,14 @@ bool GL_EXT_bgra; bool GL_EXT_blend_func_separate; bool GL_EXT_blend_subtract; + bool GL_EXT_Cg_shader; bool GL_EXT_compiled_vertex_array; + bool GL_EXT_depth_bounds_test; bool GL_EXT_draw_range_elements; bool GL_EXT_fog_coord; bool GL_EXT_multi_draw_arrays; bool GL_EXT_packed_pixels; + bool GL_EXT_pixel_buffer_object; bool GL_EXT_point_parameters; bool GL_EXT_rescale_normal; bool GL_EXT_secondary_color; @@ -2131,6 +2134,7 @@ bool GL_NV_float_buffer; bool GL_NV_fog_distance; bool GL_NV_fragment_program; + bool GL_NV_fragment_program_option; bool GL_NV_half_float; bool GL_NV_light_max_exponent; bool GL_NV_multisample_filter_hint; @@ -2154,6 +2158,7 @@ bool GL_NV_vertex_program; bool GL_NV_vertex_program1_1; bool GL_NV_vertex_program2; + bool GL_NV_vertex_program2_option; }; extern struct ExtensionTypes extgl_Extensions; |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 16:57:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28523 Modified Files: Grass.java VBOIndexTest.java VBOTest.java Log Message: New extensions and static import modifications Index: VBOIndexTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOIndexTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- VBOIndexTest.java 26 Mar 2004 21:57:57 -0000 1.16 +++ VBOIndexTest.java 29 Mar 2004 16:46:24 -0000 1.17 @@ -41,39 +41,37 @@ package org.lwjgl.test.opengl; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - import org.lwjgl.Display; import org.lwjgl.DisplayMode; import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.ARBVertexBufferObject; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + public final class VBOIndexTest { + static { try { - //find first display mode that allows us 640*480*16 + //find first display mode that allows us 640*480*16 int mode = -1; DisplayMode[] modes = Display.getAvailableDisplayModes(); - for (int i = 0; i < modes.length; i++) { - if (modes[i].width == 640 - && modes[i].height == 480 - && modes[i].bpp >= 16) { + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].width == 640 + && modes[i].height == 480 + && modes[i].bpp >= 16 ) { mode = i; break; } } - if (mode != -1) { + if ( mode != -1 ) { //select above found displaymode - System.out.println("Setting display mode to "+modes[mode]); + System.out.println("Setting display mode to " + modes[mode]); Display.setDisplayMode(modes[mode]); System.out.println("Created display."); } @@ -81,22 +79,26 @@ System.err.println("Failed to create display due to " + e); } } - - static { - try { - Window.create("LWJGL Game Example", 16, 0, 0,0, 0); - System.out.println("Created OpenGL."); - } catch (Exception e) { - System.err.println("Failed to create OpenGL due to "+e); - System.exit(1); - } - } - - /** Is the game finished? */ - private static boolean finished; - - /** A rotating square! */ - private static float angle; + + static { + try { + Window.create("LWJGL Game Example", 16, 0, 0, 0, 0); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; private static int buffer_id; private static int indices_buffer_id; private static FloatBuffer vertices; @@ -105,134 +107,146 @@ private static IntBuffer indices; private static ByteBuffer mapped_indices_buffer = null; private static IntBuffer mapped_indices_int_buffer = null; - - public static void main(String[] arguments) { - try { - init(); - while (!finished) { - Window.update(); - - if (Window.isMinimized()) - Thread.sleep(200); - else if (Window.isCloseRequested()) - System.exit(0); - - mainLoop(); - render(); - } - } catch (Throwable t) { - t.printStackTrace(); - } finally { - cleanup(); - } - } - - /** - * All calculations are done in here - */ - private static void mainLoop() { - angle += 1f; - if (angle > 360.0f) - angle = 0.0f; - - if (Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0) - System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); - for (int i = 0; i < Mouse.getButtonCount(); i++) - if (Mouse.isButtonDown(i)) - System.out.println("Button " + i + " down"); - if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) - finished = true; - for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { - Keyboard.next(); - if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) - finished = true; - if (Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState()) - System.out.println("Current time: " + Sys.getTime()); - } - } - - /** - * All rendering is done in here - */ - private static void render() { - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - GL11.glPushMatrix(); - GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); - GL11.glRotatef(angle, 0, 0, 1.0f); + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Window.update(); - ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer); - if (new_mapped_buffer != mapped_buffer) - mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); - mapped_buffer = new_mapped_buffer; + if ( Window.isMinimized() ) + Thread.sleep(200); + else if ( Window.isCloseRequested() ) + System.exit(0); - new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 4*4, mapped_indices_buffer); - if (new_mapped_buffer != mapped_indices_buffer) - mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer(); + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } + } - mapped_float_buffer.rewind(); - vertices.rewind(); - mapped_float_buffer.put(vertices); + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; - mapped_indices_int_buffer.rewind(); - indices.rewind(); - mapped_indices_int_buffer.put(indices); - if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) && - ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB)) { - GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0); - } - GL11.glPopMatrix(); - } - - /** - * Initialize - */ - private static void init() throws Exception { - Sys.setTime(0); - Sys.setProcessPriority(Sys.HIGH_PRIORITY); - System.out.println("Timer resolution: " + Sys.getTimerResolution()); - // Go into orthographic projection mode. - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); - if (!GLContext.GL_ARB_vertex_buffer_object) { - System.out.println("ARB VBO not supported!"); - System.exit(1); + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } } - IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); - ARBVertexBufferObject.glGenBuffersARB(int_buffer); - buffer_id = int_buffer.get(0); - indices_buffer_id = int_buffer.get(1); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id); - vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); - vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); - vertices.rewind(); - indices = ByteBuffer.allocateDirect(4*4).order(ByteOrder.nativeOrder()).asIntBuffer(); - indices.put(0).put(1).put(2).put(3); - indices.rewind(); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, 4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); - } - - /** - * Cleanup - */ - private static void cleanup() { - IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); - int_buffer.put(0, buffer_id); - int_buffer.put(1, indices_buffer_id); - ARBVertexBufferObject.glDeleteBuffersARB(int_buffer); - Window.destroy(); - try { - Display.resetDisplayMode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } + + /** + * All rendering is done in here + */ + private static void render() { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + GL11.glPushMatrix(); + GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); + GL11.glRotatef(angle, 0, 0, 1.0f); + + + ByteBuffer new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 2 * 4 * 4, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + + new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 4 * 4, + mapped_indices_buffer); + if ( new_mapped_buffer != mapped_indices_buffer ) + mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer(); + + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + + mapped_indices_int_buffer.rewind(); + indices.rewind(); + mapped_indices_int_buffer.put(indices); + if ( ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) && + ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB) ) { + GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0); + } + GL11.glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + Sys.setTime(0); + Sys.setProcessPriority(Sys.HIGH_PRIORITY); + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); + if ( !GLContext.GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + ARBBufferObject.glGenBuffersARB(int_buffer); + buffer_id = int_buffer.get(0); + indices_buffer_id = int_buffer.get(1); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + vertices.rewind(); + indices = ByteBuffer.allocateDirect(4 * 4).order(ByteOrder.nativeOrder()).asIntBuffer(); + indices.put(0).put(1).put(2).put(3); + indices.rewind(); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + 2 * 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, + 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); + GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + int_buffer.put(0, buffer_id); + int_buffer.put(1, indices_buffer_id); + ARBBufferObject.glDeleteBuffersARB(int_buffer); + Window.destroy(); + try { + Display.resetDisplayMode(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} Index: Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Grass.java 29 Mar 2004 07:32:37 -0000 1.32 +++ Grass.java 29 Mar 2004 16:46:24 -0000 1.33 @@ -54,10 +54,7 @@ import org.lwjgl.DisplayMode; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.NVVertexProgram; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; public class Grass { @@ -82,7 +79,7 @@ mode = i; break; } - } + } if (mode == -1) { System.out.println("did not find suitable mode"); @@ -140,7 +137,7 @@ public static void main(String[] args) { System.out.println("Vertex program supported: " + GLContext.GL_NV_vertex_program); IntBuffer int_buf = BufferUtils.createIntBuffer(1); - NVVertexProgram.glGenProgramsNV(int_buf); + NVProgram.glGenProgramsNV(int_buf); if (int_buf.get(0) == 0) throw new RuntimeException("Could not allocate new vertex program id!"); @@ -150,7 +147,7 @@ program_buf.order(ByteOrder.nativeOrder()); program_buf.put(program); program_buf.flip(); - NVVertexProgram.glLoadProgramNV( + NVProgram.glLoadProgramNV( NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle, program_buf); @@ -286,7 +283,7 @@ private static void grsDraw() { GL11.glEnable(NVVertexProgram.GL_VERTEX_PROGRAM_NV); - NVVertexProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle); + NVProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle); NVVertexProgram.glTrackMatrixNV( NVVertexProgram.GL_VERTEX_PROGRAM_NV, 0, Index: VBOTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- VBOTest.java 26 Mar 2004 21:57:57 -0000 1.22 +++ VBOTest.java 29 Mar 2004 16:46:24 -0000 1.23 @@ -41,39 +41,37 @@ package org.lwjgl.test.opengl; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - import org.lwjgl.Display; import org.lwjgl.DisplayMode; import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.ARBVertexBufferObject; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + public final class VBOTest { + static { try { - //find first display mode that allows us 640*480*16 + //find first display mode that allows us 640*480*16 int mode = -1; DisplayMode[] modes = Display.getAvailableDisplayModes(); - for (int i = 0; i < modes.length; i++) { - if (modes[i].width == 640 - && modes[i].height == 480 - && modes[i].bpp >= 16) { + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].width == 640 + && modes[i].height == 480 + && modes[i].bpp >= 16 ) { mode = i; break; } } - if (mode != -1) { + if ( mode != -1 ) { //select above found displaymode - System.out.println("Setting display mode to "+modes[mode]); + System.out.println("Setting display mode to " + modes[mode]); Display.setDisplayMode(modes[mode]); System.out.println("Created display."); } @@ -81,133 +79,143 @@ System.err.println("Failed to create display due to " + e); } } - - static { - try { - Window.create("LWJGL Game Example", 16, 0, 0,0, 0); - System.out.println("Created OpenGL."); - } catch (Exception e) { - System.err.println("Failed to create OpenGL due to "+e); - System.exit(1); - } - } - - /** Is the game finished? */ - private static boolean finished; - - /** A rotating square! */ - private static float angle; + + static { + try { + Window.create("LWJGL Game Example", 16, 0, 0, 0, 0); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; private static int buffer_id; private static FloatBuffer vertices; private static ByteBuffer mapped_buffer = null; private static FloatBuffer mapped_float_buffer = null; - - public static void main(String[] arguments) { - try { - init(); - while (!finished) { - Window.update(); - - if (Window.isMinimized()) - Thread.sleep(200); - else if (Window.isCloseRequested()) - System.exit(0); - - mainLoop(); - render(); - } - } catch (Throwable t) { - t.printStackTrace(); - } finally { - cleanup(); - } - } - - /** - * All calculations are done in here - */ - private static void mainLoop() { - angle += 1f; - if (angle > 360.0f) - angle = 0.0f; - - if (Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0) - System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); - for (int i = 0; i < Mouse.getButtonCount(); i++) - if (Mouse.isButtonDown(i)) - System.out.println("Button " + i + " down"); - if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) - finished = true; - for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { - Keyboard.next(); - if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) - finished = true; - if (Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState()) - System.out.println("Current time: " + Sys.getTime()); - } - } - - /** - * All rendering is done in here - */ - private static void render() { - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - GL11.glPushMatrix(); - GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); - GL11.glRotatef(angle, 0, 0, 1.0f); - ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer); - if (new_mapped_buffer != mapped_buffer) - mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); - mapped_buffer = new_mapped_buffer; - mapped_float_buffer.rewind(); - vertices.rewind(); - mapped_float_buffer.put(vertices); - if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB)) - GL11.glDrawArrays(GL11.GL_QUADS, 0, 4); - GL11.glPopMatrix(); - } - - /** - * Initialize - */ - private static void init() throws Exception { - Sys.setTime(0); - Sys.setProcessPriority(Sys.HIGH_PRIORITY); - System.out.println("Timer resolution: " + Sys.getTimerResolution()); - // Go into orthographic projection mode. - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); - if (!GLContext.GL_ARB_vertex_buffer_object) { - System.out.println("ARB VBO not supported!"); - System.exit(1); + + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Window.update(); + + if ( Window.isMinimized() ) + Thread.sleep(200); + else if ( Window.isCloseRequested() ) + System.exit(0); + + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } } - IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); - ARBVertexBufferObject.glGenBuffersARB(int_buffer); - buffer_id = int_buffer.get(0); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); - vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); - vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); - } - - /** - * Cleanup - */ - private static void cleanup() { - IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); - int_buffer.put(0, buffer_id); - ARBVertexBufferObject.glDeleteBuffersARB(int_buffer); - Window.destroy(); - try { - Display.resetDisplayMode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } + + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; + + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } + } + + /** + * All rendering is done in here + */ + private static void render() { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + GL11.glPushMatrix(); + GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); + GL11.glRotatef(angle, 0, 0, 1.0f); + ByteBuffer new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 2 * 4 * 4, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + if ( ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) ) + GL11.glDrawArrays(GL11.GL_QUADS, 0, 4); + GL11.glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + Sys.setTime(0); + Sys.setProcessPriority(Sys.HIGH_PRIORITY); + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); + if ( !GLContext.GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + ARBBufferObject.glGenBuffersARB(int_buffer); + buffer_id = int_buffer.get(0); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + 2 * 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); + GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + int_buffer.put(0, buffer_id); + ARBBufferObject.glDeleteBuffersARB(int_buffer); + Window.destroy(); + try { + Display.resetDisplayMode(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 16:56:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28065 Modified Files: ARBFragmentProgram.java ARBProgram.java ARBVertexBufferObject.java ARBVertexProgram.java GLContext.java NVFragmentProgram.java NVProgram.java NVVertexProgram.java Added Files: ARBBufferObject.java EXTDepthBoundsTest.java EXTPixelBufferObject.java Log Message: New extensions and static import modifications Index: NVVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexProgram.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NVVertexProgram.java 7 Mar 2004 15:18:45 -0000 1.5 +++ NVVertexProgram.java 29 Mar 2004 16:44:36 -0000 1.6 @@ -46,9 +46,7 @@ import java.nio.IntBuffer; import java.nio.ShortBuffer; - - -public final class NVVertexProgram extends NVProgram { +public final class NVVertexProgram { /* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, Index: ARBVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexProgram.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBVertexProgram.java 18 Feb 2004 23:54:46 -0000 1.4 +++ ARBVertexProgram.java 29 Mar 2004 16:44:36 -0000 1.5 @@ -44,7 +44,7 @@ import java.nio.IntBuffer; import java.nio.ShortBuffer; -public final class ARBVertexProgram extends ARBProgram { +public final class ARBVertexProgram { /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the @@ -87,7 +87,7 @@ public static final int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1; public static final int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2; public static final int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3; - + /* * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, * GetFloatv, and GetDoublev: Index: ARBFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBFragmentProgram.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ARBFragmentProgram.java 29 Mar 2004 07:53:36 -0000 1.5 +++ ARBFragmentProgram.java 29 Mar 2004 16:44:36 -0000 1.6 @@ -1,7 +1,7 @@ /* * Copyright (c) 2002 Lightweight Java Game Library 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, @@ -12,7 +12,7 @@ * * Neither the name of 'Light Weight Java Game Library' 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 @@ -32,7 +32,7 @@ package org.lwjgl.opengl; -public final class ARBFragmentProgram extends ARBProgram { +public final class ARBFragmentProgram { /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the --- NEW FILE: EXTDepthBoundsTest.java --- /* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /* * Created by LWJGL. * User: spasi * Date: 28-03-2004 * Time: 10:01:34 pm */ package org.lwjgl.opengl; public final class EXTDepthBoundsTest { /* Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: */ public static final int DEPTH_BOUNDS_TEST_EXT = 0x8890; /* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: */ public static final int DEPTH_BOUNDS_EXT = 0x8891; public static native void glDepthBoundsEXT(float zmin, float zmax); } Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- GLContext.java 27 Mar 2004 13:48:58 -0000 1.8 +++ GLContext.java 29 Mar 2004 16:44:36 -0000 1.9 @@ -93,11 +93,14 @@ public static boolean GL_EXT_bgra; public static boolean GL_EXT_blend_func_separate; public static boolean GL_EXT_blend_subtract; + public static boolean GL_EXT_Cg_shader; public static boolean GL_EXT_compiled_vertex_array; + public static boolean GL_EXT_depth_bounds_test; public static boolean GL_EXT_draw_range_elements; public static boolean GL_EXT_fog_coord; public static boolean GL_EXT_multi_draw_arrays; public static boolean GL_EXT_packed_pixels; + public static boolean GL_EXT_pixel_buffer_object; public static boolean GL_EXT_point_parameters; public static boolean GL_EXT_rescale_normal; public static boolean GL_EXT_secondary_color; @@ -136,6 +139,7 @@ public static boolean GL_NV_float_buffer; public static boolean GL_NV_fog_distance; public static boolean GL_NV_fragment_program; + public static boolean GL_NV_fragment_program_option; public static boolean GL_NV_half_float; public static boolean GL_NV_light_max_exponent; public static boolean GL_NV_multisample_filter_hint; @@ -159,6 +163,7 @@ public static boolean GL_NV_vertex_program; public static boolean GL_NV_vertex_program1_1; public static boolean GL_NV_vertex_program2; + public static boolean GL_NV_vertex_program2_option; public static boolean OpenGL11; public static boolean OpenGL12; --- NEW FILE: EXTPixelBufferObject.java --- /* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /* * Created by LWJGL. * User: spasi * Date: 28 Ìáñ 2004 * Time: 10:12:12 ìì */ package org.lwjgl.opengl; public final class EXTPixelBufferObject { public static final int GL_PIXEL_PACK_BUFFER_EXT = 0x88EB; public static final int GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC; } --- NEW FILE: ARBBufferObject.java --- /* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /** * $Id: ARBBufferObject.java,v 1.1 2004/03/29 16:44:36 spasi Exp $ * * ARB_vertex_buffer_object constants. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ package org.lwjgl.opengl; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.nio.ShortBuffer; public final class ARBBufferObject { /* * Accepted by the <usage> parameter of BufferDataARB: */ public static final int GL_STREAM_DRAW_ARB = 0x88E0; public static final int GL_STREAM_READ_ARB = 0x88E1; public static final int GL_STREAM_COPY_ARB = 0x88E2; public static final int GL_STATIC_DRAW_ARB = 0x88E4; public static final int GL_STATIC_READ_ARB = 0x88E5; public static final int GL_STATIC_COPY_ARB = 0x88E6; public static final int GL_DYNAMIC_DRAW_ARB = 0x88E8; public static final int GL_DYNAMIC_READ_ARB = 0x88E9; public static final int GL_DYNAMIC_COPY_ARB = 0x88EA; /* * Accepted by the <access> parameter of MapBufferARB: */ public static final int GL_READ_ONLY_ARB = 0x88B8; public static final int GL_WRITE_ONLY_ARB = 0x88B9; public static final int GL_READ_WRITE_ARB = 0x88BA; /* * Accepted by the <pname> parameter of GetBufferParameterivARB: */ public static final int GL_BUFFER_SIZE_ARB = 0x8764; public static final int GL_BUFFER_USAGE_ARB = 0x8765; public static final int GL_BUFFER_ACCESS_ARB = 0x88BB; public static final int GL_BUFFER_MAPPED_ARB = 0x88BC; public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88BD; public static void glBindBufferARB(int target, int buffer) { switch (target) { case ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB: VBOTracker.getVBOElementStack().setState(buffer); break; case ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB: VBOTracker.getVBOArrayStack().setState(buffer); break; default: throw new IllegalArgumentException("Unsupported VBO target " + target); } nglBindBufferARB(target, buffer); } private static native void nglBindBufferARB(int target, int buffer); public static void glDeleteBuffersARB(IntBuffer buffers) { for (int i = buffers.position(); i < buffers.limit(); i++) { int buffer_handle = buffers.get(i); if (VBOTracker.getVBOElementStack().getState() == buffer_handle) VBOTracker.getVBOElementStack().setState(0); if (VBOTracker.getVBOArrayStack().getState() == buffer_handle) VBOTracker.getVBOArrayStack().setState(0); } nglDeleteBuffersARB(buffers.remaining(), buffers, buffers.position()); } private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_offset); public static void glGenBuffersARB(IntBuffer buffers) { nglGenBuffersARB(buffers.remaining(), buffers, buffers.position()); } private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_offset); public static native boolean glIsBufferARB(int buffer); public static void glBufferDataARB(int target, int size, ByteBuffer data, int usage) { nglBufferDataARB(target, size, data, data != null ? data.position() : 0, usage); } public static void glBufferDataARB(int target, int size, ShortBuffer data, int usage) { nglBufferDataARB(target, size, data, data != null ? data.position()<<1 : 0, usage); } public static void glBufferDataARB(int target, int size, FloatBuffer data, int usage) { nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage); } public static void glBufferDataARB(int target, int size, IntBuffer data, int usage) { nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage); } private static native void nglBufferDataARB(int target, int size, Buffer data, int data_offset, int usage); public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) { nglBufferSubDataARB(target, offset, data.remaining(), data, data.position()); } public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) { nglBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1); } public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) { nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); } public static void glBufferSubDataARB(int target, int offset, IntBuffer data) { nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); } private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset); public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) { nglGetBufferSubDataARB(target, offset, data.remaining(), data, data.position()); } public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) { nglGetBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1); } public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) { nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); } public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) { nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); } private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset); /** * glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in * which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, * it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created. * That way, an application will normally use glMapBufferARB like this: * * ByteBuffer mapped_buffer; * mapped_buffer = glMapBufferARB(..., ..., ..., null); * ... * // Another map on the same buffer * mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer); * * @param size The size of the buffer area. * @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and * no new buffer will be created. In that case, size is ignored. * @return A ByteBuffer representing the mapped buffer memory. */ public static native ByteBuffer glMapBufferARB(int target, int access, int size, ByteBuffer oldBuffer); public static native boolean glUnmapBufferARB(int target); public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetBufferParameterivARB(target, pname, params, params.position()); } private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_offset); public static native ByteBuffer glGetBufferPointerARB(int target, int pname, int size); } Index: NVProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVProgram.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVProgram.java 29 Mar 2004 07:53:36 -0000 1.2 +++ NVProgram.java 29 Mar 2004 16:44:36 -0000 1.3 @@ -43,7 +43,7 @@ import java.nio.ByteBuffer; import java.nio.IntBuffer; -class NVProgram { +public final class NVProgram { /* Accepted by the <pname> parameter of GetProgramivNV: @@ -109,33 +109,27 @@ nglGetProgramStringNV(programID, parameterName, paramString, paramString.position()); } - private static native void nglGetProgramStringNV( - int programID, - int parameterName, - Buffer paramString, - int paramStringOffset); + private static native void nglGetProgramStringNV(int programID, int parameterName, Buffer paramString, int paramStringOffset); // --------------------------- public static native boolean glIsProgramNV(int programID); // --------------------------- public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) { - if (programIDs.remaining() != programResidences.remaining()) + if ( programIDs.remaining() != programResidences.remaining() ) throw new IllegalArgumentException("programIDs.remaining() != programResidences.remaining()"); - return nglAreProgramsResidentNV( - programIDs.remaining(), - programIDs, - programIDs.position(), - programResidences, - programResidences.position()); + return nglAreProgramsResidentNV(programIDs.remaining(), + programIDs, + programIDs.position(), + programResidences, + programResidences.position()); } - private static native boolean nglAreProgramsResidentNV( - int n, - IntBuffer programIDs, - int programIDsOffset, - ByteBuffer programResidences, - int programResidencesOffset); + private static native boolean nglAreProgramsResidentNV(int n, + IntBuffer programIDs, + int programIDsOffset, + ByteBuffer programResidences, + int programResidencesOffset); // --------------------------- // --------------------------- Index: NVFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NVFragmentProgram.java 29 Mar 2004 07:53:36 -0000 1.4 +++ NVFragmentProgram.java 29 Mar 2004 16:44:36 -0000 1.5 @@ -42,7 +42,7 @@ import java.nio.ByteBuffer; import java.nio.FloatBuffer; -public final class NVFragmentProgram extends NVProgram { +public final class NVFragmentProgram { /* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the @@ -98,20 +98,5 @@ // --------------------------- - public static native void glProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w); - - // --------------------------- - - public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) { - BufferChecks.checkBuffer(params); - nglGetProgramLocalParameterfvARB(target, index, params, params.position()); - } - - private static native void nglGetProgramLocalParameterfvARB( - int target, - int index, - FloatBuffer params, - int params_offset); - // --------------------------- } Index: ARBVertexBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBufferObject.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBVertexBufferObject.java 27 Mar 2004 11:55:07 -0000 1.4 +++ ARBVertexBufferObject.java 29 Mar 2004 16:44:36 -0000 1.5 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'Light Weight Java Game Library' 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. */ @@ -41,16 +41,21 @@ package org.lwjgl.opengl; -import java.nio.Buffer; -import java.nio.ByteBuffer; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; -import java.nio.ShortBuffer; - - public final class ARBVertexBufferObject { + + /* + * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, + * BufferSubDataARB, MapBufferARB, UnmapBufferARB, + * GetBufferSubDataARB, GetBufferParameterivARB, and + * GetBufferPointervARB: + */ public static final int GL_ARRAY_BUFFER_ARB = 0x8892; public static final int GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893; + + /* + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ public static final int GL_ARRAY_BUFFER_BINDING_ARB = 0x8894; public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895; public static final int GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896; @@ -62,116 +67,10 @@ public static final int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C; public static final int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D; public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E; + + /* + * Accepted by the <pname> parameter of GetVertexAttribivARB: + */ public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; - public static final int GL_STREAM_DRAW_ARB = 0x88E0; - public static final int GL_STREAM_READ_ARB = 0x88E1; - public static final int GL_STREAM_COPY_ARB = 0x88E2; - public static final int GL_STATIC_DRAW_ARB = 0x88E4; - public static final int GL_STATIC_READ_ARB = 0x88E5; - public static final int GL_STATIC_COPY_ARB = 0x88E6; - public static final int GL_DYNAMIC_DRAW_ARB = 0x88E8; - public static final int GL_DYNAMIC_READ_ARB = 0x88E9; - public static final int GL_DYNAMIC_COPY_ARB = 0x88EA; - public static final int GL_READ_ONLY_ARB = 0x88B8; - public static final int GL_WRITE_ONLY_ARB = 0x88B9; - public static final int GL_READ_WRITE_ARB = 0x88BA; - public static final int GL_BUFFER_SIZE_ARB = 0x8764; - public static final int GL_BUFFER_USAGE_ARB = 0x8765; - public static final int GL_BUFFER_ACCESS_ARB = 0x88BB; - public static final int GL_BUFFER_MAPPED_ARB = 0x88BC; - public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88BD; - - public static void glBindBufferARB(int target, int buffer) { - switch (target) { - case GL_ELEMENT_ARRAY_BUFFER_ARB: - VBOTracker.getVBOElementStack().setState(buffer); - break; - case GL_ARRAY_BUFFER_ARB: - VBOTracker.getVBOArrayStack().setState(buffer); - break; - default: throw new IllegalArgumentException("Unsupported VBO target " + target); - } - nglBindBufferARB(target, buffer); - } - private static native void nglBindBufferARB(int target, int buffer); - public static void glDeleteBuffersARB(IntBuffer buffers) { - for (int i = buffers.position(); i < buffers.limit(); i++) { - int buffer_handle = buffers.get(i); - if (VBOTracker.getVBOElementStack().getState() == buffer_handle) - VBOTracker.getVBOElementStack().setState(0); - if (VBOTracker.getVBOArrayStack().getState() == buffer_handle) - VBOTracker.getVBOArrayStack().setState(0); - } - nglDeleteBuffersARB(buffers.remaining(), buffers, buffers.position()); - } - private static native void nglDeleteBuffersARB(int n, IntBuffer buffers, int buffers_offset); - public static void glGenBuffersARB(IntBuffer buffers) { - nglGenBuffersARB(buffers.remaining(), buffers, buffers.position()); - } - private static native void nglGenBuffersARB(int n, IntBuffer buffers, int buffers_offset); - public static native boolean glIsBufferARB(int buffer); - public static void glBufferDataARB(int target, int size, ByteBuffer data, int usage) { - nglBufferDataARB(target, size, data, data != null ? data.position() : 0, usage); - } - public static void glBufferDataARB(int target, int size, ShortBuffer data, int usage) { - nglBufferDataARB(target, size, data, data != null ? data.position()<<1 : 0, usage); - } - public static void glBufferDataARB(int target, int size, FloatBuffer data, int usage) { - nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage); - } - public static void glBufferDataARB(int target, int size, IntBuffer data, int usage) { - nglBufferDataARB(target, size, data, data != null ? data.position()<<2 : 0, usage); - } - private static native void nglBufferDataARB(int target, int size, Buffer data, int data_offset, int usage); - public static void glBufferSubDataARB(int target, int offset, ByteBuffer data) { - nglBufferSubDataARB(target, offset, data.remaining(), data, data.position()); - } - public static void glBufferSubDataARB(int target, int offset, ShortBuffer data) { - nglBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1); - } - public static void glBufferSubDataARB(int target, int offset, FloatBuffer data) { - nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); - } - public static void glBufferSubDataARB(int target, int offset, IntBuffer data) { - nglBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); - } - private static native void nglBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset); - public static void glGetBufferSubDataARB(int target, int offset, ByteBuffer data) { - nglGetBufferSubDataARB(target, offset, data.remaining(), data, data.position()); - } - public static void glGetBufferSubDataARB(int target, int offset, ShortBuffer data) { - nglGetBufferSubDataARB(target, offset, data.remaining()<<1, data, data.position()<<1); - } - public static void glGetBufferSubDataARB(int target, int offset, IntBuffer data) { - nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); - } - public static void glGetBufferSubDataARB(int target, int offset, FloatBuffer data) { - nglGetBufferSubDataARB(target, offset, data.remaining()<<2, data, data.position()<<2); - } - private static native void nglGetBufferSubDataARB(int target, int offset, int size, Buffer data, int data_offset); - /** - * glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in - * which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, - * it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created. - * That way, an application will normally use glMapBufferARB like this: - * - * ByteBuffer mapped_buffer; - * mapped_buffer = glMapBufferARB(..., ..., ..., null); - * ... - * // Another map on the same buffer - * mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer); - * - * @param size The size of the buffer area. - * @param oldBuffer A ByteBuffer. If this argument points to the same address as the new mapping, it will be returned and - * no new buffer will be created. In that case, size is ignored. - * @return A ByteBuffer representing the mapped buffer memory. - */ - public static native ByteBuffer glMapBufferARB(int target, int access, int size, ByteBuffer oldBuffer); - public static native boolean glUnmapBufferARB(int target); - public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { - BufferChecks.checkBuffer(params); - nglGetBufferParameterivARB(target, pname, params, params.position()); - } - private static native void nglGetBufferParameterivARB(int target, int pname, IntBuffer params, int params_offset); - public static native ByteBuffer glGetBufferPointerARB(int target, int pname, int size); + } Index: ARBProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBProgram.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBProgram.java 1 Mar 2004 00:58:53 -0000 1.4 +++ ARBProgram.java 29 Mar 2004 16:44:36 -0000 1.5 @@ -45,7 +45,7 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; -class ARBProgram { +public final class ARBProgram { /* * Accepted by the <format> parameter of ProgramStringARB: |
|
From: Elias N. <eli...@us...> - 2004-03-29 11:40:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31821/src/java/org/lwjgl/opengl Modified Files: VBOTracker.java Log Message: The client attrib stack tracked by VBOTracter is now at least 1 Index: VBOTracker.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/VBOTracker.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- VBOTracker.java 26 Mar 2004 11:26:03 -0000 1.11 +++ VBOTracker.java 29 Mar 2004 11:28:36 -0000 1.12 @@ -48,7 +48,7 @@ private final StateStack attrib_stack; private VBOTracker() { - int stack_size = Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH); + int stack_size = Math.max(1, Util.glGetInteger(GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH)); vbo_array_stack = new StateStack(stack_size, 0); vbo_element_stack = new StateStack(stack_size, 0); attrib_stack = new StateStack(stack_size, 0); |
|
From: Elias N. <eli...@us...> - 2004-03-29 11:37:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31548/linux Modified Files: org_lwjgl_opengl_Pbuffer.cpp org_lwjgl_opengl_Window.cpp Log Message: added missing software flag checks in linux Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- org_lwjgl_opengl_Window.cpp 27 Mar 2004 14:09:54 -0000 1.25 +++ org_lwjgl_opengl_Window.cpp 29 Mar 2004 11:26:26 -0000 1.26 @@ -441,7 +441,8 @@ throwException(env, "Could not create a GLX context"); return false; } - if (glXIsDirect(disp, context) == False) { + jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL"); + if (!allow_software_acceleration && glXIsDirect(disp, context) == False) { glXDestroyContext(disp, context); XFree(vis_info); throwException(env, "Could not create a direct GLX context"); Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- org_lwjgl_opengl_Pbuffer.cpp 7 Mar 2004 15:18:47 -0000 1.11 +++ org_lwjgl_opengl_Pbuffer.cpp 29 Mar 2004 11:26:26 -0000 1.12 @@ -131,7 +131,8 @@ throwException(env, "Could not create a GLX context"); return false; } - if (glXIsDirect(getCurrentDisplay(), context) == False) { + jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL"); + if (!allow_software_acceleration && glXIsDirect(getCurrentDisplay(), context) == False) { glXDestroyContext(getCurrentDisplay(), context); XFree(configs); throwException(env, "Could not create a direct GLX context"); |
|
From: Elias N. <eli...@us...> - 2004-03-29 08:05:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22886/src/java/org/lwjgl/opengl Modified Files: ARBFragmentProgram.java NVFragmentProgram.java NVProgram.java Log Message: Fixed newlines Index: NVProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVProgram.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- NVProgram.java 8 Feb 2004 20:35:17 -0000 1.1 +++ NVProgram.java 29 Mar 2004 07:53:36 -0000 1.2 @@ -1 +1,149 @@ -/* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /* * Created by LWJGL. * User: spasi * Date: 2003-11-28 * Time: 18:39:30 */ package org.lwjgl.opengl; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.IntBuffer; class NVProgram { /* Accepted by the <pname> parameter of GetProgramivNV: */ public static final int GL_PROGRAM_TARGET_NV = 0x8646; public static final int GL_PROGRAM_LENGTH_NV = 0x8627; public static final int GL_PROGRAM_RESIDENT_NV = 0x8647; /* Accepted by the <pname> parameter of GetProgramStringNV: */ public static final int GL_PROGRAM_STRING_NV = 0x8628; /* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: */ public static final int GL_PROGRAM_ERROR_POSITION_NV = 0x864B; /* Accepted by the <name> parameter of GetString: */ public static final int GL_PROGRAM_ERROR_STRING_NV = 0x8874; // --------------------------- public static void glLoadProgramNV(int target, int programID, ByteBuffer string) { nglLoadProgramNV(target, programID, string.remaining(), string, string.position()); } private static native void nglLoadProgramNV(int target, int programID, int length, Buffer string, int stringOffset); // --------------------------- public static native void glBindProgramNV(int target, int programID); // --------------------------- public static void glDeleteProgramsNV(IntBuffer programs) { nglDeleteProgramsNV(programs.remaining(), programs, programs.position()); } private static native void nglDeleteProgramsNV(int n, IntBuffer programs, int programsOffset); // --------------------------- // --------------------------- public static void glGenProgramsNV(IntBuffer programs) { nglGenProgramsNV(programs.remaining(), programs, programs.position()); } private static native void nglGenProgramsNV(int n, IntBuffer programs, int programsOffset); // --------------------------- // --------------------------- public static void glGetProgramNV(int programID, int parameterName, IntBuffer params) { nglGetProgramivNV(programID, parameterName, params, params.position()); } private static native void nglGetProgramivNV(int programID, int parameterName, IntBuffer params, int paramsOffset); // --------------------------- // --------------------------- public static void glGetProgramStringNV(int programID, int parameterName, ByteBuffer paramString) { nglGetProgramStringNV(programID, parameterName, paramString, paramString.position()); } private static native void nglGetProgramStringNV( int programID, int parameterName, Buffer paramString, int paramStringOffset); // --------------------------- public static native boolean glIsProgramNV(int programID); // --------------------------- public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) { assert programIDs.remaining() == programResidences.remaining() : "programIDs.remaining() != programResidences.remaining()"; return nglAreProgramsResidentNV( programIDs.remaining(), programIDs, programIDs.position(), programResidences, programResidences.position()); } private static native boolean nglAreProgramsResidentNV( int n, IntBuffer programIDs, int programIDsOffset, ByteBuffer programResidences, int programResidencesOffset); // --------------------------- // --------------------------- public static void glRequestResidentProgramsNV(IntBuffer programIDs) { nglRequestResidentProgramsNV(programIDs.remaining(), programIDs, programIDs.position()); } private static native void nglRequestResidentProgramsNV(int n, IntBuffer programIDs, int programIDsOffset); // --------------------------- } \ No newline at end of file +/* + * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. + */ + +/* + * Created by LWJGL. + * User: spasi + * Date: 2003-11-28 + * Time: 18:39:30 + */ + +package org.lwjgl.opengl; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +class NVProgram { + + /* + Accepted by the <pname> parameter of GetProgramivNV: + */ + public static final int GL_PROGRAM_TARGET_NV = 0x8646; + public static final int GL_PROGRAM_LENGTH_NV = 0x8627; + public static final int GL_PROGRAM_RESIDENT_NV = 0x8647; + + /* + Accepted by the <pname> parameter of GetProgramStringNV: + */ + public static final int GL_PROGRAM_STRING_NV = 0x8628; + + /* + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + public static final int GL_PROGRAM_ERROR_POSITION_NV = 0x864B; + + /* + Accepted by the <name> parameter of GetString: + */ + public static final int GL_PROGRAM_ERROR_STRING_NV = 0x8874; + + // --------------------------- + public static void glLoadProgramNV(int target, int programID, ByteBuffer string) { + nglLoadProgramNV(target, programID, string.remaining(), string, string.position()); + } + + private static native void nglLoadProgramNV(int target, int programID, int length, Buffer string, int stringOffset); + + // --------------------------- + public static native void glBindProgramNV(int target, int programID); + // --------------------------- + + public static void glDeleteProgramsNV(IntBuffer programs) { + nglDeleteProgramsNV(programs.remaining(), programs, programs.position()); + } + + private static native void nglDeleteProgramsNV(int n, IntBuffer programs, int programsOffset); + + // --------------------------- + + // --------------------------- + public static void glGenProgramsNV(IntBuffer programs) { + nglGenProgramsNV(programs.remaining(), programs, programs.position()); + } + + private static native void nglGenProgramsNV(int n, IntBuffer programs, int programsOffset); + + // --------------------------- + + // --------------------------- + public static void glGetProgramNV(int programID, int parameterName, IntBuffer params) { + nglGetProgramivNV(programID, parameterName, params, params.position()); + } + + private static native void nglGetProgramivNV(int programID, int parameterName, IntBuffer params, int paramsOffset); + // --------------------------- + + // --------------------------- + public static void glGetProgramStringNV(int programID, int parameterName, ByteBuffer paramString) { + nglGetProgramStringNV(programID, parameterName, paramString, paramString.position()); + } + + private static native void nglGetProgramStringNV( + int programID, + int parameterName, + Buffer paramString, + int paramStringOffset); + // --------------------------- + + public static native boolean glIsProgramNV(int programID); + + // --------------------------- + public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) { + if (programIDs.remaining() != programResidences.remaining()) + throw new IllegalArgumentException("programIDs.remaining() != programResidences.remaining()"); + return nglAreProgramsResidentNV( + programIDs.remaining(), + programIDs, + programIDs.position(), + programResidences, + programResidences.position()); + } + + private static native boolean nglAreProgramsResidentNV( + int n, + IntBuffer programIDs, + int programIDsOffset, + ByteBuffer programResidences, + int programResidencesOffset); + // --------------------------- + + // --------------------------- + public static void glRequestResidentProgramsNV(IntBuffer programIDs) { + nglRequestResidentProgramsNV(programIDs.remaining(), programIDs, programIDs.position()); + } + + private static native void nglRequestResidentProgramsNV(int n, IntBuffer programIDs, int programIDsOffset); + // --------------------------- +} + Index: NVFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVFragmentProgram.java 18 Feb 2004 23:54:46 -0000 1.3 +++ NVFragmentProgram.java 29 Mar 2004 07:53:36 -0000 1.4 @@ -1 +1,117 @@ -/* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /* * Created by LWJGL. * User: spasi * Date: 2003-11-28 * Time: 18:59:45 */ package org.lwjgl.opengl; import java.nio.ByteBuffer; import java.nio.FloatBuffer; public final class NVFragmentProgram extends NVProgram { /* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, and by the <target> parameter of BindProgramNV, LoadProgramNV, ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB, ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB, GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB: */ public static final int GL_FRAGMENT_PROGRAM_NV = 0x8870; /* Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: */ public static final int GL_MAX_TEXTURE_COORDS_NV = 0x8871; public static final int GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872; public static final int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873; public static final int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; // --------------------------- public static void glProgramNamedParameter4fNV(int id, ByteBuffer name, float x, float y, float z, float w) { nglProgramNamedParameter4fNV(id, name.remaining(), name, name.position(), x, y, z, w); } private static native void nglProgramNamedParameter4fNV( int id, int length, ByteBuffer name, int nameOffset, float x, float y, float z, float w); // --------------------------- // --------------------------- public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetProgramNamedParameterfvNV(id, name.remaining(), name, name.position(), params, params.position()); } private static native void nglGetProgramNamedParameterfvNV( int id, int length, ByteBuffer name, int nameOffset, FloatBuffer params, int paramsOffset); // --------------------------- public static native void glProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w); // --------------------------- public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) { BufferChecks.checkBuffer(params); nglGetProgramLocalParameterfvARB(target, index, params, params.position()); } private static native void nglGetProgramLocalParameterfvARB( int target, int index, FloatBuffer params, int params_offset); // --------------------------- } \ No newline at end of file +/* + * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. + */ + +/* + * Created by LWJGL. + * User: spasi + * Date: 2003-11-28 + * Time: 18:59:45 + */ + +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; + +public final class NVFragmentProgram extends NVProgram { + + /* + Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + and by the <target> parameter of BindProgramNV, LoadProgramNV, + ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB, + ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB, + GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB: + */ + public static final int GL_FRAGMENT_PROGRAM_NV = 0x8870; + + /* + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_COORDS_NV = 0x8871; + public static final int GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872; + public static final int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873; + public static final int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; + + // --------------------------- + + public static void glProgramNamedParameter4fNV(int id, ByteBuffer name, float x, float y, float z, float w) { + nglProgramNamedParameter4fNV(id, name.remaining(), name, name.position(), x, y, z, w); + } + + private static native void nglProgramNamedParameter4fNV( + int id, + int length, + ByteBuffer name, + int nameOffset, + float x, + float y, + float z, + float w); + + // --------------------------- + + // --------------------------- + + public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) { + BufferChecks.checkBuffer(params); + nglGetProgramNamedParameterfvNV(id, name.remaining(), name, name.position(), params, params.position()); + } + + private static native void nglGetProgramNamedParameterfvNV( + int id, + int length, + ByteBuffer name, + int nameOffset, + FloatBuffer params, + int paramsOffset); + + // --------------------------- + + public static native void glProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w); + + // --------------------------- + + public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) { + BufferChecks.checkBuffer(params); + nglGetProgramLocalParameterfvARB(target, index, params, params.position()); + } + + private static native void nglGetProgramLocalParameterfvARB( + int target, + int index, + FloatBuffer params, + int params_offset); + // --------------------------- +} + Index: ARBFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBFragmentProgram.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBFragmentProgram.java 18 Feb 2004 23:54:46 -0000 1.4 +++ ARBFragmentProgram.java 29 Mar 2004 07:53:36 -0000 1.5 @@ -1 +1,70 @@ -/* * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. */ /* * Created by zDimensions. User: spasi Date: 2003-11-28 Time: 16:41:02 */ package org.lwjgl.opengl; public final class ARBFragmentProgram extends ARBProgram { /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, * and by the <target> parameter of ProgramStringARB, BindProgramARB, * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, * GetProgramivARB and GetProgramStringARB. */ public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804; /* * Accepted by the <pname> parameter of GetProgramivARB: */ public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805; public static final int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806; public static final int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807; public static final int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808; public static final int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809; public static final int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A; public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B; public static final int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C; public static final int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D; public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E; public static final int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F; public static final int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; /* * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, * and GetDoublev: */ public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; } \ No newline at end of file +/* + * Copyright (c) 2002 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. + */ + +/* + * Created by zDimensions. User: spasi Date: 2003-11-28 Time: 16:41:02 + */ + +package org.lwjgl.opengl; + +public final class ARBFragmentProgram extends ARBProgram { + + /* + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of ProgramStringARB, BindProgramARB, + * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, + * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, + * GetProgramivARB and GetProgramStringARB. + */ + public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804; + + /* + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805; + public static final int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806; + public static final int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807; + public static final int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808; + public static final int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809; + public static final int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A; + public static final int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B; + public static final int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C; + public static final int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D; + public static final int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E; + public static final int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F; + public static final int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; + + /* + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; + public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; +} + |
|
From: Elias N. <eli...@us...> - 2004-03-29 07:44:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19595/src/java/org/lwjgl/opengl Modified Files: GL11.java GL15.java Log Message: Fixed naming Index: GL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL11.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GL11.java 7 Mar 2004 15:18:45 -0000 1.11 +++ GL11.java 29 Mar 2004 07:32:37 -0000 1.12 @@ -1114,12 +1114,12 @@ 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 glLightfv(int light, int pname, FloatBuffer params) { + 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 glLightiv(int light, int pname, IntBuffer params) { + public static void glLight(int light, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglLightiv(light, pname, params, params.position()); } @@ -1176,7 +1176,7 @@ 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 glMultMatrixf(FloatBuffer m) { + public static void glMultMatrix(FloatBuffer m) { BufferChecks.checkBuffer(m, 16); nglMultMatrixf(m, m.position()); } Index: GL15.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL15.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- GL15.java 27 Mar 2004 11:55:07 -0000 1.4 +++ GL15.java 29 Mar 2004 07:32:37 -0000 1.5 @@ -273,7 +273,7 @@ // --------------------------- // --------------------------- - public static void glGetQueryObjecti(int id, int pname, IntBuffer params) { + public static void glGetQueryObject(int id, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetQueryObjectiv(id, pname, params, params.position()); } @@ -285,7 +285,7 @@ // --------------------------- // --------------------------- - public static void glGetQueryObjectui(int id, int pname, IntBuffer params) { + public static void glGetQueryObjectu(int id, int pname, IntBuffer params) { BufferChecks.checkBuffer(params); nglGetQueryObjectuiv(id, pname, params, params.position()); } |
|
From: Elias N. <eli...@us...> - 2004-03-29 07:44:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19595/src/java/org/lwjgl/test/opengl Modified Files: Grass.java Log Message: Fixed naming Index: Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Grass.java 26 Mar 2004 11:26:03 -0000 1.31 +++ Grass.java 29 Mar 2004 07:32:37 -0000 1.32 @@ -165,14 +165,14 @@ light_buf_f.put(LightDiffuse); light_buf_f.flip(); - GL11.glLightfv( + GL11.glLight( GL11.GL_LIGHT0, GL11.GL_DIFFUSE, light_buf_f); light_buf_f.clear(); light_buf_f.put(LightPosition); light_buf_f.flip(); - GL11.glLightfv( + GL11.glLight( GL11.GL_LIGHT0, GL11.GL_POSITION, light_buf_f); |
|
From: Elias N. <eli...@us...> - 2004-03-29 07:44:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19595/src/java/org/lwjgl/opengl/glu Modified Files: Project.java Log Message: Fixed naming Index: Project.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu/Project.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Project.java 22 Mar 2004 10:02:50 -0000 1.9 +++ Project.java 29 Mar 2004 07:32:37 -0000 1.10 @@ -188,7 +188,7 @@ matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ); matrix.put(3 * 4 + 3, 0); - GL11.glMultMatrixf(matrix); + GL11.glMultMatrix(matrix); } /** @@ -248,7 +248,7 @@ matrix.put(1 * 4 + 2, -forward[1]); matrix.put(2 * 4 + 2, -forward[2]); - GL11.glMultMatrixf(matrix); + GL11.glMultMatrix(matrix); GL11.glTranslatef(-eyex, -eyey, -eyez); } |