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: 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); } |
|
From: Ioannis T. <sp...@us...> - 2004-03-28 20:41:16
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30986 Modified Files: Window.java Log Message: Fixed vsync bug Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- Window.java 27 Mar 2004 15:05:23 -0000 1.35 +++ Window.java 28 Mar 2004 20:29:52 -0000 1.36 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 Light Weight 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. */ @@ -35,7 +35,7 @@ /** * This is the abstract class for a Window in LWJGL. LWJGL windows have some * peculiar characteristics: - * + * * - width and height are always fixed and cannot be changed * - the position of the window may or may not be programmable but once specified * cannot be changed programmatically @@ -43,7 +43,7 @@ * by the user or operating system * - only one window may ever be open at once * - the operating system may or may not be able to do fullscreen or windowed windows. - * + * * @author foo */ @@ -81,15 +81,12 @@ /** Fullscreen */ private static boolean fullscreen; - /** Vsync */ - private static boolean vsync; - /** Tracks VBO state for the window context */ private static VBOTracker vbo_tracker; - + /** A unique context object, so we can track different contexts between creates() and destroys() */ private static Window context; - + /** Whether we created the Mouse */ private static boolean createdMouse; @@ -195,7 +192,7 @@ * Minimize the game and allow the operating system's default display to become * visible. It is the responsibility of LWJGL's native code to restore the display * to its normal display settings. - * + * * If the display is already minimized then this is a no-op. */ public static native void minimize(); @@ -203,7 +200,7 @@ /** * Restore the game and hide the operating system away. It is the responsibility of * LWJGL's native code to restore the display to its game display settings. - * + * * If the display is not minimized then this is a no-op/ */ public static native void restore(); @@ -214,7 +211,7 @@ * every frame regardless, you can ignore this flag altogether. If you are * trying to be kind to other processes you can check this flag and only * redraw when it returns true. The flag is cleared when you call paint(). - * + * * @return true if the window has been damaged by external changes * and needs to repaint itself */ @@ -233,7 +230,7 @@ */ public static void update() { if (!isCreated()) - throw new IllegalStateException("Cannot determine update uncreated window"); + throw new IllegalStateException("Cannot update uncreated window"); nUpdate(); if ((isDirty() && !isMinimized()) || (isFocused() && !isMinimized())) { Util.checkGLError(); @@ -265,7 +262,7 @@ * Swap double buffers. */ private static native void swapBuffers(); - + /** * Make the Window the current rendering context for GL calls. */ @@ -275,12 +272,12 @@ nMakeCurrent(); GLContext.useContext(context); } - + /** * Make the window the current rendering context for GL calls. */ private static native void nMakeCurrent(); - + /** * Create a fullscreen window that matches the current display depth. Default common values are chosen * for common OpenGL rendering operations: you will get at least a 16-bit depth buffer, an 8 bit stencil @@ -309,7 +306,7 @@ public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLException { create(title, bpp, alpha, depth, stencil, 0); } - + /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this @@ -351,8 +348,6 @@ * @param bpp Minimum bits per pixel * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer - * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). - Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ @@ -475,7 +470,7 @@ if (context == null) { return; } - + // Automatically destroy keyboard, mouse, and controller if (createdMouse && Mouse.isCreated()) { Mouse.destroy(); @@ -489,12 +484,12 @@ Controller.destroy(); createdController = false; } - + makeCurrent(); nDestroy(); context = null; } - + /** * @return the unique Window context (or null, if the Window has not been created) */ @@ -505,7 +500,7 @@ /** * Destroy the native window peer. */ - private native static void nDestroy(); + private static native void nDestroy(); /** * @return true if the window's native peer has been created @@ -530,13 +525,13 @@ * @return boolean */ public static boolean isVSyncEnabled() { - if (isCreated()) + if (!isCreated()) throw new IllegalStateException("Cannot determine vsync state of uncreated window"); return nIsVSyncEnabled(); } private static native boolean nIsVSyncEnabled(); - + /** * Enable or disable vertical monitor synchronization. This call is a best-attempt at changing * the vertical refresh synchronization of the monitor, and is not guaranteed to be successful. @@ -544,7 +539,7 @@ * @param sync true to synchronize; false to ignore synchronization */ public static void setVSyncEnabled(boolean sync) { - if (isCreated()) + if (!isCreated()) throw new IllegalStateException("Cannot set vsync state of uncreated window"); nSetVSyncEnabled(sync); } |
|
From: Brian M. <ma...@us...> - 2004-03-28 20:10:32
|
Update of /cvsroot/java-game-lib/LWJGL/website/site2/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24622 Modified Files: default.php Log Message: disabled demo for the time being Index: default.php =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/website/site2/include/default.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- default.php 25 Mar 2004 10:33:05 -0000 1.2 +++ default.php 28 Mar 2004 19:59:11 -0000 1.3 @@ -10,7 +10,7 @@ "forum", "http://forum.lwjgl.org/", "_blank", "faq", "faq.php", "_top", "projects", "projects.php", "_top", - "demos", "demos.php", "_top", +// "demos", "demos.php", "_top", "license", "license.php", "_top", "contact", "contact.php", "_top", "credits", "credits.php", "_top"); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:19:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/java/org/lwjgl Modified Files: Sys.java Log Message: Implemented version check to check for incompatible native libraries Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Sys.java 27 Mar 2004 13:48:57 -0000 1.43 +++ Sys.java 27 Mar 2004 14:09:53 -0000 1.44 @@ -47,6 +47,8 @@ * @version $Revision$ */ public final class Sys { + public static final String VERSION = "0.9pre"; + /** Low process priority. @see #setProcessPriority() */ public static final int LOW_PRIORITY = -1; @@ -78,9 +80,9 @@ /** The native library name */ private static String LIBRARY_NAME = "lwjgl"; - - /** The platform being executed on */ - private static String PLATFORM; + + /** The platform being executed on */ + private static String PLATFORM; /** * Debug flag. @@ -91,12 +93,6 @@ static { initialize(); - - // check platform name, and default to awt - PLATFORM = System.getProperty("org.lwjgl.Sys.platform"); - if(PLATFORM == null) { - PLATFORM = "org.lwjgl.SwingAdapter"; - } } /** @@ -130,9 +126,19 @@ return; initialized = true; System.loadLibrary(LIBRARY_NAME); + String native_version = getNativeLibraryVersion(); + if (!native_version.equals(VERSION)) + throw new IllegalStateException("Version mismatch: jar version is '" + VERSION + + "', native libary version is '" + native_version + "'"); setDebug(DEBUG); setTime(0); + // check platform name, and default to awt + PLATFORM = System.getProperty("org.lwjgl.Sys.platform"); + if(PLATFORM == null) { + PLATFORM = "org.lwjgl.SwingAdapter"; + } + Runtime.getRuntime().addShutdownHook(new Thread() { public void run() { Display.resetDisplayMode(); @@ -148,7 +154,12 @@ } /** - * Set the debug level of the native library + * Return the version of the native library + */ + private static native String getNativeLibraryVersion(); + + /** + * Set the debug level of the native library */ private static native void setDebug(boolean debug); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:17:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/common Modified Files: checkALerror.h common_tools.cpp common_tools.h org_lwjgl_Sys.h Log Message: Implemented version check to check for incompatible native libraries Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- org_lwjgl_Sys.h 26 Feb 2004 21:54:05 -0000 1.20 +++ org_lwjgl_Sys.h 27 Mar 2004 14:09:54 -0000 1.21 @@ -16,7 +16,17 @@ #undef org_lwjgl_Sys_REALTIME_PRIORITY #define org_lwjgl_Sys_REALTIME_PRIORITY 2L /* Inaccessible static: LIBRARY_NAME */ +/* Inaccessible static: PLATFORM */ /* Inaccessible static: DEBUG */ +/* Inaccessible static: initialized */ +/* + * Class: org_lwjgl_Sys + * Method: getNativeLibraryVersion + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion + (JNIEnv *, jclass); + /* * Class: org_lwjgl_Sys * Method: setDebug Index: checkALerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkALerror.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- checkALerror.h 20 Dec 2003 22:03:24 -0000 1.9 +++ checkALerror.h 27 Mar 2004 14:09:54 -0000 1.10 @@ -16,7 +16,7 @@ #define CHECK_AL_ERROR \ { \ - if (ISDEBUGENABLED()) { \ + if (isDebugEnabled()) { \ int err = alGetError(); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ @@ -28,7 +28,7 @@ /* only available if deviceaddress is specified in method */ #define CHECK_ALC_ERROR \ { \ - if (ISDEBUGENABLED()) { \ + if (isDebugEnabled()) { \ int err = alcGetError((ALCdevice*) deviceaddress); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- common_tools.cpp 26 Mar 2004 21:11:20 -0000 1.14 +++ common_tools.cpp 27 Mar 2004 14:09:54 -0000 1.15 @@ -40,7 +40,16 @@ #include <stdlib.h> #include "common_tools.h" -bool debug = false; +static bool debug = false; +static const char* VERSION = "0.9pre"; + +jstring getVersionString(JNIEnv *env) { + return env->NewStringUTF(VERSION); +} + +bool isDebugEnabled(void) { + return debug; +} void setDebugEnabled(bool enable) { debug = enable; @@ -49,7 +58,7 @@ void printfDebug(const char *format, ...) { va_list ap; va_start(ap, format); - if (ISDEBUGENABLED()) + if (isDebugEnabled()) vfprintf(stderr, format, ap); va_end(ap); } Index: common_tools.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- common_tools.h 26 Mar 2004 21:11:20 -0000 1.13 +++ common_tools.h 27 Mar 2004 14:09:54 -0000 1.14 @@ -43,11 +43,8 @@ #include <jni.h> #include "org_lwjgl_Sys.h" -extern bool debug; - // Must be x * max_event_size + 1 #define EVENT_BUFFER_SIZE (25 * 4 + 1) -#define ISDEBUGENABLED() (debug) typedef struct { unsigned char input_event_buffer[EVENT_BUFFER_SIZE]; @@ -56,6 +53,8 @@ int list_end; } event_queue_t; +extern bool isDebugEnabled(void); +extern jstring getVersionString(JNIEnv *env); extern void initEventQueue(event_queue_t *event_queue); extern int copyEvents(event_queue_t *event_queue, unsigned char *output_event_buffer, int buffer_size, int event_size); extern void putEventElement(event_queue_t *queue, unsigned char byte); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/opengl Modified Files: Pbuffer.java Window.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Pbuffer.java 27 Mar 2004 14:42:46 -0000 1.14 +++ Pbuffer.java 27 Mar 2004 15:05:23 -0000 1.15 @@ -33,7 +33,7 @@ package org.lwjgl.opengl; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; import java.nio.IntBuffer; @@ -160,7 +160,7 @@ } /** - * Construct an instance of a Pbuffer. If this fails then an LWJGLErrorException will be thrown. The buffer is single-buffered. + * Construct an instance of a Pbuffer. If this fails then an LWJGLException will be thrown. The buffer is single-buffered. * <p/> * NOTE: An OpenGL window must be created before a Pbuffer can be created. The Pbuffer will have its own context that shares * display lists and textures with the OpenGL window context, but it will have its own OpenGL state. Therefore, state changes @@ -183,7 +183,7 @@ * 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @param renderTexture */ - public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLErrorException { + public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLException { this.width = width; this.height = height; @@ -241,7 +241,7 @@ int bpp, int alpha, int depth, int stencil, int samples, IntBuffer pixelFormatCaps, int pixelFormatCapsSize, - IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLErrorException; + IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLException; /** * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- Window.java 27 Mar 2004 14:42:46 -0000 1.34 +++ Window.java 27 Mar 2004 15:05:23 -0000 1.35 @@ -52,7 +52,7 @@ import org.lwjgl.input.Controller; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; public final class Window { @@ -287,33 +287,33 @@ * buffer, probably no alpha buffer, and probably no multisampling. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title - * @throws LWJGLErrorException + * @throws LWJGLException */ - public static void create(String title) throws LWJGLErrorException { + public static void create(String title) throws LWJGLException { create(title, Display.getDepth(), 0, 16, 8, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an LWJGLErrorException will be thrown. + * fails too then an LWJGLException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { + public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLException { create(title, bpp, alpha, depth, stencil, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an LWJGLErrorException will be thrown. + * fails too then an LWJGLException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel @@ -322,10 +322,10 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { + public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = true; @@ -339,7 +339,7 @@ /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. + * display will be created instead. If this fails too then an LWJGLException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -353,16 +353,16 @@ * @param depth Minimum bits per pixel in depth buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { + public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLException { create(title, x, y, width, height, bpp, alpha, depth, stencil, 0); } /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. + * display will be created instead. If this fails too then an LWJGLException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -377,11 +377,11 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws LWJGLErrorException if the window could not be created for any reason; typically because + * @throws LWJGLException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) - throws LWJGLErrorException { + throws LWJGLException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = false; @@ -395,7 +395,7 @@ /** * Create the native window peer. - * @throws LWJGLErrorException + * @throws LWJGLException */ private static native void nCreate( String title, @@ -409,9 +409,9 @@ int depth, int stencil, int samples) - throws LWJGLErrorException; + throws LWJGLException; - private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { + private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLException { nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples); context = new Window(); makeCurrent(); @@ -431,7 +431,7 @@ Mouse.create(); createdMouse = true; Mouse.enableBuffer(); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -445,7 +445,7 @@ createdKeyboard = true; Keyboard.enableBuffer(); Keyboard.enableTranslation(); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -457,7 +457,7 @@ try { Controller.create(); createdController = true; - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/native/common Modified Files: common_tools.cpp Log Message: Renamed LWJGLErrorException to LWJGLException Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- common_tools.cpp 27 Mar 2004 14:42:47 -0000 1.16 +++ common_tools.cpp 27 Mar 2004 15:05:24 -0000 1.17 @@ -120,7 +120,7 @@ } void throwException(JNIEnv * env, const char * err) { - throwGeneralException(env, "org/lwjgl/LWJGLErrorException", err); + throwGeneralException(env, "org/lwjgl/LWJGLException", err); } void doExtension(JNIEnv *env, jobject ext_set, const char *method_name, const char *ext) { |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/openal Modified Files: AL.java ALC.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ALC.java 27 Mar 2004 14:42:46 -0000 1.16 +++ ALC.java 27 Mar 2004 15:05:23 -0000 1.17 @@ -35,7 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -159,9 +159,9 @@ /** * Creates the ALC instance * - * @throws LWJGLErrorException if a failiure occured in the ALC creation process + * @throws LWJGLException if a failiure occured in the ALC creation process */ - protected static void create() throws LWJGLErrorException { + protected static void create() throws LWJGLException { if (created) { return; } Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- AL.java 27 Mar 2004 14:42:46 -0000 1.20 +++ AL.java 27 Mar 2004 15:05:23 -0000 1.21 @@ -37,7 +37,7 @@ import org.lwjgl.Display; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -87,7 +87,7 @@ * @param oalPaths Array of strings containing paths to search for OpenAL library * @return true if the AL creation process succeeded */ - protected static native void nCreate(String[] oalPaths) throws LWJGLErrorException; + protected static native void nCreate(String[] oalPaths) throws LWJGLException; /** * Native method the destroy the AL @@ -112,7 +112,7 @@ * @param contextSynchronized Flag, indicating a synchronous context.* */ public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws LWJGLErrorException { + throws LWJGLException { if (created) { return; @@ -131,7 +131,7 @@ * Creates an OpenAL instance. The empty create will cause OpenAL to * open the default device, and create a context using default values. */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if(created) { return; } @@ -152,7 +152,7 @@ jwsLibname = "openal"; break; default: - throw new LWJGLErrorException("Unknown platform"); + throw new LWJGLException("Unknown platform"); } String jwsPath = getPathFromJWS(jwsLibname); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Controller.java 27 Mar 2004 14:42:46 -0000 1.15 +++ Controller.java 27 Mar 2004 15:05:22 -0000 1.16 @@ -37,7 +37,7 @@ import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -164,9 +164,9 @@ /** * "Create" the controller. The display must first have been created. - * @throws LWJGLErrorException if the controller could not be created for any reason + * @throws LWJGLException if the controller could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Controller"); initialize(); @@ -268,7 +268,7 @@ /** * Native method to create the controller */ - private static native void nCreate() throws LWJGLErrorException; + private static native void nCreate() throws LWJGLException; /** * Native method the destroy the controller Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Cursor.java 27 Mar 2004 14:42:46 -0000 1.19 +++ Cursor.java 27 Mar 2004 15:05:22 -0000 1.20 @@ -37,7 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -69,9 +69,9 @@ * @param numImages number of cursor images specified. Must be 1 if animations are not supported. * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws LWJGLErrorException if the cursor could not be created for any reason + * @throws LWJGLException if the cursor could not be created for any reason */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); if (width*height*numImages > images.remaining()) @@ -95,7 +95,7 @@ /** * Creates the actual cursor, using a platform specific class */ - private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { + private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { // create copy and flip images to match ogl IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); flipImages(width, height, numImages, images, images_copy); Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Keyboard.java 27 Mar 2004 14:42:46 -0000 1.43 +++ Keyboard.java 27 Mar 2004 15:05:23 -0000 1.44 @@ -41,7 +41,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -285,9 +285,9 @@ * "Create" the keyboard. The display must first have been created. The * reason for this is so the keyboard has a window to "focus" in. * - * @throws LWJGLErrorException if the keyboard could not be created for any reason + * @throws LWJGLException if the keyboard could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Keyboard"); if (!initialized) @@ -301,7 +301,7 @@ /** * Native method to create the keyboard */ - private static native void nCreate() throws LWJGLErrorException; + private static native void nCreate() throws LWJGLException; /** * @return true if the keyboard has been created @@ -389,7 +389,7 @@ * Enable keyboard translation. Must be called after the keyboard is created, * and keyboard buffering must be enabled. */ - public static void enableTranslation() throws LWJGLErrorException { + public static void enableTranslation() throws LWJGLException { if (!created) throw new IllegalStateException("Keyboard must be created before you can read events"); if (readBuffer == null) @@ -401,12 +401,12 @@ /** * Native method to enable the translation buffer */ - private static native void nEnableTranslation() throws LWJGLErrorException; + private static native void nEnableTranslation() throws LWJGLException; /** * Enable keyboard buffering. Must be called after the keyboard is created. */ - public static void enableBuffer() throws LWJGLErrorException { + public static void enableBuffer() throws LWJGLException { if (!created) throw new IllegalStateException("Keyboard must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(4*BUFFER_SIZE); @@ -419,7 +419,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws LWJGLErrorException; + private static native void nEnableBuffer() throws LWJGLException; /** * Checks to see if a key is down. Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Mouse.java 27 Mar 2004 14:42:46 -0000 1.45 +++ Mouse.java 27 Mar 2004 15:05:23 -0000 1.46 @@ -39,7 +39,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -165,9 +165,9 @@ * * @param cursor the native cursor object to bind. May be null. * @return The previous Cursor object set, or null. - * @throws LWJGLErrorException if the cursor could not be set for any reason + * @throws LWJGLException if the cursor could not be set for any reason */ - public static Cursor setNativeCursor(Cursor cursor) throws LWJGLErrorException { + public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { if (!created) throw new IllegalStateException("Create the Mouse before setting the native cursor"); if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) @@ -184,7 +184,7 @@ } /** Native method to set the native cursor */ - private static native void nSetNativeCursor(long handle) throws LWJGLErrorException; + private static native void nSetNativeCursor(long handle) throws LWJGLException; /** * Gets the minimum size of a native cursor. Can only be called if @@ -239,9 +239,9 @@ /** * "Create" the mouse. The display must first have been created. * - * @throws LWJGLErrorException if the mouse could not be created for any reason + * @throws LWJGLException if the mouse could not be created for any reason */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created prior to creating mouse"); @@ -294,7 +294,7 @@ if (currentCursor != null) { try { setNativeCursor(null); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) e.printStackTrace(); } @@ -402,7 +402,7 @@ /** * Enable mouse button buffering. Must be called after the mouse is created. */ - public static void enableBuffer() throws LWJGLErrorException { + public static void enableBuffer() throws LWJGLException { if (!created) throw new IllegalStateException("Mouse must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(2*BUFFER_SIZE); @@ -415,7 +415,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws LWJGLErrorException; + private static native void nEnableBuffer() throws LWJGLException; /** * Reads all button events since last read. @@ -546,7 +546,7 @@ currentCursor.nextCursor(); try { setNativeCursor(currentCursor); - } catch (LWJGLErrorException e) { + } catch (LWJGLException e) { if (Sys.DEBUG) e.printStackTrace(); } |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl/openal/eax Modified Files: EAX.java Log Message: Renamed LWJGLErrorException to LWJGLException Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EAX.java 27 Mar 2004 14:42:46 -0000 1.9 +++ EAX.java 27 Mar 2004 15:05:23 -0000 1.10 @@ -33,7 +33,7 @@ package org.lwjgl.openal.eax; import org.lwjgl.Sys; -import org.lwjgl.LWJGLErrorException; +import org.lwjgl.LWJGLException; /** * $Id$ @@ -54,15 +54,15 @@ /** * Loads the EAX functions * - * @throws LWJGLErrorException if the EAX extensions couldn't be loaded + * @throws LWJGLException if the EAX extensions couldn't be loaded */ - public static void create() throws LWJGLErrorException { + public static void create() throws LWJGLException { if (created) { return; } if (!nCreate()) { - throw new LWJGLErrorException("EAX instance could not be created."); + throw new LWJGLException("EAX instance could not be created."); } EAX20.init(); created = true; |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:16:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3234/src/java/org/lwjgl Modified Files: Display.java Sys.java Added Files: LWJGLException.java Removed Files: LWJGLErrorException.java Log Message: Renamed LWJGLErrorException to LWJGLException --- NEW FILE: LWJGLException.java --- package org.lwjgl; public class LWJGLException extends Exception { public LWJGLException(String msg) { super(msg); } } --- LWJGLErrorException.java DELETED --- Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Display.java 27 Mar 2004 14:42:45 -0000 1.43 +++ Display.java 27 Mar 2004 15:05:22 -0000 1.44 @@ -131,9 +131,9 @@ * still need to query the display's characteristics using getDisplayMode(). * * @param mode The new display mode to set - * @throws LWJGLErrorException if the display mode could not be set + * @throws LWJGLException if the display mode could not be set */ - public static native void setDisplayMode(DisplayMode mode) throws LWJGLErrorException; + public static native void setDisplayMode(DisplayMode mode) throws LWJGLException; /** * Reset the display mode to whatever it was when LWJGL was initialized. @@ -195,14 +195,14 @@ * @param brightness The brightness value between -1.0 and 1.0, inclusive * @param contrast The contrast, larger than 0.0. */ - public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLErrorException { + public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLException { if (brightness < -1.0f || brightness > 1.0f) throw new IllegalArgumentException("Invalid brightness value"); if (contrast < 0.0f) throw new IllegalArgumentException("Invalid contrast value"); int rampSize = getGammaRampLength(); if (rampSize == 0) { - throw new LWJGLErrorException("Display configuration not supported"); + throw new LWJGLException("Display configuration not supported"); } FloatBuffer gammaRamp = ByteBuffer.allocateDirect(rampSize*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); for (int i = 0; i < rampSize; i++) { @@ -235,7 +235,7 @@ /** * Native method to set the gamma ramp. */ - private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLErrorException; + private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Sys.java 27 Mar 2004 14:09:53 -0000 1.44 +++ Sys.java 27 Mar 2004 15:05:22 -0000 1.45 @@ -128,7 +128,7 @@ System.loadLibrary(LIBRARY_NAME); String native_version = getNativeLibraryVersion(); if (!native_version.equals(VERSION)) - throw new IllegalStateException("Version mismatch: jar version is '" + VERSION + + throw new LinkageError("Version mismatch: jar version is '" + VERSION + "', native libary version is '" + native_version + "'"); setDebug(DEBUG); setTime(0); |
|
From: Elias N. <eli...@us...> - 2004-03-27 15:15:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/linux Modified Files: org_lwjgl_Sys.cpp org_lwjgl_opengl_Window.cpp Log Message: Implemented version check to check for incompatible native libraries 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.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- org_lwjgl_opengl_Window.cpp 26 Mar 2004 11:04:44 -0000 1.24 +++ org_lwjgl_opengl_Window.cpp 27 Mar 2004 14:09:54 -0000 1.25 @@ -420,7 +420,7 @@ createWindow(env, disp, screen, vis_info, title, x, y, width, height, fscreen); glx_window = glXCreateWindow(disp, configs[0], getCurrentWindow(), NULL); makeCurrent(); - if (ISDEBUGENABLED()) + if (isDebugEnabled()) dumpVisualInfo(disp, vis_info); XFree(configs); XFree(vis_info); @@ -433,7 +433,7 @@ throwException(env, "Could not find a matching pixel format"); return false; } - if (ISDEBUGENABLED()) + if (isDebugEnabled()) dumpVisualInfo(disp, vis_info); context = glXCreateContext(disp, vis_info, NULL, True); if (context == NULL) { Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_Sys.cpp 27 Feb 2004 09:54:37 -0000 1.23 +++ org_lwjgl_Sys.cpp 27 Mar 2004 14:09:54 -0000 1.24 @@ -165,6 +165,10 @@ env->ReleaseStringUTFChars(title, cTitleBarText); } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion(JNIEnv *env, jclass clazz) { + return getVersionString(env); +} + /* * Class: org_lwjgl_Sys * Method: openURL |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:57:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl Modified Files: Display.java SwingAdapter.java Added Files: LWJGLErrorException.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: SwingAdapter.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/SwingAdapter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- SwingAdapter.java 7 Mar 2004 15:20:28 -0000 1.1 +++ SwingAdapter.java 27 Mar 2004 14:42:45 -0000 1.2 @@ -52,7 +52,7 @@ */ SwingAdapter() { } - + /** * Spawn a "modal" dialog in the centre of the screen with a message in it * and an OK button. This method blocks until the dialog is dismissed. @@ -60,10 +60,10 @@ * @param message Message to show in alert */ public void alert(String title, String message) { - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch(Exception e) { - } - JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch(Exception e) { + } + JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); } } --- NEW FILE: LWJGLErrorException.java --- package org.lwjgl; public class LWJGLErrorException extends Exception { public LWJGLErrorException(String msg) { super(msg); } } Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Display.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Display.java 27 Mar 2004 13:48:57 -0000 1.42 +++ Display.java 27 Mar 2004 14:42:45 -0000 1.43 @@ -131,9 +131,9 @@ * still need to query the display's characteristics using getDisplayMode(). * * @param mode The new display mode to set - * @throws Exception if the display mode could not be set + * @throws LWJGLErrorException if the display mode could not be set */ - public static native void setDisplayMode(DisplayMode mode) throws Exception; + public static native void setDisplayMode(DisplayMode mode) throws LWJGLErrorException; /** * Reset the display mode to whatever it was when LWJGL was initialized. @@ -195,14 +195,14 @@ * @param brightness The brightness value between -1.0 and 1.0, inclusive * @param contrast The contrast, larger than 0.0. */ - public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws Exception { + public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLErrorException { if (brightness < -1.0f || brightness > 1.0f) throw new IllegalArgumentException("Invalid brightness value"); if (contrast < 0.0f) throw new IllegalArgumentException("Invalid contrast value"); int rampSize = getGammaRampLength(); if (rampSize == 0) { - throw new Exception("Display configuration not supported"); + throw new LWJGLErrorException("Display configuration not supported"); } FloatBuffer gammaRamp = ByteBuffer.allocateDirect(rampSize*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); for (int i = 0; i < rampSize; i++) { @@ -235,7 +235,7 @@ /** * Native method to set the gamma ramp. */ - private static native void setGammaRamp(FloatBuffer gammaRamp) throws Exception ; + private static native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLErrorException; /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/openal/eax Modified Files: EAX.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: EAX.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAX.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EAX.java 27 Mar 2004 13:48:58 -0000 1.8 +++ EAX.java 27 Mar 2004 14:42:46 -0000 1.9 @@ -33,6 +33,7 @@ package org.lwjgl.openal.eax; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -53,15 +54,15 @@ /** * Loads the EAX functions * - * @throws Exception if the EAX extensions couldn't be loaded + * @throws LWJGLErrorException if the EAX extensions couldn't be loaded */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (created) { return; } if (!nCreate()) { - throw new Exception("EAX instance could not be created."); + throw new LWJGLErrorException("EAX instance could not be created."); } EAX20.init(); created = true; |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/input Modified Files: Controller.java Cursor.java Keyboard.java Mouse.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: Controller.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Controller.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Controller.java 27 Mar 2004 13:48:57 -0000 1.14 +++ Controller.java 27 Mar 2004 14:42:46 -0000 1.15 @@ -37,6 +37,7 @@ import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -163,9 +164,9 @@ /** * "Create" the controller. The display must first have been created. - * @throws Exception if the controller could not be created for any reason + * @throws LWJGLErrorException if the controller could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Controller"); initialize(); @@ -267,7 +268,7 @@ /** * Native method to create the controller */ - private static native void nCreate() throws Exception; + private static native void nCreate() throws LWJGLErrorException; /** * Native method the destroy the controller @@ -278,122 +279,122 @@ * Register fields with the native library */ private static native void initIDs(); - /** - * @return Returns the buttonCount. - */ - public static int getButtonCount() { - return buttonCount; - } + /** + * @return Returns the buttonCount. + */ + public static int getButtonCount() { + return buttonCount; + } - /** - * @return Returns whether POV is supported - */ - public static boolean hasPOV() { - return hasPOV; - } + /** + * @return Returns whether POV is supported + */ + public static boolean hasPOV() { + return hasPOV; + } - /** - * @return Returns whether a rotational x axis is supported - */ - public static boolean hasRXAxis() { - return hasRXAxis; - } + /** + * @return Returns whether a rotational x axis is supported + */ + public static boolean hasRXAxis() { + return hasRXAxis; + } - /** - * @return Returns whether a rotational y axis is supported - */ - public static boolean hasRYAxis() { - return hasRYAxis; - } + /** + * @return Returns whether a rotational y axis is supported + */ + public static boolean hasRYAxis() { + return hasRYAxis; + } - /** - * @return Returns whether a rotational z axis is supported - */ - public static boolean hasRZAxis() { - return hasRZAxis; - } + /** + * @return Returns whether a rotational z axis is supported + */ + public static boolean hasRZAxis() { + return hasRZAxis; + } - /** - * @return Returns whether a slider is supported - */ - public static boolean hasSlider() { - return hasSlider; - } + /** + * @return Returns whether a slider is supported + */ + public static boolean hasSlider() { + return hasSlider; + } - /** - * @return Returns whether a x axis is supported - */ - public static boolean hasXAxis() { - return hasXAxis; - } + /** + * @return Returns whether a x axis is supported + */ + public static boolean hasXAxis() { + return hasXAxis; + } - /** - * @return Returns whether a y axis is supported - */ - public static boolean hasYAxis() { - return hasYAxis; - } + /** + * @return Returns whether a y axis is supported + */ + public static boolean hasYAxis() { + return hasYAxis; + } - /** - * @return Returns whether a z axis is supported - */ - public static boolean hasZAxis() { - return hasZAxis; - } + /** + * @return Returns whether a z axis is supported + */ + public static boolean hasZAxis() { + return hasZAxis; + } - /** - * @return Returns the POV value - */ - public static int getPov() { - return pov; - } + /** + * @return Returns the POV value + */ + public static int getPov() { + return pov; + } - /** - * @return Returns the rotational value of the x axis - */ - public static int getRx() { - return rx; - } + /** + * @return Returns the rotational value of the x axis + */ + public static int getRx() { + return rx; + } - /** - * @return Returns the rotational value of the y axis - */ - public static int getRy() { - return ry; - } + /** + * @return Returns the rotational value of the y axis + */ + public static int getRy() { + return ry; + } - /** - * @return Returns the rotational value of the z axis - */ - public static int getRz() { - return rz; - } + /** + * @return Returns the rotational value of the z axis + */ + public static int getRz() { + return rz; + } - /** - * @return Returns the slider value - */ - public static int getSlider() { - return slider; - } + /** + * @return Returns the slider value + */ + public static int getSlider() { + return slider; + } - /** - * @return Returns the x axis value - */ - public static int getX() { - return x; - } + /** + * @return Returns the x axis value + */ + public static int getX() { + return x; + } - /** - * @return Returns the y axis value - */ - public static int getY() { - return y; - } + /** + * @return Returns the y axis value + */ + public static int getY() { + return y; + } - /** - * @return Returns the z axis value - */ - public static int getZ() { - return z; - } + /** + * @return Returns the z axis value + */ + public static int getZ() { + return z; + } } Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Cursor.java 27 Mar 2004 13:48:57 -0000 1.18 +++ Cursor.java 27 Mar 2004 14:42:46 -0000 1.19 @@ -37,6 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -68,9 +69,9 @@ * @param numImages number of cursor images specified. Must be 1 if animations are not supported. * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null - * @throws Exception if the cursor could not be created for any reason + * @throws LWJGLErrorException if the cursor could not be created for any reason */ - public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); if (width*height*numImages > images.remaining()) @@ -94,7 +95,7 @@ /** * Creates the actual cursor, using a platform specific class */ - private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws Exception { + private void createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLErrorException { // create copy and flip images to match ogl IntBuffer images_copy = ByteBuffer.allocateDirect(images.remaining()*4).order(ByteOrder.nativeOrder()).asIntBuffer(); flipImages(width, height, numImages, images, images_copy); Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Keyboard.java 27 Mar 2004 13:48:57 -0000 1.42 +++ Keyboard.java 27 Mar 2004 14:42:46 -0000 1.43 @@ -41,6 +41,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -284,9 +285,9 @@ * "Create" the keyboard. The display must first have been created. The * reason for this is so the keyboard has a window to "focus" in. * - * @throws Exception if the keyboard could not be created for any reason + * @throws LWJGLErrorException if the keyboard could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created before you can create Keyboard"); if (!initialized) @@ -300,7 +301,7 @@ /** * Native method to create the keyboard */ - private static native void nCreate() throws Exception; + private static native void nCreate() throws LWJGLErrorException; /** * @return true if the keyboard has been created @@ -388,7 +389,7 @@ * Enable keyboard translation. Must be called after the keyboard is created, * and keyboard buffering must be enabled. */ - public static void enableTranslation() throws Exception { + public static void enableTranslation() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Keyboard must be created before you can read events"); if (readBuffer == null) @@ -400,12 +401,12 @@ /** * Native method to enable the translation buffer */ - private static native void nEnableTranslation() throws Exception; + private static native void nEnableTranslation() throws LWJGLErrorException; /** * Enable keyboard buffering. Must be called after the keyboard is created. */ - public static void enableBuffer() throws Exception { + public static void enableBuffer() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Keyboard must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(4*BUFFER_SIZE); @@ -418,7 +419,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws Exception; + private static native void nEnableBuffer() throws LWJGLErrorException; /** * Checks to see if a key is down. Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Mouse.java 27 Mar 2004 13:48:57 -0000 1.44 +++ Mouse.java 27 Mar 2004 14:42:46 -0000 1.45 @@ -39,6 +39,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.opengl.Window; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -164,9 +165,9 @@ * * @param cursor the native cursor object to bind. May be null. * @return The previous Cursor object set, or null. - * @throws Exception if the cursor could not be set for any reason + * @throws LWJGLErrorException if the cursor could not be set for any reason */ - public static Cursor setNativeCursor(Cursor cursor) throws Exception { + public static Cursor setNativeCursor(Cursor cursor) throws LWJGLErrorException { if (!created) throw new IllegalStateException("Create the Mouse before setting the native cursor"); if ((getNativeCursorCaps() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) @@ -183,7 +184,7 @@ } /** Native method to set the native cursor */ - private static native void nSetNativeCursor(long handle) throws Exception; + private static native void nSetNativeCursor(long handle) throws LWJGLErrorException; /** * Gets the minimum size of a native cursor. Can only be called if @@ -238,9 +239,9 @@ /** * "Create" the mouse. The display must first have been created. * - * @throws Exception if the mouse could not be created for any reason + * @throws LWJGLErrorException if the mouse could not be created for any reason */ - public static void create() throws Exception { + public static void create() throws LWJGLErrorException { if (!Window.isCreated()) throw new IllegalStateException("Window must be created prior to creating mouse"); @@ -293,7 +294,7 @@ if (currentCursor != null) { try { setNativeCursor(null); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) e.printStackTrace(); } @@ -401,7 +402,7 @@ /** * Enable mouse button buffering. Must be called after the mouse is created. */ - public static void enableBuffer() throws Exception { + public static void enableBuffer() throws LWJGLErrorException { if (!created) throw new IllegalStateException("Mouse must be created before you can enable buffering"); readBuffer = BufferUtils.createByteBuffer(2*BUFFER_SIZE); @@ -414,7 +415,7 @@ * @return the event buffer, * or null if no buffer can be allocated */ - private static native void nEnableBuffer() throws Exception; + private static native void nEnableBuffer() throws LWJGLErrorException; /** * Reads all button events since last read. @@ -545,7 +546,7 @@ currentCursor.nextCursor(); try { setNativeCursor(currentCursor); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) e.printStackTrace(); } |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/openal Modified Files: AL.java ALC.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- AL.java 27 Mar 2004 13:48:58 -0000 1.19 +++ AL.java 27 Mar 2004 14:42:46 -0000 1.20 @@ -37,6 +37,7 @@ import org.lwjgl.Display; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -86,7 +87,7 @@ * @param oalPaths Array of strings containing paths to search for OpenAL library * @return true if the AL creation process succeeded */ - protected static native void nCreate(String[] oalPaths) throws OpenALException; + protected static native void nCreate(String[] oalPaths) throws LWJGLErrorException; /** * Native method the destroy the AL @@ -101,17 +102,17 @@ } /** - * Creates an OpenAL instance. Using this constructor will cause OpenAL to - * open the device using supplied device argument, and create a context using the context values - * supplied. - * - * @param deviceArguments Arguments supplied to native device - * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). - * @param contextRefresh Refresh intervalls, in units of Hz. - * @param contextSynchronized Flag, indicating a synchronous context.* + * Creates an OpenAL instance. Using this constructor will cause OpenAL to + * open the device using supplied device argument, and create a context using the context values + * supplied. + * + * @param deviceArguments Arguments supplied to native device + * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). + * @param contextRefresh Refresh intervalls, in units of Hz. + * @param contextSynchronized Flag, indicating a synchronous context.* */ public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) - throws OpenALException { + throws LWJGLErrorException { if (created) { return; @@ -130,7 +131,7 @@ * Creates an OpenAL instance. The empty create will cause OpenAL to * open the default device, and create a context using default values. */ - public static void create() throws OpenALException { + public static void create() throws LWJGLErrorException { if(created) { return; } @@ -151,7 +152,7 @@ jwsLibname = "openal"; break; default: - throw new OpenALException("Unknown platform"); + throw new LWJGLErrorException("Unknown platform"); } String jwsPath = getPathFromJWS(jwsLibname); Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ALC.java 27 Mar 2004 13:48:58 -0000 1.15 +++ ALC.java 27 Mar 2004 14:42:46 -0000 1.16 @@ -35,6 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; /** * $Id$ @@ -158,9 +159,9 @@ /** * Creates the ALC instance * - * @throws Exception if a failiure occured in the ALC creation process + * @throws LWJGLErrorException if a failiure occured in the ALC creation process */ - protected static void create() throws OpenALException { + protected static void create() throws LWJGLErrorException { if (created) { return; } |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/native/common Modified Files: common_tools.cpp extal.cpp Log Message: Added LWJGLErrorException to replace the too general Exception Index: extal.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- extal.cpp 10 Mar 2004 08:42:39 -0000 1.18 +++ extal.cpp 27 Mar 2004 14:42:47 -0000 1.19 @@ -197,7 +197,7 @@ } env->ReleaseStringUTFChars(path, path_str); } - throwOpenALException(env, "Could not load openal library."); + throwException(env, "Could not load openal library."); return false; } @@ -235,27 +235,27 @@ alGetProcAddress = (alGetProcAddressPROC)extal_GetProcAddress("alGetProcAddress"); if (alGetProcAddress == NULL) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load alGetProcAddress function pointer."); + throwException(env, "Could not load alGetProcAddress function pointer."); return; } //load basic OpenAL functions if(!LoadAL(env)) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load OpenAL function pointers."); + throwException(env, "Could not load OpenAL function pointers."); return; } //load OpenAL context functions if(!LoadALC(env)) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load ALC function pointers."); + throwException(env, "Could not load ALC function pointers."); return; } //load OpenAL extensions if(!LoadALExtensions()) { DeInitializeOpenAL(); - throwOpenALException(env, "Could not load AL extension function pointers."); + throwException(env, "Could not load AL extension function pointers."); return; } } Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- common_tools.cpp 27 Mar 2004 14:09:54 -0000 1.15 +++ common_tools.cpp 27 Mar 2004 14:42:47 -0000 1.16 @@ -120,7 +120,7 @@ } void throwException(JNIEnv * env, const char * err) { - throwGeneralException(env, "java/lang/Exception", err); + throwGeneralException(env, "org/lwjgl/LWJGLErrorException", err); } void doExtension(JNIEnv *env, jobject ext_set, const char *method_name, const char *ext) { |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:56:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src/java/org/lwjgl/opengl Modified Files: Pbuffer.java Window.java Log Message: Added LWJGLErrorException to replace the too general Exception Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Pbuffer.java 27 Mar 2004 13:48:58 -0000 1.13 +++ Pbuffer.java 27 Mar 2004 14:42:46 -0000 1.14 @@ -33,6 +33,7 @@ package org.lwjgl.opengl; import org.lwjgl.Sys; +import org.lwjgl.LWJGLErrorException; import java.nio.IntBuffer; @@ -159,7 +160,7 @@ } /** - * Construct an instance of a Pbuffer. If this fails then an Exception will be thrown. The buffer is single-buffered. + * Construct an instance of a Pbuffer. If this fails then an LWJGLErrorException will be thrown. The buffer is single-buffered. * <p/> * NOTE: An OpenGL window must be created before a Pbuffer can be created. The Pbuffer will have its own context that shares * display lists and textures with the OpenGL window context, but it will have its own OpenGL state. Therefore, state changes @@ -182,7 +183,7 @@ * 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. * @param renderTexture */ - public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws Exception { + public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples, RenderTexture renderTexture) throws LWJGLErrorException { this.width = width; this.height = height; @@ -240,7 +241,7 @@ int bpp, int alpha, int depth, int stencil, int samples, IntBuffer pixelFormatCaps, int pixelFormatCapsSize, - IntBuffer pBufferAttribs, int pBufferAttribsSize) throws Exception; + IntBuffer pBufferAttribs, int pBufferAttribsSize) throws LWJGLErrorException; /** * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was Index: Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Window.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- Window.java 27 Mar 2004 13:48:58 -0000 1.33 +++ Window.java 27 Mar 2004 14:42:46 -0000 1.34 @@ -52,6 +52,7 @@ import org.lwjgl.input.Controller; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; +import org.lwjgl.LWJGLErrorException; public final class Window { @@ -286,33 +287,33 @@ * buffer, probably no alpha buffer, and probably no multisampling. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title - * @throws Exception + * @throws LWJGLErrorException */ - public static void create(String title) throws Exception { + public static void create(String title) throws LWJGLErrorException { create(title, Display.getDepth(), 0, 16, 8, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an Exception will be thrown. + * fails too then an LWJGLErrorException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel * @param alpha Minimum bits per pixel in alpha buffer * @param depth Minimum bits per pixel in depth buffer * @param stencil Minimum bits per pixel in stencil buffer - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil) throws Exception { + public static void create(String title, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { create(title, bpp, alpha, depth, stencil, 0); } /** * Create a fullscreen window. If the underlying OS does not * support fullscreen mode, then a window will be created instead. If this - * fails too then an Exception will be thrown. + * fails too then an LWJGLErrorException will be thrown. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. * @param title The title of the window * @param bpp Minimum bits per pixel @@ -321,10 +322,10 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws Exception { + public static void create(String title, int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = true; @@ -338,7 +339,7 @@ /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an Exception will be thrown. + * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -352,16 +353,16 @@ * @param depth Minimum bits per pixel in depth buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ - public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws Exception { + public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil) throws LWJGLErrorException { create(title, x, y, width, height, bpp, alpha, depth, stencil, 0); } /** * Create a window. If the underlying OS does not have "floating" windows, then a fullscreen - * display will be created instead. If this fails too then an Exception will be thrown. + * display will be created instead. If this fails too then an LWJGLErrorException will be thrown. * If the window is created fullscreen, then its size may not match the specified size * here. * <p>The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. @@ -376,11 +377,11 @@ * @param stencil Minimum bits per pixel in stencil buffer * @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec). Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported. - * @throws Exception if the window could not be created for any reason; typically because + * @throws LWJGLErrorException if the window could not be created for any reason; typically because * the minimum requirements could not be met satisfactorily */ public static void create(String title, int x, int y, int width, int height, int bpp, int alpha, int depth, int stencil, int samples) - throws Exception { + throws LWJGLErrorException { if (isCreated()) throw new IllegalStateException("Only one LWJGL window may be instantiated at any one time."); Window.fullscreen = false; @@ -394,7 +395,7 @@ /** * Create the native window peer. - * @throws Exception + * @throws LWJGLErrorException */ private static native void nCreate( String title, @@ -408,9 +409,9 @@ int depth, int stencil, int samples) - throws Exception; + throws LWJGLErrorException; - private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws Exception { + private static void createWindow(int bpp, int alpha, int depth, int stencil, int samples) throws LWJGLErrorException { nCreate(title, x, y, width, height, fullscreen, bpp, alpha, depth, stencil, samples); context = new Window(); makeCurrent(); @@ -430,7 +431,7 @@ Mouse.create(); createdMouse = true; Mouse.enableBuffer(); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -444,7 +445,7 @@ createdKeyboard = true; Keyboard.enableBuffer(); Keyboard.enableTranslation(); - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { @@ -456,7 +457,7 @@ try { Controller.create(); createdController = true; - } catch (Exception e) { + } catch (LWJGLErrorException e) { if (Sys.DEBUG) { e.printStackTrace(System.err); } else { |
|
From: Elias N. <eli...@us...> - 2004-03-27 14:30:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27652/src/native/macosx Modified Files: hid.cpp org_lwjgl_Sys.cpp Log Message: Implemented version check to check for incompatible native libraries Index: hid.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/hid.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- hid.cpp 29 Jan 2004 20:53:00 -0000 1.6 +++ hid.cpp 27 Mar 2004 14:09:55 -0000 1.7 @@ -202,7 +202,7 @@ long usage_page; if (getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsageKey), &usage) && getDictLong(dev_props, CFSTR(kIOHIDPrimaryUsagePageKey), &usage_page)) { - if (ISDEBUGENABLED()) { + if (isDebugEnabled()) { printf("Considering device '"); printProperty(dev_props, CFSTR(kIOHIDProductKey)); printf("', usage page %ld usage %ld\n", usage_page, usage); Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Sys.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_Sys.cpp 20 Dec 2003 22:23:15 -0000 1.13 +++ org_lwjgl_Sys.cpp 27 Mar 2004 14:09:55 -0000 1.14 @@ -88,6 +88,10 @@ return hires_timer; } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getNativeLibraryVersion(JNIEnv *env, jclass clazz) { + return getVersionString(env); +} + /* * Class: org_lwjgl_Sys * Method: setTime |