You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
(10) |
3
(47) |
|
4
(12) |
5
(15) |
6
(14) |
7
(5) |
8
|
9
(1) |
10
|
|
11
(6) |
12
|
13
|
14
|
15
(3) |
16
(3) |
17
(5) |
|
18
|
19
(2) |
20
|
21
(11) |
22
(12) |
23
(5) |
24
(12) |
|
25
(6) |
26
(13) |
27
(2) |
28
(2) |
29
(9) |
30
(4) |
31
(2) |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24770/src/java/org/lwjgl/opengl Modified Files: ARBBufferObject.java ARBDepthTexture.java ARBFragmentProgram.java ARBFragmentShader.java ARBImaging.java ARBMatrixPalette.java ARBMultisample.java ARBMultitexture.java ARBOcclusionQuery.java ARBPointParameters.java ARBPointSprite.java ARBProgram.java ARBShaderObjects.java ARBShadingLanguage100.java ARBShadow.java ARBShadowAmbient.java ARBTextureBorderClamp.java ARBTextureCompression.java ARBTextureCubeMap.java ARBTextureEnvCombine.java ARBTextureEnvDot3.java ARBTextureMirroredRepeat.java ARBTransposeMatrix.java ARBVertexBlend.java ARBVertexBufferObject.java ARBVertexProgram.java ARBVertexShader.java ARBWindowPos.java ATIDrawBuffers.java ATIElementArray.java ATIEnvmapBumpmap.java ATIFragmentShader.java ATIMapObjectBuffer.java ATIPnTriangles.java ATISeparateStencil.java ATITextureFloat.java ATITextureMirrorOnce.java ATIVertexArrayObject.java ATIVertexAttribArrayObject.java ATIVertexStreams.java EXTAbgr.java EXTBgra.java EXTBlendEquationSeparate.java EXTBlendFuncSeparate.java EXTBlendSubtract.java EXTCompiledVertexArray.java EXTDepthBoundsTest.java EXTDrawRangeElements.java EXTFogCoord.java EXTMultiDrawArrays.java EXTPackedPixels.java EXTPixelBufferObject.java EXTPointParameters.java EXTRescaleNormal.java EXTSecondaryColor.java EXTSeparateSpecularColor.java EXTSharedTexturePalette.java EXTStencilTwoSide.java EXTStencilWrap.java EXTTextureCompressionS3TC.java EXTTextureEnvCombine.java EXTTextureEnvDot3.java EXTTextureFilterAnisotropic.java EXTTextureLODBias.java EXTTextureMirrorClamp.java EXTTextureRectangle.java EXTVertexShader.java EXTVertexWeighting.java GL11.java GL12.java GL13.java GL14.java GL15.java NVCopyDepthToColor.java NVDepthClamp.java NVEvaluators.java NVFence.java NVFloatBuffer.java NVFogDistance.java NVFragmentProgram.java NVFragmentProgram2.java NVHalfFloat.java NVLightMaxExponent.java NVMultisampleFilterHint.java NVOcclusionQuery.java NVPackedDepthStencil.java NVPixelDataRange.java NVPointSprite.java NVPrimitiveRestart.java NVProgram.java NVRegisterCombiners.java NVRegisterCombiners2.java NVTexgenReflection.java NVTextureCompressionVTC.java NVTextureEnvCombine4.java NVTextureExpandNormal.java NVTextureRectangle.java NVTextureShader.java NVTextureShader2.java NVTextureShader3.java NVVertexArrayRange.java NVVertexArrayRange2.java NVVertexProgram.java NVVertexProgram2Option.java NVVertexProgram3.java Log Message: Added private constructors to OpenAL and OpenGL static classes Index: EXTTextureMirrorClamp.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EXTTextureMirrorClamp.java 12 Jun 2004 20:28:23 -0000 1.2 +++ EXTTextureMirrorClamp.java 31 Jul 2004 09:34:09 -0000 1.3 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class EXTTextureMirrorClamp { - /* * Accepted by the <param> parameter of TexParameteri and TexParameterf, * and by the <params> parameter of TexParameteriv and TexParameterfv, @@ -43,4 +42,6 @@ public static final int GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743; public static final int GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912; -} \ No newline at end of file + private EXTTextureMirrorClamp() { + } +} Index: EXTDrawRangeElements.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EXTDrawRangeElements.java 29 Jul 2004 11:20:43 -0000 1.9 +++ EXTDrawRangeElements.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -43,6 +43,9 @@ public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; + private EXTDrawRangeElements() { + } + static native void initNativeStubs() throws LWJGLException; public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) { Index: EXTVertexShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTVertexShader.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EXTVertexShader.java 29 Jul 2004 11:20:43 -0000 1.9 +++ EXTVertexShader.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -152,6 +152,9 @@ public static final int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC; public static final int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; + private EXTVertexShader() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glBeginVertexShaderEXT(); Index: ATIEnvmapBumpmap.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ATIEnvmapBumpmap.java 29 Jul 2004 11:20:43 -0000 1.7 +++ ATIEnvmapBumpmap.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -47,6 +47,9 @@ public static final int GL_BUMP_ENVMAP_ATI = 0x877B; public static final int GL_BUMP_TARGET_ATI = 0x877C; + private ATIEnvmapBumpmap() { + } + static native void initNativeStubs() throws LWJGLException; public static void glTexBumpParameterATI(int pname, FloatBuffer pfParam) { Index: ARBShaderObjects.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShaderObjects.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ARBShaderObjects.java 29 Jul 2004 11:20:43 -0000 1.10 +++ ARBShaderObjects.java 31 Jul 2004 09:34:09 -0000 1.11 @@ -40,7 +40,6 @@ import org.lwjgl.BufferChecks; public final class ARBShaderObjects { - /* * Accepted by the <pname> argument of GetHandleARB: */ @@ -93,6 +92,9 @@ public static final int GL_SAMPLER_2D_RECT_ARB = 0x8B63; public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + private ARBShaderObjects() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glDeleteObjectARB(int obj); Index: EXTTextureFilterAnisotropic.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTTextureFilterAnisotropic.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTTextureFilterAnisotropic.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,8 +31,10 @@ */ package org.lwjgl.opengl; -public final class EXTTextureFilterAnisotropic -{ +public final class EXTTextureFilterAnisotropic { public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + + private EXTTextureFilterAnisotropic() { + } } Index: NVTextureEnvCombine4.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureEnvCombine4.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVTextureEnvCombine4.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVTextureEnvCombine4.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,11 +31,13 @@ */ package org.lwjgl.opengl; -public final class NVTextureEnvCombine4 -{ +public final class NVTextureEnvCombine4 { public static final int GL_COMBINE4_NV = 0x8503; public static final int GL_SOURCE3_RGB_NV = 0x8583; public static final int GL_SOURCE3_ALPHA_NV = 0x858B; public static final int GL_OPERAND3_RGB_NV = 0x8593; public static final int GL_OPERAND3_ALPHA_NV = 0x859B; + + private NVTextureEnvCombine4() { + } } Index: NVFence.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFence.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NVFence.java 29 Jul 2004 11:20:43 -0000 1.8 +++ NVFence.java 31 Jul 2004 09:34:09 -0000 1.9 @@ -41,6 +41,9 @@ public static final int GL_FENCE_STATUS_NV = 0x84F3; public static final int GL_FENCE_CONDITION_NV = 0x84F4; + private NVFence() { + } + static native void initNativeStubs() throws LWJGLException; public static void glGenFencesNV(IntBuffer piFences) { Index: NVProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVProgram.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- NVProgram.java 29 Jul 2004 11:20:43 -0000 1.9 +++ NVProgram.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -38,7 +38,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.BufferChecks; -public class NVProgram { +public abstract class NVProgram { /* Accepted by the <pname> parameter of GetProgramivNV: Index: ARBOcclusionQuery.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBOcclusionQuery.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBOcclusionQuery.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ARBOcclusionQuery.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -37,7 +37,6 @@ import org.lwjgl.BufferChecks; public final class ARBOcclusionQuery { - /* * Accepted by the <target> parameter of BeginQueryARB, EndQueryARB, * and GetQueryivARB: @@ -56,7 +55,10 @@ */ public static final int GL_QUERY_RESULT_ARB = 0x8866; public static final int GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867; - + + private ARBOcclusionQuery() { + } + static native void initNativeStubs() throws LWJGLException; // --------------------------- Index: NVCopyDepthToColor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVCopyDepthToColor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVCopyDepthToColor.java 12 Jun 2004 20:28:23 -0000 1.3 +++ NVCopyDepthToColor.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,8 +31,10 @@ */ package org.lwjgl.opengl; -public final class NVCopyDepthToColor -{ +public final class NVCopyDepthToColor { public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E; public static final int GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F; + + private NVCopyDepthToColor() { + } } Index: EXTVertexWeighting.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTVertexWeighting.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EXTVertexWeighting.java 29 Jul 2004 11:20:43 -0000 1.9 +++ EXTVertexWeighting.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -52,6 +52,9 @@ public static final int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F; public static final int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510; + private EXTVertexWeighting() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glVertexWeightfEXT(float weight); Index: GL13.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL13.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GL13.java 29 Jul 2004 11:20:43 -0000 1.11 +++ GL13.java 31 Jul 2004 09:34:09 -0000 1.12 @@ -151,6 +151,9 @@ public static final int GL_DOT3_RGBA = 0x86AF; public static final int GL_CLAMP_TO_BORDER = 0x812D; + private GL13() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glActiveTexture(int texture); Index: NVFloatBuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFloatBuffer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NVFloatBuffer.java 12 Jun 2004 20:28:24 -0000 1.4 +++ NVFloatBuffer.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class NVFloatBuffer { - /* * Accepted by the <internalformat> parameter of TexImage2D and * CopyTexImage2D: @@ -84,4 +83,6 @@ public static final int GL_WGL_TEXTURE_FLOAT_RGB_NV = 0x20B7; public static final int GL_WGL_TEXTURE_FLOAT_RGBA_NV = 0x20B8; -} \ No newline at end of file + private NVFloatBuffer() { + } +} Index: NVTextureRectangle.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureRectangle.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVTextureRectangle.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVTextureRectangle.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,10 +31,12 @@ */ package org.lwjgl.opengl; -public final class NVTextureRectangle -{ +public final class NVTextureRectangle { public static final int GL_TEXTURE_RECTANGLE_NV = 0x84F5; public static final int GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6; public static final int GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7; public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8; + + private NVTextureRectangle() { + } } Index: ARBVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexProgram.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ARBVertexProgram.java 29 Jul 2004 11:20:43 -0000 1.10 +++ ARBVertexProgram.java 31 Jul 2004 09:34:09 -0000 1.11 @@ -41,7 +41,6 @@ import org.lwjgl.BufferChecks; public final class ARBVertexProgram extends ARBProgram { - /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, @@ -90,6 +89,9 @@ */ public static final int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; + private ARBVertexProgram() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glVertexAttrib1sARB(int index, short x); Index: EXTPackedPixels.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTPackedPixels.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTPackedPixels.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTPackedPixels.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -41,4 +41,7 @@ public static final int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034; public static final int GL_UNSIGNED_INT_8_8_8_8_EXT = 0x8035; public static final int GL_UNSIGNED_INT_10_10_10_2_EXT = 0x8036; + + private EXTPackedPixels() { + } } Index: ARBVertexBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBufferObject.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ARBVertexBufferObject.java 12 Jun 2004 20:28:23 -0000 1.7 +++ ARBVertexBufferObject.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -31,8 +31,7 @@ */ package org.lwjgl.opengl; -public final class ARBVertexBufferObject extends ARBProgram { - +public final class ARBVertexBufferObject extends ARBBufferObject { /* * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, * BufferSubDataARB, MapBufferARB, UnmapBufferARB, @@ -63,4 +62,6 @@ */ public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; + private ARBVertexBufferObject() { + } } Index: NVPrimitiveRestart.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVPrimitiveRestart.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NVPrimitiveRestart.java 4 Jul 2004 13:14:05 -0000 1.5 +++ NVPrimitiveRestart.java 31 Jul 2004 09:34:09 -0000 1.6 @@ -34,7 +34,6 @@ import org.lwjgl.LWJGLException; public final class NVPrimitiveRestart { - /* * Accepted by the <array> parameter of EnableClientState and * DisableClientState, by the <cap> parameter of IsEnabled, and by @@ -49,10 +48,12 @@ */ public static final int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559; + private NVPrimitiveRestart() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glPrimitiveRestartNV(); public static native void glPrimitiveRestartIndexNV(int index); - } Index: GL15.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL15.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GL15.java 29 Jul 2004 11:20:43 -0000 1.10 +++ GL15.java 31 Jul 2004 09:34:09 -0000 1.11 @@ -74,6 +74,9 @@ public static final int GL_BUFFER_MAPPED = 0x88BC; public static final int GL_BUFFER_MAP_POINTER = 0x88BD; + private GL15() { + } + static native void initNativeStubs() throws LWJGLException; public static void glBindBuffer(int target, int buffer) { Index: EXTSharedTexturePalette.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTSharedTexturePalette.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTSharedTexturePalette.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTSharedTexturePalette.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -37,4 +37,7 @@ */ public final class EXTSharedTexturePalette { public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; + + private EXTSharedTexturePalette() { + } } Index: ARBImaging.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBImaging.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBImaging.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ARBImaging.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -128,6 +128,9 @@ public static final int GL_MINMAX_FORMAT = 0x802F; public static final int GL_MINMAX_SINK = 0x8030; + private ARBImaging() { + } + static native void initNativeStubs() throws LWJGLException; public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { Index: ARBTextureCubeMap.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTextureCubeMap.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBTextureCubeMap.java 12 Jun 2004 20:28:23 -0000 1.4 +++ ARBTextureCubeMap.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -45,5 +45,6 @@ public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B; public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C; - + private ARBTextureCubeMap() { + } } Index: ARBTextureCompression.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTextureCompression.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBTextureCompression.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ARBTextureCompression.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -40,8 +40,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.BufferChecks; -public final class ARBTextureCompression -{ +public final class ARBTextureCompression { public static final int GL_COMPRESSED_ALPHA_ARB = 0x84E9; public static final int GL_COMPRESSED_LUMINANCE_ARB = 0x84EA; public static final int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB; @@ -54,6 +53,9 @@ public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2; public static final int GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3; + private ARBTextureCompression() { + } + static native void initNativeStubs() throws LWJGLException; public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int imageSize, ByteBuffer pData) { Index: ARBTransposeMatrix.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTransposeMatrix.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBTransposeMatrix.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ARBTransposeMatrix.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -42,6 +42,9 @@ public static final int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5; public static final int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; + private ARBTransposeMatrix() { + } + static native void initNativeStubs() throws LWJGLException; public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) { Index: EXTBgra.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTBgra.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTBgra.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTBgra.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -39,4 +39,7 @@ public final class EXTBgra { public static final int GL_BGR_EXT = 0x80E0; public static final int GL_BGRA_EXT = 0x80E1; + + private EXTBgra() { + } } Index: ATIFragmentShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIFragmentShader.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ATIFragmentShader.java 29 Jul 2004 11:20:43 -0000 1.7 +++ ATIFragmentShader.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -147,6 +147,9 @@ public static final int GL_NEGATE_BIT_ATI = 0x00000004; public static final int GL_BIAS_BIT_ATI = 0x00000008; + private ATIFragmentShader() { + } + static native void initNativeStubs() throws LWJGLException; public static native int glGenFragmentShadersATI(int range); Index: ATIPnTriangles.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIPnTriangles.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ATIPnTriangles.java 4 Jul 2004 13:14:05 -0000 1.6 +++ ATIPnTriangles.java 31 Jul 2004 09:34:09 -0000 1.7 @@ -44,6 +44,9 @@ public static final int GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7; public static final int GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8; + private ATIPnTriangles() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glPNTrianglesfATI(int pname, float param); Index: GL12.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL12.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- GL12.java 29 Jul 2004 11:20:43 -0000 1.13 +++ GL12.java 31 Jul 2004 09:34:09 -0000 1.14 @@ -92,6 +92,9 @@ public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; + private GL12() { + } + static native void initNativeStubs() throws LWJGLException; public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) { Index: EXTSecondaryColor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTSecondaryColor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- EXTSecondaryColor.java 29 Jul 2004 11:20:43 -0000 1.9 +++ EXTSecondaryColor.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -47,6 +47,9 @@ public static final int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D; public static final int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E; + private EXTSecondaryColor() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glSecondaryColor3bEXT(byte red, byte green, byte blue); Index: ARBVertexBlend.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBlend.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBVertexBlend.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ARBVertexBlend.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -84,6 +84,9 @@ public static final int GL_MODELVIEW30_ARB = 0x873E; public static final int GL_MODELVIEW31_ARB = 0x873F; + private ARBVertexBlend() { + } + static native void initNativeStubs() throws LWJGLException; public static void glWeightARB(ByteBuffer pWeights) { Index: ATITextureFloat.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATITextureFloat.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ATITextureFloat.java 12 Jun 2004 20:28:23 -0000 1.4 +++ ATITextureFloat.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class ATITextureFloat { - /* * Accepted by the <internalFormat> parameter of TexImage1D, * TexImage2D, and TexImage3D: @@ -50,4 +49,6 @@ public static final int GL_LUMINANCE_FLOAT16_ATI = 0x881E; public static final int GL_LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F; -} \ No newline at end of file + private ATITextureFloat() { + } +} Index: ARBFragmentShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBFragmentShader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ARBFragmentShader.java 27 Jun 2004 12:43:55 -0000 1.6 +++ ARBFragmentShader.java 31 Jul 2004 09:34:09 -0000 1.7 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class ARBFragmentShader { - /* * Accepted by the <shaderType> argument of CreateShaderObjectARB and * returned by the <params> parameter of GetObjectParameter{fi}vARB: @@ -54,4 +53,6 @@ */ public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B; -} \ No newline at end of file + private ARBFragmentShader() { + } +} Index: GL14.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL14.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- GL14.java 29 Jul 2004 11:20:43 -0000 1.12 +++ GL14.java 31 Jul 2004 09:34:09 -0000 1.13 @@ -88,6 +88,9 @@ public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; public static final int GL_GL_MIRRORED_REPEAT = 0x8370; + private GL14() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glBlendEquation(int mode); Index: EXTTextureCompressionS3TC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureCompressionS3TC.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTTextureCompressionS3TC.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTTextureCompressionS3TC.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,10 +31,12 @@ */ package org.lwjgl.opengl; -public final class EXTTextureCompressionS3TC -{ +public final class EXTTextureCompressionS3TC { public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; public static final int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; public static final int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; public static final int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + + private EXTTextureCompressionS3TC() { + } } Index: ARBBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBBufferObject.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ARBBufferObject.java 29 Jul 2004 11:20:43 -0000 1.7 +++ ARBBufferObject.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -40,8 +40,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.BufferChecks; -public final class ARBBufferObject { - +public abstract class ARBBufferObject { /* * Accepted by the <usage> parameter of BufferDataARB: */ Index: NVVertexArrayRange2.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexArrayRange2.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVVertexArrayRange2.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVVertexArrayRange2.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -33,4 +33,7 @@ public final class NVVertexArrayRange2 { public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533; + + private NVVertexArrayRange2() { + } } Index: ATISeparateStencil.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATISeparateStencil.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ATISeparateStencil.java 4 Jul 2004 13:14:05 -0000 1.5 +++ ATISeparateStencil.java 31 Jul 2004 09:34:09 -0000 1.6 @@ -39,6 +39,9 @@ public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802; public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803; + private ATISeparateStencil() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass); Index: ARBPointSprite.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBPointSprite.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ARBPointSprite.java 12 Jun 2004 20:28:23 -0000 1.5 +++ ARBPointSprite.java 31 Jul 2004 09:34:09 -0000 1.6 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class ARBPointSprite { - /* * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and @@ -49,4 +48,6 @@ public static final int GL_COORD_REPLACE_ARB = 0x8862; -} \ No newline at end of file + private ARBPointSprite() { + } +} Index: NVVertexProgram3.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexProgram3.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVVertexProgram3.java 12 Jun 2004 20:28:24 -0000 1.2 +++ NVVertexProgram3.java 31 Jul 2004 09:34:09 -0000 1.3 @@ -32,11 +32,12 @@ package org.lwjgl.opengl; public final class NVVertexProgram3 { - /* * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, * GetFloatv, and GetDoublev: */ public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C; -} \ No newline at end of file + private NVVertexProgram3() { + } +} Index: ARBMatrixPalette.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBMatrixPalette.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ARBMatrixPalette.java 29 Jul 2004 11:20:43 -0000 1.10 +++ ARBMatrixPalette.java 31 Jul 2004 09:34:09 -0000 1.11 @@ -51,6 +51,9 @@ public static final int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848; public static final int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849; + private ARBMatrixPalette() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glCurrentPaletteMatrixARB(int index); Index: NVRegisterCombiners.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVRegisterCombiners.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NVRegisterCombiners.java 29 Jul 2004 11:20:43 -0000 1.7 +++ NVRegisterCombiners.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -90,6 +90,9 @@ public static final int GL_COLOR_SUM_CLAMP_NV = 0x854F; public static final int GL_MAX_GENERAL_COMBINERS_NV = 0x854D; + private NVRegisterCombiners() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glCombinerParameterfNV(int pname, float param); Index: NVTextureCompressionVTC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureCompressionVTC.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVTextureCompressionVTC.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVTextureCompressionVTC.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class NVTextureCompressionVTC { - /* * Accepted by the <internalformat> parameter of TexImage3D and * CompressedTexImage3DARB and the <format> parameter of @@ -43,4 +42,6 @@ public static final int COMPRESSED_RGBA_S3TC_DXT3_EXT =0x83F2; public static final int COMPRESSED_RGBA_S3TC_DXT5_EXT =0x83F3; + private NVTextureCompressionVTC() { + } } Index: EXTRescaleNormal.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTRescaleNormal.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTRescaleNormal.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTRescaleNormal.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -38,4 +38,7 @@ */ public final class EXTRescaleNormal { public static final int GL_RESCALE_NORMAL_EXT = 0x803A; + + private EXTRescaleNormal() { + } } Index: ARBVertexShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexShader.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ARBVertexShader.java 29 Jul 2004 11:20:43 -0000 1.11 +++ ARBVertexShader.java 31 Jul 2004 09:34:09 -0000 1.12 @@ -38,7 +38,6 @@ import org.lwjgl.BufferChecks; public final class ARBVertexShader { - /* * Accepted by the <shaderType> argument of CreateShaderObjectARB and * returned by the <params> parameter of GetObjectParameter{if}vARB: @@ -97,6 +96,9 @@ public static final int GL_FLOAT_MAT3_ARB = 0x8B5B; public static final int GL_FLOAT_MAT4_ARB = 0x8B5C; + private ARBVertexShader() { + } + static native void initNativeStubs() throws LWJGLException; // --------------------------- Index: EXTBlendEquationSeparate.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTBlendEquationSeparate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- EXTBlendEquationSeparate.java 4 Jul 2004 13:14:05 -0000 1.4 +++ EXTBlendEquationSeparate.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -34,7 +34,6 @@ import org.lwjgl.LWJGLException; public final class EXTBlendEquationSeparate { - /* * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, * GetFloatv, and GetDoublev: @@ -42,8 +41,10 @@ public static final int GL_BLEND_EQUATION_RGB_EXT = 0x8009; public static final int GL_BLEND_EQUATION_ALPHA_EXT = 0x883D; + private EXTBlendEquationSeparate() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha); - } Index: EXTSeparateSpecularColor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTSeparateSpecularColor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTSeparateSpecularColor.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTSeparateSpecularColor.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -40,4 +40,7 @@ public static final int GL_SINGLE_COLOR_EXT = 0x81F9; public static final int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA; public static final int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8; + + private EXTSeparateSpecularColor() { + } } Index: EXTBlendSubtract.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTBlendSubtract.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTBlendSubtract.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTBlendSubtract.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -38,4 +38,7 @@ public final class EXTBlendSubtract { public static final int GL_FUNC_SUBTRACT_EXT = 0x800A; public static final int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B; + + private EXTBlendSubtract() { + } } Index: EXTBlendFuncSeparate.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTBlendFuncSeparate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- EXTBlendFuncSeparate.java 4 Jul 2004 13:14:05 -0000 1.5 +++ EXTBlendFuncSeparate.java 31 Jul 2004 09:34:09 -0000 1.6 @@ -43,6 +43,9 @@ public static final int GL_BLEND_DST_ALPHA_EXT = 0x80CA; public static final int GL_BLEND_SRC_ALPHA_EXT = 0x80CB; + private EXTBlendFuncSeparate() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); Index: ARBMultisample.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBMultisample.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ARBMultisample.java 4 Jul 2004 13:14:05 -0000 1.7 +++ ARBMultisample.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -44,6 +44,9 @@ public static final int GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB; public static final int GL_MULTISAMPLE_BIT_ARB = 0x20000000; + private ARBMultisample() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glSampleCoverageARB(float value, boolean invert); Index: EXTMultiDrawArrays.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTMultiDrawArrays.java 29 Jul 2004 11:20:43 -0000 1.8 +++ EXTMultiDrawArrays.java 31 Jul 2004 09:34:09 -0000 1.9 @@ -37,6 +37,9 @@ import org.lwjgl.BufferChecks; public final class EXTMultiDrawArrays { + private EXTMultiDrawArrays() { + } + static native void initNativeStubs() throws LWJGLException; public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) { Index: NVHalfFloat.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVHalfFloat.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NVHalfFloat.java 29 Jul 2004 11:20:43 -0000 1.8 +++ NVHalfFloat.java 31 Jul 2004 09:34:09 -0000 1.9 @@ -37,7 +37,6 @@ import org.lwjgl.BufferChecks; public final class NVHalfFloat { - /* * Accepted by the <type> argument of VertexPointer, NormalPointer, * ColorPointer, TexCoordPointer, FogCoordPointerEXT, @@ -47,6 +46,9 @@ */ public static final int GL_HALF_FLOAT_NV = 0x140B; + private NVHalfFloat() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glVertex2hNV(short x, short y); Index: NVVertexProgram2Option.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexProgram2Option.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVVertexProgram2Option.java 12 Jun 2004 20:28:24 -0000 1.2 +++ NVVertexProgram2Option.java 31 Jul 2004 09:34:09 -0000 1.3 @@ -32,11 +32,12 @@ package org.lwjgl.opengl; public final class NVVertexProgram2Option { - /* * Accepted by the <pname> parameter of GetProgramivARB: */ public static final int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4; public static final int GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5; -} \ No newline at end of file + private NVVertexProgram2Option() { + } +} Index: ARBDepthTexture.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBDepthTexture.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ARBDepthTexture.java 27 Jun 2004 12:43:54 -0000 1.4 +++ ARBDepthTexture.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class ARBDepthTexture { - /* * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, * CopyTexImage1D and CopyTexImage2D: @@ -53,4 +52,6 @@ */ public static final int GL_DEPTH_TEXTURE_MODE_ARB = 0x884B; + private ARBDepthTexture() { + } } Index: NVOcclusionQuery.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVOcclusionQuery.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NVOcclusionQuery.java 29 Jul 2004 11:20:43 -0000 1.8 +++ NVOcclusionQuery.java 31 Jul 2004 09:34:09 -0000 1.9 @@ -45,6 +45,9 @@ public static final int GL_PIXEL_COUNT_NV = 0x8866; public static final int GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867; + private NVOcclusionQuery() { + } + static native void initNativeStubs() throws LWJGLException; public static void glGenOcclusionQueriesNV(IntBuffer piIDs) { Index: ARBShadow.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShadow.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBShadow.java 12 Jun 2004 20:28:23 -0000 1.3 +++ ARBShadow.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,9 +31,11 @@ */ package org.lwjgl.opengl; -public final class ARBShadow -{ +public final class ARBShadow { public static final int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C; public static final int GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D; public static final int GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E; + + private ARBShadow() { + } } Index: ARBFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBFragmentProgram.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ARBFragmentProgram.java 12 Jun 2004 20:28:23 -0000 1.8 +++ ARBFragmentProgram.java 31 Jul 2004 09:34:09 -0000 1.9 @@ -32,7 +32,6 @@ 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, @@ -65,5 +64,8 @@ */ public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; public static final int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; + + private ARBFragmentProgram() { + } } Index: ARBTextureEnvCombine.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTextureEnvCombine.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBTextureEnvCombine.java 12 Jun 2004 20:28:23 -0000 1.3 +++ ARBTextureEnvCombine.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,8 +31,7 @@ */ package org.lwjgl.opengl; -public final class ARBTextureEnvCombine -{ +public final class ARBTextureEnvCombine { public static final int GL_COMBINE_ARB = 0x8570; public static final int GL_COMBINE_RGB_ARB = 0x8571; public static final int GL_COMBINE_ALPHA_ARB = 0x8572; @@ -54,4 +53,7 @@ public static final int GL_OPERAND0_ALPHA_ARB = 0x8598; public static final int GL_OPERAND1_ALPHA_ARB = 0x8599; public static final int GL_OPERAND2_ALPHA_ARB = 0x859A; + + private ARBTextureEnvCombine() { + } } Index: ARBShadowAmbient.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShadowAmbient.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBShadowAmbient.java 12 Jun 2004 20:28:23 -0000 1.3 +++ ARBShadowAmbient.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,7 +31,9 @@ */ package org.lwjgl.opengl; -public final class ARBShadowAmbient -{ +public final class ARBShadowAmbient { public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF; + + private ARBShadowAmbient() { + } } Index: ARBShadingLanguage100.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShadingLanguage100.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ARBShadingLanguage100.java 27 Jun 2004 12:43:55 -0000 1.1 +++ ARBShadingLanguage100.java 31 Jul 2004 09:34:09 -0000 1.2 @@ -32,10 +32,11 @@ package org.lwjgl.opengl; public final class ARBShadingLanguage100 { - /* * Accepted by the <name> parameter of GetString: */ public static final int GL_SHADING_LANGUAGE_VERSION_ARB = 0x8B8C; -} \ No newline at end of file + private ARBShadingLanguage100() { + } +} Index: EXTPixelBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTPixelBufferObject.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTPixelBufferObject.java 12 Jun 2004 20:28:23 -0000 1.3 +++ EXTPixelBufferObject.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,8 +31,7 @@ */ package org.lwjgl.opengl; -public final class EXTPixelBufferObject extends ARBProgram { - +public final class EXTPixelBufferObject extends ARBBufferObject { /* * Accepted by the <target> parameters of BindBuffer, BufferData, * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, @@ -48,4 +47,6 @@ public static final int PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED; public static final int PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF; -} \ No newline at end of file + private EXTPixelBufferObject() { + } +} Index: ATIVertexAttribArrayObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIVertexAttribArrayObject.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ATIVertexAttribArrayObject.java 29 Jul 2004 11:20:43 -0000 1.7 +++ ATIVertexAttribArrayObject.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -38,6 +38,8 @@ import org.lwjgl.BufferChecks; public final class ATIVertexAttribArrayObject { + private ATIVertexAttribArrayObject() { + } static native void initNativeStubs() throws LWJGLException; Index: ATIDrawBuffers.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIDrawBuffers.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ATIDrawBuffers.java 29 Jul 2004 11:20:43 -0000 1.9 +++ ATIDrawBuffers.java 31 Jul 2004 09:34:09 -0000 1.10 @@ -60,6 +60,8 @@ public static final int GL_DRAW_BUFFER14_ATI = 0x8833; public static final int GL_DRAW_BUFFER15_ATI = 0x8834; + private ATIDrawBuffers() { + } static native void initNativeStubs() throws LWJGLException; Index: ATIMapObjectBuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIMapObjectBuffer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ATIMapObjectBuffer.java 4 Jul 2004 13:14:05 -0000 1.5 +++ ATIMapObjectBuffer.java 31 Jul 2004 09:34:09 -0000 1.6 @@ -36,6 +36,8 @@ import org.lwjgl.LWJGLException; public final class ATIMapObjectBuffer { + private ATIMapObjectBuffer() { + } static native void initNativeStubs() throws LWJGLException; Index: NVPointSprite.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVPointSprite.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NVPointSprite.java 29 Jul 2004 11:20:43 -0000 1.7 +++ NVPointSprite.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -41,6 +41,9 @@ public static final int GL_COORD_REPLACE_NV = 0x8862; public static final int GL_POINT_SPRITE_R_MODE_NV = 0x8863; + private NVPointSprite() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glPointParameteriNV(int pname, int param); Index: NVFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- NVFragmentProgram.java 29 Jul 2004 11:20:43 -0000 1.11 +++ NVFragmentProgram.java 31 Jul 2004 09:34:09 -0000 1.12 @@ -38,7 +38,6 @@ import org.lwjgl.BufferChecks; 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, @@ -58,6 +57,9 @@ public static final int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873; public static final int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; + private NVFragmentProgram() { + } + static native void initNativeStubs() throws LWJGLException; // --------------------------- Index: NVMultisampleFilterHint.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVMultisampleFilterHint.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NVMultisampleFilterHint.java 12 Jun 2004 20:28:24 -0000 1.4 +++ NVMultisampleFilterHint.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -32,11 +32,12 @@ package org.lwjgl.opengl; public final class NVMultisampleFilterHint { - /* * Accepted by the <target> parameter of Hint and by the <pname> * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: */ public static final int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534; -} \ No newline at end of file + private NVMultisampleFilterHint() { + } +} Index: NVFogDistance.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFogDistance.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVFogDistance.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVFogDistance.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,9 +31,11 @@ */ package org.lwjgl.opengl; -public final class NVFogDistance -{ +public final class NVFogDistance { public static final int GL_FOG_DISTANCE_MODE_NV = 0x855A; public static final int GL_EYE_RADIAL_NV = 0x855B; public static final int GL_EYE_PLANE_ABSOLUTE_NV = 0x855C; + + private NVFogDistance() { + } } Index: NVTextureExpandNormal.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureExpandNormal.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NVTextureExpandNormal.java 12 Jun 2004 20:28:24 -0000 1.4 +++ NVTextureExpandNormal.java 31 Jul 2004 09:34:09 -0000 1.5 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class NVTextureExpandNormal { - /* * Accepted by the <pname> parameters of TexParameteri, * TexParameteriv, TexParameterf, TexParameterfv, GetTexParameteri, @@ -40,4 +39,6 @@ */ public static final int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F; -} \ No newline at end of file + private NVTextureExpandNormal() { + } +} Index: NVTextureShader3.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureShader3.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVTextureShader3.java 12 Jun 2004 20:28:24 -0000 1.3 +++ NVTextureShader3.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,8 +31,7 @@ */ package org.lwjgl.opengl; -public final class NVTextureShader3 -{ +public final class NVTextureShader3 { public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850; public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851; public static final int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852; @@ -50,4 +49,7 @@ public static final int GL_HILO8_NV = 0x885E; public static final int GL_SIGNED_HILO8_NV = 0x885F; public static final int GL_FORCE_BLUE_TO_ONE_NV = 0x8860; + + private NVTextureShader3() { + } } Index: ARBMultitexture.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBMultitexture.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ARBMultitexture.java 4 Jul 2004 13:14:05 -0000 1.7 +++ ARBMultitexture.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -69,7 +69,10 @@ public static final int GL_ACTIVE_TEXTURE_ARB = 0x84E0; public static final int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1; public static final int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; - + + private ARBMultitexture() { + } + static native void initNativeStubs() throws LWJGLException; public static native void glClientActiveTextureARB(int texture); Index: EXTTextureRectangle.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureRectangle.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EXTTextureRectangle.java 12 Jun 2004 20:28:23 -0000 1.2 +++ EXTTextureRectangle.java 31 Jul 2004 09:34:09 -0000 1.3 @@ -31,10 +31,12 @@ */ package org.lwjgl.opengl; -public final class EXTTextureRectangle -{ +public final class EXTTextureRectangle { public static final int GL_TEXTURE_RECTANGLE_EXT = 0x84F5; public static final int GL_TEXTURE_BINDING_RECTANGLE_EXT = 0x84F6; public static final int GL_PROXY_TEXTURE_RECTANGLE_EXT = 0x84F7; public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = 0x84F8; + + private EXTTextureRectangle() { + } } Index: NVPixelDataRange.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVPixelDataRange.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NVPixelDataRange.java 29 Jul 2004 11:20:43 -0000 1.7 +++ NVPixelDataRange.java 31 Jul 2004 09:34:09 -0000 1.8 @@ -41,7 +41,6 @@ import org.lwjgl.BufferChecks; public final class NVPixelDataRange { - /* * Accepted by the <target> parameter of PixelDataRangeNV and * FlushPixelDataRangeNV, and by the <cap> parameter of @@ -63,6 +62,9 @@ public static final int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C; public static final int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D; + private NVPixelDataRange() { + } + static native void initNativeStubs() throws LWJGLException; // --------------------------- Index: ARBTextureBorderClamp.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTextureBorderClamp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ARBTextureBorderClamp.java 12 Jun 2004 20:28:23 -0000 1.3 +++ ARBTextureBorderClamp.java 31 Jul 2004 09:34:09 -0000 1.4 @@ -31,7 +31,9 @@ */ package org.lwjgl.opengl; -public final class ARBTextureBorderClamp -{ +public final class ARBTextureBorderClamp { public static final int GL_CLAMP_TO_BORDER_ARB = 0x812D; + + private ARBTextureBorderClamp() { + } } Index: NVFragmentProgram2.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram2.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NVFragmentProgram2.java 12 Jun 2004 20:28:24 -0000 1.2 +++ NVFragmentProgram2.java 31 Jul 2004 09:34:09 -0000 1.3 @@ -32,7 +32,6 @@ package org.lwjgl.opengl; public final class NVFragmentProgram2 { - /* * Accepted by the <pname> parameter of GetProgramivARB: */ @@ -42,4 +41,6 @@ public static final int GL_MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7; public static final int GL_MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8; -} \ No newline at end of file + private NVFragmentProgram2() { + } +} Index: ATIVertexStreams.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIVertexSt... [truncated message content] |
|
From: Elias N. <eli...@us...> - 2004-07-31 09:34:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24770/src/java/org/lwjgl/openal Modified Files: AL.java AL10.java ALC.java Log Message: Added private constructors to OpenAL and OpenGL static classes Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- AL.java 4 Jul 2004 14:08:53 -0000 1.29 +++ AL.java 31 Jul 2004 09:34:08 -0000 1.30 @@ -80,6 +80,9 @@ Sys.initialize(); } + private AL() { + } + /** * Native method to create AL instance * Index: AL10.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL10.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- AL10.java 29 Jul 2004 11:30:13 -0000 1.8 +++ AL10.java 31 Jul 2004 09:34:08 -0000 1.9 @@ -363,6 +363,9 @@ static native void initNativeStubs() throws LWJGLException; + private AL10() { + } + /** * The application can temporarily disable certain AL capabilities on a per Context * basis. This allows the driver implementation to optimize for certain subsets of Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ALC.java 29 Jul 2004 11:30:13 -0000 1.23 +++ ALC.java 31 Jul 2004 09:34:09 -0000 1.24 @@ -144,10 +144,7 @@ Sys.initialize(); } - /** - * Override to provide any initialization code after creation. - */ - protected static void init() { + private ALC() { } static native void initNativeStubs() throws LWJGLException; |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-07-30 14:12:02
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16810/platform_build/win32_vs_net Modified Files: lwjgl.vcproj lwjgl.suo Log Message: Removed dud old files Index: lwjgl.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.vcproj,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- lwjgl.vcproj 3 Jul 2004 11:45:52 -0000 1.6 +++ lwjgl.vcproj 30 Jul 2004 14:11:53 -0000 1.7 @@ -188,10 +188,13 @@ Name="win32" Filter=""> <File - RelativePath="..\..\src\native\win32\LWJGL.cpp"> + RelativePath="..\..\src\native\win32\display.cpp"> </File> <File - RelativePath="..\..\src\native\win32\org_lwjgl_Display.cpp"> + RelativePath="..\..\src\native\win32\extgl_wgl.cpp"> + </File> + <File + RelativePath="..\..\src\native\win32\LWJGL.cpp"> </File> <File RelativePath="..\..\src\native\win32\org_lwjgl_input_Controller.cpp"> @@ -206,10 +209,10 @@ RelativePath="..\..\src\native\win32\org_lwjgl_input_Mouse.cpp"> </File> <File - RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Pbuffer.cpp"> + RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Display.cpp"> </File> <File - RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Window.cpp"> + RelativePath="..\..\src\native\win32\org_lwjgl_opengl_Pbuffer.cpp"> </File> <File RelativePath="..\..\src\native\win32\org_lwjgl_Sys.cpp"> Index: lwjgl.suo =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.suo,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 Binary files /tmp/cvsycqfYb and /tmp/cvs0iGcXT differ |
|
From: Elias N. <eli...@us...> - 2004-07-30 13:58:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14657/linux Modified Files: org_lwjgl_opengl_Display.cpp Log Message: Removed commented out releaseContext() from linux Display.cpp Index: org_lwjgl_opengl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- org_lwjgl_opengl_Display.cpp 24 Jul 2004 22:17:03 -0000 1.13 +++ org_lwjgl_opengl_Display.cpp 30 Jul 2004 13:58:08 -0000 1.14 @@ -387,13 +387,6 @@ throwException(env, "Could not make display context current"); } -/*static void releaseContext(void) { - if (USEGLX13) - glXMakeContextCurrent(getDisplay(), None, None, NULL); - else - glXMakeCurrent(getDisplay(), None, NULL); -} -*/ int convertToBPE(int bpp) { int bpe; switch (bpp) { @@ -531,7 +524,6 @@ } static void destroyContext(void) { -// releaseContext(); if (USEGLX13) { XFree(configs); configs = NULL; |
|
From: Elias N. <eli...@us...> - 2004-07-30 13:30:26
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9454/linux Modified Files: org_lwjgl_input_Cursor.cpp org_lwjgl_input_Mouse.cpp org_lwjgl_opengl_Pbuffer.cpp Log Message: Added more missing decDisplay() Index: org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- org_lwjgl_input_Mouse.cpp 25 Jul 2004 14:28:50 -0000 1.58 +++ org_lwjgl_input_Mouse.cpp 30 Jul 2004 13:30:15 -0000 1.59 @@ -249,6 +249,7 @@ for (i = 0; i < NUM_BUTTONS; i++) buttons[i] = 0; if (!blankCursor()) { + decDisplay(); throwException(env, "Could not create blank cursor"); return; } Index: org_lwjgl_input_Cursor.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_input_Cursor.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- org_lwjgl_input_Cursor.cpp 25 Jul 2004 14:28:50 -0000 1.14 +++ org_lwjgl_input_Cursor.cpp 30 Jul 2004 13:30:15 -0000 1.15 @@ -60,8 +60,11 @@ XcursorPixel *pixels = (XcursorPixel *)env->GetDirectBufferAddress(image_buffer) + images_offset; int stride = width*height; XcursorImages *cursor_images = XcursorImagesCreate(num_images); - if (cursor_images == NULL) + if (cursor_images == NULL) { + decDisplay(); throwException(env, "Could not allocate cursor."); + return; + } cursor_images->nimage = num_images; for (int i = 0; i < num_images; i++) { XcursorImage *cursor_image = XcursorImageCreate(width, height); 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.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_opengl_Pbuffer.cpp 30 Jul 2004 13:26:11 -0000 1.26 +++ org_lwjgl_opengl_Pbuffer.cpp 30 Jul 2004 13:30:15 -0000 1.27 @@ -216,6 +216,7 @@ None, None}; if (env->GetDirectBufferCapacity(handle_buffer) < sizeof(PbufferInfo)) { + decDisplay(); throwException(env, "Handle buffer not large enough"); return; } |
|
From: Elias N. <eli...@us...> - 2004-07-30 13:26:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8653/linux Modified Files: org_lwjgl_opengl_Pbuffer.cpp Log Message: Added decDisplay to Pbuffer.cpp in linux to fix a potential X connection leak 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.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- org_lwjgl_opengl_Pbuffer.cpp 26 Jul 2004 14:42:13 -0000 1.25 +++ org_lwjgl_opengl_Pbuffer.cpp 30 Jul 2004 13:26:11 -0000 1.26 @@ -71,7 +71,6 @@ glXDestroyPbuffer(getDisplay(), buffer); if (!buffer_info->use_display_context) glXDestroyContext(getDisplay(), context); -// free(buffer_info); decDisplay(); } @@ -221,7 +220,6 @@ return; } PbufferInfo *buffer_info = (PbufferInfo *)env->GetDirectBufferAddress(handle_buffer); -// PbufferInfo *buffer_info = (PbufferInfo *)malloc(sizeof(PbufferInfo)); buffer_info->use_display_context = use_display_context; bool result; if (use_display_context) { @@ -229,9 +227,8 @@ } else { result = createPbufferUsingUniqueContext(env, buffer_info, pixel_format, width, height, buffer_attribs); } - if (!result) - return; - if (!checkXError(env)) { + if (!result || !checkXError(env)) { + decDisplay(); destroyPbuffer(buffer_info); return; } @@ -241,7 +238,6 @@ (JNIEnv *env, jclass clazz, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)env->GetDirectBufferAddress(handle_buffer); - //PbufferInfo *buffer_info = (PbufferInfo *)handle; GLXPbuffer buffer = buffer_info->buffer; GLXContext context = buffer_info->context; if (glXMakeContextCurrent(getDisplay(), buffer, buffer, context) == False) { @@ -249,16 +245,10 @@ } } -/* - * Class: org_lwjgl_opengl_Pbuffer - * Method: nDestroyGL - * Signature: (I)V - */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nDestroy (JNIEnv *env, jclass clazz, jobject handle_buffer) { PbufferInfo *buffer_info = (PbufferInfo *)env->GetDirectBufferAddress(handle_buffer); - //PbufferInfo *buffer_info = (PbufferInfo *)handle; destroyPbuffer(buffer_info); } |
|
From: Elias N. <eli...@us...> - 2004-07-29 15:45:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30610/opengl Modified Files: Display.java GLContext.java Pbuffer.java VBOTracker.java Log Message: Removed all instances of synchronized, as we're not really multithread safe anyway. It is up to the user of LWJGL to synchronize access to LWJGL Index: Pbuffer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Pbuffer.java 26 Jul 2004 14:27:34 -0000 1.28 +++ Pbuffer.java 29 Jul 2004 15:45:45 -0000 1.29 @@ -248,7 +248,7 @@ * * @return true if the buffer is lost and destroyed, false if the buffer is valid. */ - public synchronized boolean isBufferLost() { + public boolean isBufferLost() { return nIsBufferLost(handle); } @@ -261,7 +261,7 @@ * Method to make the Pbuffer context current. All subsequent OpenGL calls will go to this buffer. * @throws LWJGLException if the context could not be made current */ - public synchronized void makeCurrent() throws LWJGLException { + public void makeCurrent() throws LWJGLException { if (display_context != null && display_context != Display.getContext()) throw new IllegalStateException("Cannot make a Pbuffer current after the Display has been destroyed"); nMakeCurrent(handle); @@ -292,7 +292,7 @@ * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was * the current rendering context or not. */ - public synchronized void destroy() { + public void destroy() { try { makeCurrent(); int error = GL11.glGetError(); @@ -327,7 +327,7 @@ * @param attrib * @param value */ - public synchronized void setAttrib(int attrib, int value) { + public void setAttrib(int attrib, int value) { nSetAttrib(handle, attrib, value); } @@ -340,7 +340,7 @@ * * @param buffer */ - public synchronized void bindTexImage(int buffer) { + public void bindTexImage(int buffer) { nBindTexImage(handle, buffer); } @@ -351,7 +351,7 @@ * * @param buffer */ - public synchronized void releaseTexImage(int buffer) { + public void releaseTexImage(int buffer) { nReleaseTexImage(handle, buffer); } Index: VBOTracker.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/VBOTracker.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- VBOTracker.java 24 Jul 2004 16:34:07 -0000 1.15 +++ VBOTracker.java 29 Jul 2004 15:45:45 -0000 1.16 @@ -70,7 +70,7 @@ * VBO tracker. * @param context */ - static synchronized void setCurrent(Object context) { + static void setCurrent(Object context) { if (context == null) { current_tracker = null; return; Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- Display.java 29 Jul 2004 11:41:11 -0000 1.19 +++ Display.java 29 Jul 2004 15:45:45 -0000 1.20 @@ -494,7 +494,7 @@ * Make the Display the current rendering context for GL calls. Also initialize native stubs. * @throws LWJGLException If the context could not be made current */ - public static synchronized void makeCurrent() throws LWJGLException { + public static void makeCurrent() throws LWJGLException { if (!isCreated()) throw new IllegalStateException("No window created to make current"); nMakeCurrent(); @@ -627,7 +627,7 @@ * Destroy the Display. After this call, there will be no current GL rendering context, * regardless of whether the Display was the current rendering context. */ - public static synchronized void destroy() { + public static void destroy() { if (!isCreated()) { return; } Index: GLContext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLContext.java,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- GLContext.java 26 Jul 2004 14:50:33 -0000 1.26 +++ GLContext.java 29 Jul 2004 15:45:45 -0000 1.27 @@ -229,7 +229,7 @@ * the native stubs are unloaded. * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded */ - public static synchronized void useContext(Object context) throws LWJGLException { + public static void useContext(Object context) throws LWJGLException { if (context == null) { unloadStubs(); if (did_auto_load) |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:41:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18925/src/java/org/lwjgl/opengl Modified Files: Display.java Log Message: Converted *.allocateDirect to BufferUtils Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Display.java 28 Jul 2004 22:17:56 -0000 1.18 +++ Display.java 29 Jul 2004 11:41:11 -0000 1.19 @@ -48,6 +48,7 @@ import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferUtils; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; @@ -227,7 +228,7 @@ if (rampSize == 0) { throw new LWJGLException("Display configuration not supported"); } - FloatBuffer gammaRamp = ByteBuffer.allocateDirect(rampSize*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + FloatBuffer gammaRamp = BufferUtils.createFloatBuffer(rampSize); for (int i = 0; i < rampSize; i++) { float intensity = (float)i/(rampSize - 1); // apply gamma |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:41:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18925/src/java/org/lwjgl/openal/eax Modified Files: EAXBufferProperties.java Log Message: Converted *.allocateDirect to BufferUtils Index: EAXBufferProperties.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXBufferProperties.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- EAXBufferProperties.java 12 Jun 2004 20:28:23 -0000 1.14 +++ EAXBufferProperties.java 29 Jul 2004 11:41:10 -0000 1.15 @@ -35,6 +35,7 @@ import java.nio.ByteOrder; import org.lwjgl.Sys; +import org.lwjgl.BufferUtils; /** * $Id$ @@ -205,7 +206,7 @@ * Creates a new EAXBufferProperties object */ public EAXBufferProperties() { - eaxBufferProperties = ByteBuffer.allocateDirect(EAXBUFFERPROPERTIES_SIZE); + eaxBufferProperties = BufferUtils.createByteBuffer(EAXBUFFERPROPERTIES_SIZE); eaxBufferProperties.order(ByteOrder.nativeOrder()); } |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:41:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18925/src/java/org/lwjgl/opengl/glu Modified Files: MipMap.java Log Message: Converted *.allocateDirect to BufferUtils Index: MipMap.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/glu/MipMap.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- MipMap.java 12 Jun 2004 20:28:24 -0000 1.6 +++ MipMap.java 29 Jul 2004 11:41:11 -0000 1.7 @@ -34,6 +34,7 @@ import java.nio.ByteBuffer; import org.lwjgl.opengl.GL11; +import org.lwjgl.BufferUtils; /** * MipMap.java @@ -103,7 +104,7 @@ if (w != width || h != height) { // must rescale image to get "top" mipmap texture image - image = ByteBuffer.allocateDirect((w + 4) * h * bpp); + image = BufferUtils.createByteBuffer((w + 4) * h * bpp); error = gluScaleImage(format, width, height, type, data, w, h, type, image); if (error != 0) { retVal = error; @@ -130,7 +131,7 @@ neww = (w < 2) ? 1 : w / 2; newh = (h < 2) ? 1 : h / 2; - newimage = ByteBuffer.allocateDirect((neww + 4) * newh * bpp); + newimage = BufferUtils.createByteBuffer((neww + 4) * newh * bpp); error = gluScaleImage(format, w, h, type, image, neww, newh, type, newimage); if (error != 0) { |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:41:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18925/src/java/org/lwjgl/input Modified Files: Keyboard.java Log Message: Converted *.allocateDirect to BufferUtils Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- Keyboard.java 17 Jul 2004 09:36:01 -0000 1.50 +++ Keyboard.java 29 Jul 2004 11:41:10 -0000 1.51 @@ -234,7 +234,7 @@ private static boolean created; /** The keys status from the last poll */ - private static final ByteBuffer keyDownBuffer = ByteBuffer.allocateDirect(256); + private static final ByteBuffer keyDownBuffer = BufferUtils.createByteBuffer(256); /** * The key events from the last read: a sequence of pairs of key number, |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:30:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17534/src/java/org/lwjgl/openal Modified Files: AL10.java ALC.java ALCcontext.java Log Message: Added buffer checks to AL Index: ALC.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALC.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ALC.java 11 Jul 2004 08:09:34 -0000 1.22 +++ ALC.java 29 Jul 2004 11:30:13 -0000 1.23 @@ -36,6 +36,7 @@ import org.lwjgl.Sys; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ @@ -192,6 +193,7 @@ * @param integerdata ByteBuffer to write integers to */ public static void alcGetInteger(int pname, IntBuffer integerdata) { + BufferChecks.checkDirect(integerdata); nalcGetIntegerv(AL.device.device, pname, integerdata.remaining(), integerdata, integerdata.position()); } Index: AL10.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL10.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- AL10.java 4 Jul 2004 13:14:05 -0000 1.7 +++ AL10.java 29 Jul 2004 11:30:13 -0000 1.8 @@ -38,6 +38,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ @@ -465,8 +466,7 @@ * @param data Buffer to place the integers in */ public static void alGetInteger(int pname, IntBuffer data) { - if (data.remaining() <= 0) - throw new IllegalArgumentException("data.remaining() <= 0"); + BufferChecks.checkBuffer(data, 1); nalGetIntegerv(pname, data, data.position()); } private static native void nalGetIntegerv(int pname, IntBuffer data, int offset); @@ -486,8 +486,7 @@ * @param data Buffer to place the floats in */ public static void alGetFloat(int pname, FloatBuffer data) { - if (data.remaining() <= 0) - throw new IllegalArgumentException("data.remaining() <= 0"); + BufferChecks.checkBuffer(data, 1); nalGetFloatv(pname, data, data.position()); } private static native void nalGetFloatv(int pname, FloatBuffer data, int position); @@ -639,6 +638,7 @@ * @param value FloatBuffer containing value to set the attribute to */ public static void alListener(int pname, FloatBuffer value) { + BufferChecks.checkBuffer(value, 1); nalListenerfv(pname, value, value.position()); } public static native void nalListenerfv(int pname, FloatBuffer value, int offset); @@ -680,6 +680,8 @@ * @param floatdata Buffer to write floats to */ public static void alGetListener(int pname, FloatBuffer floatdata) { + // TODO: What's the real minimum number of elements? + BufferChecks.checkBuffer(floatdata, 1); nalGetListenerfv(pname, floatdata, floatdata.position()); } private static native void nalGetListenerfv(int pname, FloatBuffer floatdata, int offset); @@ -690,6 +692,7 @@ * @param sources array holding sources */ public static void alGenSources(IntBuffer sources) { + BufferChecks.checkDirect(sources); nalGenSources(sources.remaining(), sources, sources.position()); } private static native void nalGenSources(int n, IntBuffer sources, int offset); @@ -699,10 +702,11 @@ * * @param source Source array to delete from */ - public static void alDeleteSources(IntBuffer source) { - nalDeleteSources(source.remaining(), source, source.position()); + public static void alDeleteSources(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalDeleteSources(sources.remaining(), sources, sources.position()); } - private static native void nalDeleteSources(int n, IntBuffer source, int offset); + private static native void nalDeleteSources(int n, IntBuffer sources, int offset); /** * The application can verify whether a source name is valid using the IsSource query. @@ -736,11 +740,13 @@ * Specifies the position and other properties as taken into account during * sound processing. * - * @param source Source to det property on + * @param source Source to set property on * @param pname property to set * @param value FloatBuffer containing value of property */ public static void alSource(int source, int pname, FloatBuffer value) { + // TODO: What's the correct minimum value? + BufferChecks.checkBuffer(value, 1); nalSourcefv(source, pname, value, value.position()); } public static native void nalSourcefv(int source, int pname, FloatBuffer value, int offset); @@ -795,8 +801,8 @@ * @param floatdata Buffer to write floats to */ public static void alGetSource(int source, int pname, FloatBuffer floatdata) { - if (floatdata.remaining() <= 0) - throw new IllegalArgumentException("floatdata.remaining() <= 0"); + // TODO: What's the correct minimum value? + BufferChecks.checkBuffer(floatdata, 1); nalGetSourcefv(source, pname, floatdata, floatdata.position()); } private static native void nalGetSourcefv(int source, int pname, FloatBuffer floatdata, int position); @@ -814,6 +820,7 @@ * @param sources array of sources to play */ public static void alSourcePlay(IntBuffer sources) { + BufferChecks.checkDirect(sources); nalSourcePlayv(sources.remaining(), sources, sources.position()); } private static native void nalSourcePlayv(int n, IntBuffer sources, int offset); @@ -827,6 +834,7 @@ * @param sources array of sources to pause */ public static void alSourcePause(IntBuffer sources) { + BufferChecks.checkDirect(sources); nalSourcePausev(sources.remaining(), sources, sources.position()); } private static native void nalSourcePausev(int n, IntBuffer sources, int offset); @@ -841,6 +849,7 @@ * @param sources array of sources to stop */ public static void alSourceStop(IntBuffer sources) { + BufferChecks.checkDirect(sources); nalSourceStopv(sources.remaining(), sources, sources.position()); } private static native void nalSourceStopv(int n, IntBuffer sources, int offset); @@ -857,6 +866,7 @@ * @param sources array of sources to rewind */ public static void alSourceRewind(IntBuffer sources) { + BufferChecks.checkDirect(sources); nalSourceRewindv(sources.remaining(), sources, sources.position()); } private static native void nalSourceRewindv(int n, IntBuffer sources, int offset); @@ -915,6 +925,7 @@ * @param buffers holding buffers */ public static void alGenBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); nalGenBuffers(buffers.remaining(), buffers, buffers.position()); } private static native void nalGenBuffers(int n, IntBuffer buffers, int offset); @@ -936,6 +947,7 @@ * @param buffers Buffer to delete from */ public static void alDeleteBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); nalDeleteBuffers(buffers.remaining(), buffers, buffers.position()); } private static native void nalDeleteBuffers(int n, IntBuffer buffers, int offset); @@ -980,6 +992,7 @@ int format, ByteBuffer data, int freq) { + BufferChecks.checkDirect(data); nalBufferData(buffer, format, data, data.position(), data.remaining(), freq); } public static void alBufferData( @@ -987,6 +1000,7 @@ int format, ShortBuffer data, int freq) { + BufferChecks.checkDirect(data); nalBufferData(buffer, format, data, data.position() << 1, data.remaining() << 1, freq); } public static void alBufferData( @@ -994,6 +1008,7 @@ int format, IntBuffer data, int freq) { + BufferChecks.checkDirect(data); nalBufferData(buffer, format, data, data.position() << 2, data.remaining() << 2, freq); } private static native void nalBufferData( @@ -1041,6 +1056,7 @@ * @param buffers buffers to be queued */ public static void alSourceQueueBuffers(int source, IntBuffer buffers) { + BufferChecks.checkDirect(buffers); nalSourceQueueBuffers(source, buffers.remaining(), buffers, buffers.position()); } private static native void nalSourceQueueBuffers(int source, int n, IntBuffer buffers, int offset); Index: ALCcontext.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ALCcontext.java 12 Jun 2004 20:28:22 -0000 1.10 +++ ALCcontext.java 29 Jul 2004 11:30:13 -0000 1.11 @@ -35,6 +35,8 @@ import java.nio.ByteOrder; import java.nio.IntBuffer; +import org.lwjgl.BufferUtils; + /** * $Id$ * <br> @@ -44,30 +46,30 @@ * @version $Revision$ */ final class ALCcontext { - - /** address of actual context */ - final int context; - - /** - * Creates a new instance of ALCcontext - * - * @param context address of actual context - */ - ALCcontext(int context) { - this.context = context; - } - - static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { - IntBuffer attribList = ByteBuffer.allocateDirect(7*4).order(ByteOrder.nativeOrder()).asIntBuffer(); - - attribList.put(ALC.ALC_FREQUENCY); - attribList.put(contextFrequency); - attribList.put(ALC.ALC_REFRESH); - attribList.put(contextRefresh); - attribList.put(ALC.ALC_SYNC); - attribList.put(contextSynchronized); - attribList.put(0); //terminating int - - return attribList; - } -} \ No newline at end of file + + /** address of actual context */ + final int context; + + /** + * Creates a new instance of ALCcontext + * + * @param context address of actual context + */ + ALCcontext(int context) { + this.context = context; + } + + static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { + IntBuffer attribList = BufferUtils.createIntBuffer(7); + + attribList.put(ALC.ALC_FREQUENCY); + attribList.put(contextFrequency); + attribList.put(ALC.ALC_REFRESH); + attribList.put(contextRefresh); + attribList.put(ALC.ALC_SYNC); + attribList.put(contextSynchronized); + attribList.put(0); //terminating int + + return attribList; + } +} |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15990/src/java/org/lwjgl/opengl Modified Files: ARBBufferObject.java ARBImaging.java ARBMatrixPalette.java ARBOcclusionQuery.java ARBPointParameters.java ARBProgram.java ARBShaderObjects.java ARBTextureCompression.java ARBTransposeMatrix.java ARBVertexBlend.java ARBVertexProgram.java ARBVertexShader.java ATIDrawBuffers.java ATIElementArray.java ATIEnvmapBumpmap.java ATIFragmentShader.java ATIVertexArrayObject.java ATIVertexAttribArrayObject.java EXTDrawRangeElements.java EXTFogCoord.java EXTMultiDrawArrays.java EXTPointParameters.java EXTSecondaryColor.java EXTVertexShader.java EXTVertexWeighting.java GL11.java GL12.java GL13.java GL14.java GL15.java NVEvaluators.java NVFence.java NVFragmentProgram.java NVHalfFloat.java NVOcclusionQuery.java NVPixelDataRange.java NVPointSprite.java NVProgram.java NVRegisterCombiners.java NVRegisterCombiners2.java NVVertexArrayRange.java NVVertexProgram.java Added Files: GLBufferChecks.java Removed Files: BufferChecks.java Log Message: Split general buffer checks into org.lwjgl.BufferChecks and the gl specific buffer checks into org.lwjgl.opengl.GLBufferChecks Index: NVOcclusionQuery.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVOcclusionQuery.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NVOcclusionQuery.java 26 Jul 2004 13:36:04 -0000 1.7 +++ NVOcclusionQuery.java 29 Jul 2004 11:20:43 -0000 1.8 @@ -34,6 +34,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVOcclusionQuery { public static final int GL_OCCLUSION_TEST_HP = 0x8165; Index: EXTVertexShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTVertexShader.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTVertexShader.java 26 Jul 2004 13:36:03 -0000 1.8 +++ EXTVertexShader.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTVertexShader { public static final int GL_VERTEX_SHADER_EXT = 0x8780; @@ -276,27 +277,27 @@ private static native void nglVariantuivEXT(int id, IntBuffer piAddr, int piAddr_offset); public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) { BufferChecks.checkDirect(pAddr); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pAddr, pAddr.position()); } public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) { BufferChecks.checkDirect(pAddr); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position()<<1); } public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) { BufferChecks.checkDirect(pAddr); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position()<<2); } public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) { BufferChecks.checkDirect(pAddr); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position()<<2); } private static native void nglVariantPointerEXT(int id, int type, int stride, Buffer pAddr, int pAddr_offset); public static void glVariantPointerEXT(int id, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglVariantPointerEXTVBO(id, type, stride, buffer_offset); } private static native void nglVariantPointerEXTVBO(int id, int type, int stride, int buffer_offset); Index: ATIEnvmapBumpmap.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ATIEnvmapBumpmap.java 4 Jul 2004 13:14:05 -0000 1.6 +++ ATIEnvmapBumpmap.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -35,6 +35,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ATIEnvmapBumpmap { public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775; Index: ARBShaderObjects.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShaderObjects.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBShaderObjects.java 26 Jul 2004 13:35:59 -0000 1.9 +++ ARBShaderObjects.java 29 Jul 2004 11:20:43 -0000 1.10 @@ -37,6 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBShaderObjects { Index: EXTMultiDrawArrays.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTMultiDrawArrays.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- EXTMultiDrawArrays.java 26 Jul 2004 13:36:03 -0000 1.7 +++ EXTMultiDrawArrays.java 29 Jul 2004 11:20:43 -0000 1.8 @@ -34,6 +34,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTMultiDrawArrays { static native void initNativeStubs() throws LWJGLException; Index: NVFence.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFence.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NVFence.java 26 Jul 2004 13:36:03 -0000 1.7 +++ NVFence.java 29 Jul 2004 11:20:43 -0000 1.8 @@ -34,6 +34,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVFence { public static final int GL_ALL_COMPLETED_NV = 0x84F2; Index: NVProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVProgram.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NVProgram.java 26 Jul 2004 13:36:04 -0000 1.8 +++ NVProgram.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -36,6 +36,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public class NVProgram { Index: GL13.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL13.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GL13.java 26 Jul 2004 13:36:03 -0000 1.10 +++ GL13.java 29 Jul 2004 11:20:43 -0000 1.11 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ Index: ATIDrawBuffers.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIDrawBuffers.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ATIDrawBuffers.java 26 Jul 2004 13:36:02 -0000 1.8 +++ ATIDrawBuffers.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -34,6 +34,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ATIDrawBuffers { Index: EXTVertexWeighting.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTVertexWeighting.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTVertexWeighting.java 26 Jul 2004 13:36:03 -0000 1.8 +++ EXTVertexWeighting.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -35,6 +35,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTVertexWeighting { public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; /* alias to MODELVIEW_STACK_DEPTH */ @@ -57,12 +58,12 @@ public static void glVertexWeightPointerEXT(int size, int stride, FloatBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexWeightPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position()<<2); } private static native void nglVertexWeightPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_offset); public static void glVertexWeightPointerEXT(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglVertexWeightPointerEXTVBO(size, type, stride, buffer_offset); } private static native void nglVertexWeightPointerEXTVBO(int size, int type, int stride, int buffer_offset); Index: NVPointSprite.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVPointSprite.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- NVPointSprite.java 4 Jul 2004 13:14:05 -0000 1.6 +++ NVPointSprite.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -34,6 +34,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVPointSprite { public static final int GL_POINT_SPRITE_NV = 0x8861; Index: NVFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- NVFragmentProgram.java 26 Jul 2004 13:36:03 -0000 1.10 +++ NVFragmentProgram.java 29 Jul 2004 11:20:43 -0000 1.11 @@ -35,6 +35,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVFragmentProgram extends NVProgram { Index: ARBVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexProgram.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ARBVertexProgram.java 4 Jul 2004 13:14:05 -0000 1.9 +++ ARBVertexProgram.java 29 Jul 2004 11:20:43 -0000 1.10 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBVertexProgram extends ARBProgram { @@ -110,22 +111,22 @@ public static native void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w); public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, buffer, buffer.position()); } public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, buffer, buffer.position() << 1); } public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, buffer, buffer.position() << 2); } public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, buffer, buffer.position() << 2); } @@ -133,7 +134,7 @@ // --------------------------- public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, int bufferOffset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglVertexAttribPointerARBVBO(index, size, type, normalized, stride, bufferOffset); } Index: GL15.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL15.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- GL15.java 26 Jul 2004 13:36:03 -0000 1.9 +++ GL15.java 29 Jul 2004 11:20:43 -0000 1.10 @@ -34,6 +34,7 @@ import java.nio.*; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class GL15 { Index: ARBPointParameters.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBPointParameters.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ARBPointParameters.java 4 Jul 2004 13:14:05 -0000 1.7 +++ ARBPointParameters.java 29 Jul 2004 11:20:43 -0000 1.8 @@ -34,6 +34,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBPointParameters { public static final int GL_POINT_SIZE_MIN_ARB = 0x8126; Index: GL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL11.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- GL11.java 26 Jul 2004 13:36:03 -0000 1.17 +++ GL11.java 29 Jul 2004 11:20:43 -0000 1.18 @@ -31,6 +31,8 @@ */ package org.lwjgl.opengl; +import org.lwjgl.BufferChecks; + import java.nio.*; import java.nio.Buffer; import java.nio.BufferUnderflowException; @@ -769,17 +771,17 @@ public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglColorPointer(size, unsigned ? GL_UNSIGNED_BYTE : GL_BYTE, stride, pointer, pointer.position()); } public static void glColorPointer(int size, int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglColorPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); } private static native void nglColorPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static void glColorPointer(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglColorPointerVBO(size, type, stride, buffer_offset); } private static native void nglColorPointerVBO(int size, int type, int stride, int buffer_offset); @@ -810,47 +812,47 @@ public static native void glDisable(int cap); public static void glEdgeFlagPointer(int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglEdgeFlagPointer(stride, pointer, pointer.position()); } private static native void nglEdgeFlagPointer(int stride, Buffer pointer, int pointer_offset); public static void glEdgeFlagPointer(int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglEdgeFlagPointerVBO(stride, buffer_offset); } private static native void nglEdgeFlagPointerVBO(int stride, int buffer_offset); public static native void glEdgeFlag(boolean flag); public static void glDrawPixels(int width, int height, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglDrawPixels(width, height, format, type, pixels, pixels.position()); } public static void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglDrawPixels(width, height, format, type, pixels, pixels.position() << 1); } public static void glDrawPixels(int width, int height, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglDrawPixels(width, height, format, type, pixels, pixels.position() << 2); } private static native void nglDrawPixels(int width, int height, int format, int type, Buffer pixels, int pixels_offset); public static void glDrawElements(int mode, ByteBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawElements(mode, indices.remaining(), GL_UNSIGNED_BYTE, indices, indices.position()); } public static void glDrawElements(int mode, ShortBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawElements(mode, indices.remaining(), GL_UNSIGNED_SHORT, indices, indices.position() << 1); } public static void glDrawElements(int mode, IntBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawElements(mode, indices.remaining(), GL_UNSIGNED_INT, indices, indices.position() << 2); } private static native void nglDrawElements(int mode, int count, int type, Buffer indices, int indices_offset); public static void glDrawElements(int mode, int count, int type, int buffer_offset) { - BufferChecks.ensureElementVBOenabled(); + GLBufferChecks.ensureElementVBOenabled(); nglDrawElementsVBO(mode, count, type, buffer_offset); } private static native void nglDrawElementsVBO(int mode, int count, int type, int buffer_offset); @@ -969,27 +971,27 @@ public static native boolean glIsEnabled(int cap); public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglInterleavedArrays(format, stride, pointer, pointer.position()); } public static void glInterleavedArrays(int format, int stride, ShortBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglInterleavedArrays(format, stride, pointer, pointer.position() << 1); } public static void glInterleavedArrays(int format, int stride, IntBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglInterleavedArrays(format, stride, pointer, pointer.position() << 2); } public static void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglInterleavedArrays(format, stride, pointer, pointer.position() << 2); } private static native void nglInterleavedArrays(int format, int stride, Buffer pointer, int pointer_offset); public static void glInterleavedArrays(int format, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglInterleavedArraysVBO(format, stride, buffer_offset); } private static native void nglInterleavedArraysVBO(int format, int stride, int buffer_offset); @@ -1019,21 +1021,21 @@ int width = 1; int height = 1; int depth = 1; - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); nglGetTexImage(target, level, format, type, pixels, pixels.position()); } public static void glGetTexImage(int target, int level, int format, int type, ShortBuffer pixels) { int width = 1; int height = 1; int depth = 1; - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); nglGetTexImage(target, level, format, type, pixels, pixels.position() << 1); } public static void glGetTexImage(int target, int level, int format, int type, IntBuffer pixels) { int width = 1; int height = 1; int depth = 1; - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); nglGetTexImage(target, level, format, type, pixels, pixels.position() << 2); } private static native void nglGetTexImage(int target, int level, int format, int type, Buffer pixels, int pixels_offset); @@ -1163,22 +1165,22 @@ public static native void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar); public static void glNormalPointer(int stride, ByteBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglNormalPointer(GL_BYTE, stride, pointer, pointer.position()); } public static void glNormalPointer(int stride, IntBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglNormalPointer(GL_INT, stride, pointer, pointer.position() << 2); } public static void glNormalPointer(int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglNormalPointer(GL_FLOAT, stride, pointer, pointer.position() << 2); } private static native void nglNormalPointer(int type, int stride, Buffer pointer, int pointer_offset); public static void glNormalPointer(int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglNormalPointerVBO(type, stride, buffer_offset); } private static native void nglNormalPointerVBO(int type, int stride, int buffer_offset); @@ -1205,15 +1207,15 @@ public static native void glRectf(float x1, float y1, float x2, float y2); public static native void glRecti(int x1, int y1, int x2, int y2); public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position()); } public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 1); } public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 2); } private static native void nglReadPixels(int x, int y, int width, int height, int format, int type, Buffer pixels, int pixels_offset); @@ -1251,17 +1253,17 @@ public static native void glStencilFunc(int func, int ref, int mask); public static void glVertexPointer(int size, int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); } public static void glVertexPointer(int size, int stride, IntBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglVertexPointer(size, GL_INT, stride, pointer, pointer.position() << 2); } private static native void nglVertexPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static void glVertexPointer(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglVertexPointerVBO(size, type, stride, buffer_offset); } private static native void nglVertexPointerVBO(int size, int type, int stride, int buffer_offset); @@ -1273,28 +1275,28 @@ public static native void glVertex4i(int x, int y, int z, int w); public static native void glTranslatef(float x, float y, float z); public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position()); } public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 1); } public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); } private static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels, int pixels_offset); public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position()); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 1); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); } private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_offset); @@ -1311,36 +1313,36 @@ } private static native void nglTexParameteriv(int target, int pname, IntBuffer param, int param_position); public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position()); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 1); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 2); } public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 2); } private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_offset); public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position()); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 1); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 2); } public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 2); } private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_offset); @@ -1370,12 +1372,12 @@ private static native void nglTexEnviv(int target, int pname, IntBuffer params, int params_offset); public static void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { BufferChecks.checkDirect(pointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglTexCoordPointer(size, GL_FLOAT, stride, pointer, pointer.position() << 2); } private static native void nglTexCoordPointer(int size, int type, int stride, Buffer pointer, int pointer_offset); public static void glTexCoordPointer(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglTexCoordPointerVBO(size, type, stride, buffer_offset); } private static native void nglTexCoordPointerVBO(int size, int type, int stride, int buffer_offset); Index: ARBTextureCompression.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBTextureCompression.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ARBTextureCompression.java 26 Jul 2004 13:36:00 -0000 1.8 +++ ARBTextureCompression.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBTextureCompression { Index: ARBImaging.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBImaging.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ARBImaging.java 26 Jul 2004 13:35:59 -0000 1.8 +++ ARBImaging.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -40,6 +40,7 @@ import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ @@ -239,32 +240,32 @@ } private static native void nglGetMinmaxParameteriv(int target, int pname, IntBuffer params, int params_offset); public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, 1, 1)); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); nglConvolutionFilter1D(target, internalformat, width, format, type, image, image.position()); } private static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, Buffer image, int image_offset); public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, height, 1)); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position()); } public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() <<1); } public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) { - BufferChecks.checkBuffer(image, BufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + BufferChecks.checkBuffer(image, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); nglConvolutionFilter2D(target, internalformat, width, height, format, type, image, image.position() << 2); } private static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, Buffer image, int image_offset); Index: ATIFragmentShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIFragmentShader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ATIFragmentShader.java 4 Jul 2004 13:14:05 -0000 1.6 +++ ATIFragmentShader.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -39,6 +39,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ATIFragmentShader { public static final int GL_FRAGMENT_SHADER_ATI = 0x8920; Index: NVRegisterCombiners2.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVRegisterCombiners2.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- NVRegisterCombiners2.java 4 Jul 2004 13:14:05 -0000 1.6 +++ NVRegisterCombiners2.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -34,6 +34,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVRegisterCombiners2 { Index: GL12.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL12.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- GL12.java 26 Jul 2004 13:36:03 -0000 1.12 +++ GL12.java 29 Jul 2004 11:20:43 -0000 1.13 @@ -39,6 +39,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ @@ -95,56 +96,56 @@ public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, indices, indices.position()); } public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, indices, indices.position() << 1); } public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) { BufferChecks.checkDirect(indices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, indices, indices.position() << 2); } private static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices, int indices_offset); public static void glDrawRangeElements(int mode, int start, int end, int count, int type, int buffer_offset) { - BufferChecks.ensureElementVBOenabled(); + GLBufferChecks.ensureElementVBOenabled(); nglDrawRangeElementsVBO(mode, start, end, count, type, buffer_offset); } private static native void nglDrawRangeElementsVBO(int mode, int start, int end, int count, int type, int buffer_offset); public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position()); } public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 1); } public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2); } public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2); } private static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels, int pixels_offset); public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position()); } public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 1); } public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2); } public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, BufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2); } private static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels, int pixels_offset); Index: EXTSecondaryColor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTSecondaryColor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTSecondaryColor.java 26 Jul 2004 13:36:03 -0000 1.8 +++ EXTSecondaryColor.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -36,6 +36,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTSecondaryColor { public static final int GL_COLOR_SUM_EXT = 0x8458; @@ -56,18 +57,18 @@ public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, ByteBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglSecondaryColorPointerEXT(size, unsigned ? GL11.GL_UNSIGNED_BYTE: GL11.GL_BYTE, stride, pPointer, pPointer.position()); } public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglSecondaryColorPointerEXT(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position()<<2); } private static native void nglSecondaryColorPointerEXT(int size, int type, int stride, Buffer pPointer, int pPointer_offset); public static void glSecondaryColorPointerEXT(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglSecondaryColorPointerEXTVBO(size, type, stride, buffer_offset); } private static native void nglSecondaryColorPointerEXTVBO(int size, int type, int stride, int buffer_offset); Index: ARBVertexBlend.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBlend.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ARBVertexBlend.java 26 Jul 2004 13:36:00 -0000 1.8 +++ ARBVertexBlend.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBVertexBlend { public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4; @@ -129,27 +130,27 @@ public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pPointer, pPointer.position()); } public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pPointer, pPointer.position()<<1); } public static void glWeightPointerARB(int size, int stride, FloatBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglWeightPointerARB(size, GL11.GL_FLOAT, stride, pPointer, pPointer.position()<<2); } public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) { BufferChecks.checkDirect(pPointer); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pPointer, pPointer.position()<<2); } private static native void nglWeightPointerARB(int size, int type, int stride, Buffer pPointer, int pPointer_offset); public static void glWeightPointerARB(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglWeightPointerARBVBO(size, type, stride, buffer_offset); } private static native void nglWeightPointerARBVBO(int size, int type, int stride, int buffer_offset); Index: EXTFogCoord.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTFogCoord.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTFogCoord.java 26 Jul 2004 13:36:03 -0000 1.8 +++ EXTFogCoord.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -35,6 +35,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTFogCoord { public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450; @@ -52,12 +53,12 @@ public static native void glFogCoordfEXT(float coord); public static void glFogCoordPointerEXT(int stride, FloatBuffer data) { BufferChecks.checkDirect(data); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglFogCoordPointerEXT(GL11.GL_FLOAT, stride, data, data.position() << 2); } private static native void nglFogCoordPointerEXT(int type, int stride, Buffer data, int data_offset); public static void glFogCoordPointerEXT(int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglFogCoordPointerEXTVBO(type, stride, buffer_offset); } private static native void nglFogCoordPointerEXTVBO(int type, int stride, int buffer_offset); Index: EXTDrawRangeElements.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- EXTDrawRangeElements.java 26 Jul 2004 13:36:03 -0000 1.8 +++ EXTDrawRangeElements.java 29 Jul 2004 11:20:43 -0000 1.9 @@ -37,6 +37,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTDrawRangeElements { public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; @@ -46,23 +47,23 @@ public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) { BufferChecks.checkDirect(pIndices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_BYTE, pIndices, pIndices.position()); } public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) { BufferChecks.checkDirect(pIndices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position()<<1); } public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) { BufferChecks.checkDirect(pIndices); - BufferChecks.ensureElementVBOdisabled(); + GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position()<<2); } private static native void nglDrawRangeElementsEXT(int mode, int start, int end, int count, int type, Buffer pIndices, int pIndices_offset); public static void glDrawRangeElementsEXT(int mode, int start, int end, int count, int type, int buffer_offset) { - BufferChecks.ensureElementVBOenabled(); + GLBufferChecks.ensureElementVBOenabled(); nglDrawRangeElementsEXTVBO(mode, start, end, count, type, buffer_offset); } private static native void nglDrawRangeElementsEXTVBO(int mode, int start, int end, int count, int type, int buffer_offset); Index: GL14.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL14.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GL14.java 26 Jul 2004 13:36:03 -0000 1.11 +++ GL14.java 29 Jul 2004 11:20:43 -0000 1.12 @@ -37,6 +37,7 @@ import java.nio.IntBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; /** * $Id$ @@ -94,12 +95,12 @@ public static native void glFogCoordf(float coord); public static void glFogCoordPointer(int stride, FloatBuffer data) { BufferChecks.checkDirect(data); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglFogCoordPointer(GL11.GL_FLOAT, stride, data, data.position() << 2); } private static native void nglFogCoordPointer(int type, int stride, Buffer data, int data_offset); public static void glFogCoordPointer(int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglFogCoordPointerVBO(type, stride, buffer_offset); } private static native void nglFogCoordPointerVBO(int type, int stride, int buffer_offset); @@ -124,17 +125,17 @@ public static native void glSecondaryColor3ub (byte red, byte green, byte blue); public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, ByteBuffer data) { BufferChecks.checkDirect(data); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglSecondaryColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, data, data.position()); } public static void glSecondaryColorPointer(int size, int stride, FloatBuffer data) { BufferChecks.checkDirect(data); - BufferChecks.ensureArrayVBOdisabled(); + GLBufferChecks.ensureArrayVBOdisabled(); nglSecondaryColorPointer(size, GL11.GL_FLOAT, stride, data, data.position() << 2); } private static native void nglSecondaryColorPointer (int size, int type, int stride, Buffer data, int data_offset); public static void glSecondaryColorPointer(int size, int type, int stride, int buffer_offset) { - BufferChecks.ensureArrayVBOenabled(); + GLBufferChecks.ensureArrayVBOenabled(); nglSecondaryColorPointerVBO(size, type, stride, buffer_offset); } private static native void nglSecondaryColorPointerVBO(int size, int type, int stride, int buffer_offset); Index: EXTPointParameters.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTPointParameters.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- EXTPointParameters.java 26 Jul 2004 13:36:03 -0000 1.7 +++ EXTPointParameters.java 29 Jul 2004 11:20:43 -0000 1.8 @@ -34,6 +34,7 @@ import java.nio.FloatBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class EXTPointParameters { public static final int GL_POINT_SIZE_MIN_EXT = 0x8126; Index: ARBBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBBufferObject.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ARBBufferObject.java 26 Jul 2004 13:35:59 -0000 1.6 +++ ARBBufferObject.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -38,6 +38,7 @@ import java.nio.ShortBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class ARBBufferObject { Index: NVVertexArrayRange.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexArrayRange.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- NVVertexArrayRange.java 26 Jul 2004 13:36:04 -0000 1.6 +++ NVVertexArrayRange.java 29 Jul 2004 11:20:43 -0000 1.7 @@ -35,6 +35,7 @@ import java.nio.ByteBuffer; import org.lwjgl.LWJGLException; +import org.lwjgl.BufferChecks; public final class NVVertexArrayRange { public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D; --- NEW FILE: GLBufferChecks.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO E... [truncated message content] |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:20:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15990/src/java/org/lwjgl Added Files: BufferChecks.java Log Message: Split general buffer checks into org.lwjgl.BufferChecks and the gl specific buffer checks into org.lwjgl.opengl.GLBufferChecks --- NEW FILE: BufferChecks.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ShortBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.nio.DoubleBuffer; /** * $Id: BufferChecks.java,v 1.1 2004/07/29 11:20:42 elias_naur Exp $ A class to * check buffer boundaries in general. If there is unsufficient space * in the buffer when the call is made then a buffer overflow would otherwise * occur and cause unexpected behaviour, a crash, or worse, a security risk. * * @author cix_foo <ci...@us...> * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ public class BufferChecks { /** Static methods only! */ private BufferChecks() { } /** * Default buffer size for most buffer checks. */ private static final int DEFAULT_BUFFER_SIZE = 4; /** * Helper methods to ensure a buffer is direct or null. */ public static void checkDirectOrNull(ByteBuffer buf) { if (buf != null) { checkDirect(buf); } } public static void checkDirectOrNull(FloatBuffer buf) { if (buf != null) { checkDirect(buf); } } public static void checkDirectOrNull(ShortBuffer buf) { if (buf != null) { checkDirect(buf); } } public static void checkDirectOrNull(IntBuffer buf) { if (buf != null) { checkDirect(buf); } } public static void checkDirectOrNull(DoubleBuffer buf) { if (buf != null) { checkDirect(buf); } } /** * Helper methods to ensure a buffer is direct (and, implicitly, non-null). */ public static void checkDirectBuffer(Buffer buf) { if (buf instanceof ByteBuffer) checkDirect((ByteBuffer)buf); else if (buf instanceof ShortBuffer) checkDirect((ShortBuffer)buf); else if (buf instanceof IntBuffer) checkDirect((IntBuffer)buf); else if (buf instanceof FloatBuffer) checkDirect((FloatBuffer)buf); else if (buf instanceof DoubleBuffer) checkDirect((DoubleBuffer)buf); else throw new IllegalStateException("Unsupported buffer type"); } public static void checkDirect(ByteBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("ByteBuffer is not direct"); } } public static void checkDirect(FloatBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("FloatBuffer is not direct"); } } public static void checkDirect(ShortBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("ShortBuffer is not direct"); } } public static void checkDirect(IntBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("IntBuffer is not direct"); } } public static void checkDirect(DoubleBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("IntBuffer is not direct"); } } /** * Helper method to ensure a buffer is big enough to receive data from a * glGet* operation. * * @param buf * The buffer to check * @param size * The minimum buffer size * @throws BufferOverflowException */ private static void checkBufferSize(Buffer buf, int size) { if (buf.remaining() < size) { throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size); } } public static void checkBuffer(ByteBuffer buf, int size) { checkBufferSize(buf, size); checkDirect(buf); } public static void checkBuffer(IntBuffer buf, int size) { checkBufferSize(buf, size); checkDirect(buf); } public static void checkBuffer(ShortBuffer buf, int size) { checkBufferSize(buf, size); checkDirect(buf); } public static void checkBuffer(FloatBuffer buf, int size) { checkBufferSize(buf, size); checkDirect(buf); } public static void checkBuffer(DoubleBuffer buf, int size) { checkBufferSize(buf, size); checkDirect(buf); } /** * Helper methods to ensure a buffer is big enough to receive data from a * glGet* operation. To avoid unnecessarily complex buffer size checking * we've just set the bar artificially high and insist that any receiving * buffer has at least 4 remaining(). * * @param buf * The buffer to check * @throws BufferOverflowException */ public static void checkBuffer(ByteBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } public static void checkBuffer(ShortBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } public static void checkBuffer(FloatBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } public static void checkBuffer(IntBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } public static void checkBuffer(DoubleBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } } |
|
From: Elias N. <eli...@us...> - 2004-07-29 11:20:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15990/src/java/org/lwjgl/input Modified Files: Cursor.java Log Message: Split general buffer checks into org.lwjgl.BufferChecks and the gl specific buffer checks into org.lwjgl.opengl.GLBufferChecks Index: Cursor.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Cursor.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Cursor.java 25 Jul 2004 14:28:49 -0000 1.28 +++ Cursor.java 29 Jul 2004 11:20:43 -0000 1.29 @@ -36,6 +36,7 @@ import org.lwjgl.LWJGLException; import org.lwjgl.BufferUtils; +import org.lwjgl.BufferChecks; import org.lwjgl.Sys; /** @@ -72,12 +73,13 @@ * @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 LWJGLException { + BufferChecks.checkBuffer(images, width*height*numImages); if (!Mouse.isCreated()) throw new IllegalStateException("Mouse must be created before creating cursor objects"); if (width*height*numImages > images.remaining()) throw new IllegalArgumentException("width*height*numImages > images.remaining()"); if (delays != null && numImages > delays.remaining()) - throw new IllegalArgumentException("delays != null && numImages > delays.remaining()"); + BufferChecks.checkBuffer(delays, numImages); if (xHotspot >= width || xHotspot < 0) throw new IllegalArgumentException("xHotspot > width || xHotspot < 0"); if (yHotspot >= height || yHotspot < 0) |
|
From: Elias N. <eli...@us...> - 2004-07-28 22:26:40
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10885/src/native/win32 Modified Files: org_lwjgl_opengl_Display.cpp Log Message: Typo Index: org_lwjgl_opengl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- org_lwjgl_opengl_Display.cpp 26 Jul 2004 19:37:41 -0000 1.19 +++ org_lwjgl_opengl_Display.cpp 28 Jul 2004 22:26:29 -0000 1.20 @@ -720,7 +720,7 @@ pixel_format_index = pixel_format_index_arb; } else if (samples > 0) { wglDeleteContext(display_hglrc); - throwException(env, "Samples > 0 but could not finc a suitable ARB pixel format"); + throwException(env, "Samples > 0 but could not find a suitable ARB pixel format"); } } |
|
From: Elias N. <eli...@us...> - 2004-07-28 22:18:08
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9026/src/java/org/lwjgl/opengl Modified Files: Display.java Log Message: Removed redundant vbo_tracker from Display.java Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Display.java 21 Jul 2004 21:51:36 -0000 1.17 +++ Display.java 28 Jul 2004 22:17:56 -0000 1.18 @@ -93,9 +93,6 @@ /** 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 Display context; |
|
From: Elias N. <eli...@us...> - 2004-07-27 17:08:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5268/input Modified Files: Mouse.java Log Message: Add missing initialized check to Mouse.java Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- Mouse.java 25 Jul 2004 14:28:49 -0000 1.64 +++ Mouse.java 27 Jul 2004 17:08:48 -0000 1.65 @@ -271,7 +271,8 @@ public static void create() throws LWJGLException { if (!Display.isCreated()) throw new IllegalStateException("Display must be created prior to creating mouse"); - initialize(); + if (!initialized) + initialize(); if (created) { return; } nCreate(); hasWheel = nHasWheel(); |
|
From: Elias N. <eli...@us...> - 2004-07-27 04:09:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6965/src/native/win32 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Fix comment in Mouse.cpp Index: org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- org_lwjgl_input_Mouse.cpp 26 Jul 2004 18:57:18 -0000 1.60 +++ org_lwjgl_input_Mouse.cpp 26 Jul 2004 18:59:40 -0000 1.61 @@ -387,9 +387,9 @@ GetCursorPos(&newCursorPos); ScreenToClient(getCurrentHWND(), &newCursorPos); GetClientRect(getCurrentHWND(), &clientRect); + // Clip the position to the client rect newCursorPos.x = cap(newCursorPos.x, clientRect.left, clientRect.right - 1); newCursorPos.y = cap(newCursorPos.y, clientRect.top, clientRect.bottom - 1); - // Clip the position to the client rect dx = newCursorPos.x - cursorPos.x; dy = newCursorPos.y - cursorPos.y; cursorPos.x += dx; |
|
From: Ioannis T. <sp...@us...> - 2004-07-26 22:25:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16621 Modified Files: UniqueRendererRTT.java Log Message: Fixed rtt Index: UniqueRendererRTT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- UniqueRendererRTT.java 26 Jul 2004 19:14:20 -0000 1.1 +++ UniqueRendererRTT.java 26 Jul 2004 22:25:02 -0000 1.2 @@ -67,12 +67,12 @@ super.enable(); // Put the renderer contents to the texture - pbuffer.releaseTexImage(Pbuffer.BACK_LEFT_BUFFER); + pbuffer.releaseTexImage(Pbuffer.FRONT_LEFT_BUFFER); } void updateTexture() { // Bind the texture after rendering. - pbuffer.bindTexImage(Pbuffer.BACK_LEFT_BUFFER); + pbuffer.bindTexImage(Pbuffer.FRONT_LEFT_BUFFER); } } \ No newline at end of file |
|
From: Elias N. <eli...@us...> - 2004-07-26 19:37:54
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14774/src/native/win32 Modified Files: org_lwjgl_opengl_Display.cpp org_lwjgl_opengl_Pbuffer.cpp Log Message: Fixed a neverending loop in findPixelFormatARBFromBPP Index: org_lwjgl_opengl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Display.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_opengl_Display.cpp 26 Jul 2004 17:01:56 -0000 1.18 +++ org_lwjgl_opengl_Display.cpp 26 Jul 2004 19:37:41 -0000 1.19 @@ -137,7 +137,7 @@ GLuint *pixelFormatCaps_ptr = (GLuint *)env->GetDirectBufferAddress(pixelFormatCaps); jlong pixelFormatCapsSize = env->GetDirectBufferCapacity(pixelFormatCaps); - for (jlong i = 0; i < pixelFormatCapsSize;) + for (jlong i = 0; i < pixelFormatCapsSize; i++) putAttrib(&attrib_list, pixelFormatCaps_ptr[i]); } putAttrib(&attrib_list, 0); putAttrib(&attrib_list, 0); Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- org_lwjgl_opengl_Pbuffer.cpp 26 Jul 2004 19:13:02 -0000 1.18 +++ org_lwjgl_opengl_Pbuffer.cpp 26 Jul 2004 19:37:43 -0000 1.19 @@ -186,7 +186,6 @@ } PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)malloc(sizeof(PbufferInfo)); Pbuffer_info->Pbuffer = Pbuffer; Pbuffer_info->Pbuffer_context = Pbuffer_context; Pbuffer_info->Pbuffer_dc = Pbuffer_dc; @@ -197,7 +196,6 @@ (JNIEnv *env, jclass clazz, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; BOOL buffer_lost; wglQueryPbufferARB(Pbuffer_info->Pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost); return buffer_lost ? JNI_TRUE : JNI_FALSE; @@ -216,19 +214,16 @@ (JNIEnv *env, jclass clazz, jobject buffer_handle) { PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; if (!Pbuffer_info->use_display_context) wglDeleteContext(Pbuffer_info->Pbuffer_context); wglReleasePbufferDCARB(Pbuffer_info->Pbuffer, Pbuffer_info->Pbuffer_dc); wglDestroyPbufferARB(Pbuffer_info->Pbuffer); -// free(Pbuffer_info); } JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nSetAttrib (JNIEnv *env, jclass clazz, jobject buffer_handle, jint attrib, jint value) { PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; int attribs[3]; @@ -243,7 +238,6 @@ (JNIEnv *env, jclass clazz, jobject buffer_handle, jint buffer) { PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; wglBindTexImageARB(Pbuffer_info->Pbuffer, buffer); } @@ -251,6 +245,5 @@ (JNIEnv *env, jclass clazz, jobject buffer_handle, jint buffer) { PbufferInfo *Pbuffer_info = (PbufferInfo *)env->GetDirectBufferAddress(buffer_handle); -// PbufferInfo *Pbuffer_info = (PbufferInfo *)handle; wglReleaseTexImageARB(Pbuffer_info->Pbuffer, buffer); } |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10090 Added Files: PbufferTest.java SharedRenderer.java SharedRendererRTT.java TextureRenderer.java UniqueRenderer.java UniqueRendererRTT.java Log Message: pbuffer tests --- NEW FILE: SharedRendererRTT.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.Pbuffer; import org.lwjgl.opengl.RenderTexture; final class SharedRendererRTT extends TextureRenderer { SharedRendererRTT(final int width, final int height, final int texID) { super(width, height, texID); } protected Pbuffer init(final int width, final int height, final int texID) { Pbuffer pbuffer = null; try { final RenderTexture rt = new RenderTexture(true, false, false, false, RenderTexture.RENDER_TEXTURE_2D, 0); pbuffer = Pbuffer.createPbufferUsingDisplayContext(width, height, rt); } catch (LWJGLException e) { e.printStackTrace(); System.exit(-1); } return pbuffer; } void enable() { super.enable(); // Change the current state, since we're sharing the display context. PbufferTest.initGLState(width, height, 0.5f); GL11.glDisable(GL11.GL_TEXTURE_2D); // Release the texture before rendering. pbuffer.releaseTexImage(Pbuffer.BACK_LEFT_BUFFER); } void updateTexture() { // Bind the texture after rendering. pbuffer.bindTexImage(Pbuffer.BACK_LEFT_BUFFER); // Restore the display state. PbufferTest.initGLState(800, 600, 0.0f); GL11.glEnable(GL11.GL_TEXTURE_2D); } } --- NEW FILE: UniqueRenderer.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.opengl.Pbuffer; import org.lwjgl.opengl.PixelFormat; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.Display; import org.lwjgl.LWJGLException; final class UniqueRenderer extends TextureRenderer { UniqueRenderer(final int width, final int height, final int texID) { super(width, height, texID); } protected Pbuffer init(final int width, final int height, final int texID) { Pbuffer pbuffer = null; try { pbuffer = Pbuffer.createPbufferUsingUniqueContext(width, height, new PixelFormat(16, 0, 0, 0, 0), null); // Initialise state of the pbuffer context. pbuffer.makeCurrent(); PbufferTest.initGLState(width, height, 0.5f); GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID); Display.makeCurrent(); } catch (LWJGLException e) { e.printStackTrace(); System.exit(-1); } return pbuffer; } public void updateTexture() { // Copy the pbuffer contents to the texture. GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, 0, 0, width, height, 0); } } --- NEW FILE: TextureRenderer.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Pbuffer; /** * Implementations of this class should create a pbuffer and implement "render-to-texture" accordingly. */ abstract class TextureRenderer { protected final int width; protected final int height; private final int texID; protected Pbuffer pbuffer; protected TextureRenderer(final int width, final int height, final int texID) { this.width = width; this.height = height; this.texID = texID; try { pbuffer = init(width, height, texID); } catch (LWJGLException e) { e.printStackTrace(); System.exit(-1); } } /** * Create and initialize the pbuffer. * * @param width * @param height * @param texID * @return * @throws LWJGLException */ protected abstract Pbuffer init(int width, int height, int texID) throws LWJGLException; /** * This will be called before rendering to the renderer. Implementations should setup the pbuffer context as necessary. */ void enable() { try { if ( pbuffer.isBufferLost() ) { System.out.println("Buffer contents lost - recreating the pbuffer"); pbuffer.destroy(); pbuffer = init(width, height, texID); } pbuffer.makeCurrent(); } catch (LWJGLException e) { throw new RuntimeException(e); } } /** * Implementations should update the texture contents here. */ abstract void updateTexture(); /** * Clean-up resources held by the renderer */ final void destroy() { pbuffer.destroy(); } } --- NEW FILE: SharedRenderer.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.Pbuffer; final class SharedRenderer extends TextureRenderer { SharedRenderer(final int width, final int height, final int texID) { super(width, height, texID); } protected Pbuffer init(final int width, final int height, final int texID) { Pbuffer pbuffer = null; try { pbuffer = Pbuffer.createPbufferUsingDisplayContext(width, height, null); } catch (LWJGLException e) { e.printStackTrace(); System.exit(-1); } return pbuffer; } void enable() { super.enable(); // Change the current state, since we're sharing the display context. PbufferTest.initGLState(width, height, 0.5f); GL11.glDisable(GL11.GL_TEXTURE_2D); } public void updateTexture() { // Copy the pbuffer contents to the texture. GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, 0, 0, width, height, 0); // Restore the display state. PbufferTest.initGLState(800, 600, 0.0f); GL11.glEnable(GL11.GL_TEXTURE_2D); } } --- NEW FILE: PbufferTest.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.input.Keyboard; import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; import org.lwjgl.util.vector.Vector2f; import java.nio.IntBuffer; /** * $Id: PbufferTest.java,v 1.1 2004/07/26 19:14:19 spasi Exp $ * <p/> * Tests Pbuffers * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ public final class PbufferTest { /** * Texture and pbuffer size */ private static final int TEXTURE_SIZE = 512; /** * Size of the animated quad */ private static final int QUAD_SIZE = 64; /** * The renderer to use when rendering to texture. */ private TextureRenderer texRenderer; /** * Intended deiplay mode */ private DisplayMode mode; /** * our quad moving around */ private Vector2f quadPosition; /** * For positioning our quad in the texture */ private float texScaleX, texScaleY; /** * our quadVelocity */ private Vector2f quadVelocity; /** * angle of quad */ private float angle; /** * degrees to rotate per frame */ private float angleRotation = 1.0f; /** * Max speed of all changable attributes */ private static final float MAX_SPEED = 20.0f; /** * The shared texture */ private static int texID; public PbufferTest(final int renderMode) { try { //find displaymode mode = findDisplayMode(800, 600, 16); Display.setDisplayMode(mode); Display.create(new PixelFormat(16, 0, 0, 0, 0)); glInit(); if ( (Pbuffer.getPbufferCaps() & Pbuffer.PBUFFER_SUPPORTED) == 0 ) { System.out.println("No Pbuffer support!"); System.exit(-1); } System.out.println("Pbuffer support detected. Initializing...\n"); switch ( renderMode ) { case 1: System.out.print("Creating pbuffer with unique context..."); texRenderer = new UniqueRenderer(TEXTURE_SIZE, TEXTURE_SIZE, texID); break; case 2: System.out.print("Creating render-to-texture pbuffer with unique context..."); texRenderer = new UniqueRendererRTT(TEXTURE_SIZE, TEXTURE_SIZE, texID); break; case 3: System.out.print("Creating pbuffer with shared context..."); texRenderer = new SharedRenderer(TEXTURE_SIZE, TEXTURE_SIZE, texID); break; case 4: System.out.print("Creating render-to-texture pbuffer with shared context..."); texRenderer = new SharedRendererRTT(TEXTURE_SIZE, TEXTURE_SIZE, texID); break; } System.out.println("OK"); quadPosition = new Vector2f(100f, 100f); quadVelocity = new Vector2f(1.0f, 1.0f); texScaleX = TEXTURE_SIZE / (float)mode.getWidth(); texScaleY = TEXTURE_SIZE / (float)mode.getHeight(); } catch (Exception e) { e.printStackTrace(); } } /** * Executes the test */ public void execute() { mainLoop(); cleanup(); } /** * Runs the main loop of the "test" */ private void mainLoop() { while ( !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested() ) { if ( Display.isVisible() ) { // check keyboard input processKeyboard(); // do "game" logic, and render it logic(); render(); } else { // no need to render/paint if nothing has changed (ie. window dragged over) if ( Display.isDirty() ) render(); // don't waste cpu time, sleep more try { Thread.sleep(100); } catch (InterruptedException inte) { } } // Update window Display.update(); // Sync Display.sync(100); } } /** * Performs the logic */ private void logic() { angle += angleRotation; if ( angle > 360.0f ) angle -= 360.0f; quadPosition.x += quadVelocity.x; quadPosition.y += quadVelocity.y; // check colision with vertical border border if ( quadPosition.x + QUAD_SIZE >= mode.getWidth() || quadPosition.x - QUAD_SIZE <= 0 ) quadVelocity.x *= -1; // check collision with horizontal border if ( quadPosition.y + QUAD_SIZE >= mode.getHeight() || quadPosition.y - QUAD_SIZE <= 0 ) quadVelocity.y *= -1; } private void render() { // ----------------------------------------------------------- // -------------------- Pbuffer rendering -------------------- // ----------------------------------------------------------- // Tell the pbuffer to get ready for rendering texRenderer.enable(); // Clear the background GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); // Draw quad with gradient GL11.glPushMatrix(); { GL11.glTranslatef(quadPosition.x * texScaleX, quadPosition.y * texScaleY, 0); GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f); GL11.glBegin(GL11.GL_QUADS); { GL11.glColor3f(1.0f, 0.0f, 0.0f); GL11.glVertex2i(-QUAD_SIZE, -QUAD_SIZE); GL11.glVertex2i(QUAD_SIZE, -QUAD_SIZE); GL11.glColor3f(0.0f, 0.0f, 1.0f); GL11.glVertex2i(QUAD_SIZE, QUAD_SIZE); GL11.glVertex2i(-QUAD_SIZE, QUAD_SIZE); } GL11.glEnd(); } GL11.glPopMatrix(); // Refresh the texture texRenderer.updateTexture(); // ----------------------------------------------------------- // -------------------- Display rendering -------------------- // ----------------------------------------------------------- try { Display.makeCurrent(); } catch (LWJGLException e) { throw new RuntimeException(e); } GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); // draw white quad GL11.glPushMatrix(); { GL11.glTranslatef(quadPosition.x, quadPosition.y, 0); GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f); GL11.glColor3f(1.0f, 1.0f, 1.0f); GL11.glBegin(GL11.GL_QUADS); { GL11.glTexCoord2f(0f, 0f); GL11.glVertex2i(-QUAD_SIZE, -QUAD_SIZE); GL11.glTexCoord2f(1f, 0f); GL11.glVertex2i(QUAD_SIZE, -QUAD_SIZE); GL11.glTexCoord2f(1f, 1f); GL11.glVertex2i(QUAD_SIZE, QUAD_SIZE); GL11.glTexCoord2f(0f, 1f); GL11.glVertex2i(-QUAD_SIZE, QUAD_SIZE); } GL11.glEnd(); } GL11.glPopMatrix(); } /** * Processes keyboard input */ private void processKeyboard() { Keyboard.poll(); //check for fullscreen key if ( Keyboard.isKeyDown(Keyboard.KEY_F) ) { try { Display.setDisplayMode(mode); Display.setFullscreen(true); } catch (Exception e) { e.printStackTrace(); } } //check for window key if ( Keyboard.isKeyDown(Keyboard.KEY_W) ) { try { Display.setFullscreen(false); } catch (Exception e) { e.printStackTrace(); } } //check for speed changes if ( Keyboard.isKeyDown(Keyboard.KEY_UP) ) quadVelocity.y += 0.1f; if ( Keyboard.isKeyDown(Keyboard.KEY_DOWN) ) quadVelocity.y -= 0.1f; if ( Keyboard.isKeyDown(Keyboard.KEY_RIGHT) ) quadVelocity.x += 0.1f; if ( Keyboard.isKeyDown(Keyboard.KEY_LEFT) ) quadVelocity.x -= 0.1f; if ( Keyboard.isKeyDown(Keyboard.KEY_ADD) ) angleRotation += 0.1f; if ( Keyboard.isKeyDown(Keyboard.KEY_SUBTRACT) ) angleRotation -= 0.1f; //throttle if ( quadVelocity.x < -MAX_SPEED ) quadVelocity.x = -MAX_SPEED; if ( quadVelocity.x > MAX_SPEED ) quadVelocity.x = MAX_SPEED; if ( quadVelocity.y < -MAX_SPEED ) quadVelocity.y = -MAX_SPEED; if ( quadVelocity.y > MAX_SPEED ) quadVelocity.y = MAX_SPEED; if ( angleRotation < 0.0f ) angleRotation = 0.0f; if ( angleRotation > MAX_SPEED ) angleRotation = MAX_SPEED; } /** * Cleans up the test */ private void cleanup() { // Destroy texture IntBuffer buffer = BufferUtils.createIntBuffer(1); buffer.put(0, texID); GL11.glDeleteTextures(buffer); texRenderer.destroy(); Display.destroy(); } /** * Retrieves a displaymode, if one such is available * * @param width Required width * @param height Required height * @param bpp Minimum required bits per pixel * * @return */ private DisplayMode findDisplayMode(int width, int height, int bpp) { DisplayMode[] modes = Display.getAvailableDisplayModes(); for ( int i = 0; i < modes.length; i++ ) { if ( modes[i].getWidth() == width && modes[i].getHeight() == height && modes[i].getBitsPerPixel() >= bpp ) { return modes[i]; } } return null; } static void initGLState(int width, int height, float color) { GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GLU.gluOrtho2D(0, width, 0, height); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glViewport(0, 0, width, height); //set clear color GL11.glClearColor(color, color, color, 0.0f); } /** * Initializes OGL */ private void glInit() { // Sync frame (only works on windows) Display.setVSyncEnabled(true); // Create shared texture IntBuffer buffer = BufferUtils.createIntBuffer(1); GL11.glGenTextures(buffer); texID = buffer.get(0); GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_MODULATE); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR); initGLState(mode.getWidth(), mode.getHeight(), 0.0f); } /** * Test entry point */ public static void main(String[] args) { if ( args.length != 1 ) kill("Invalid arguments length."); int mode = -1; try { mode = Integer.parseInt(args[0]); } catch (NumberFormatException e) { kill("Invalid mode."); } if ( mode < 1 || mode > 4 ) kill("Invalid mode."); System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively"); System.out.println("Move quad using arrowkeys, and change rotation using +/-"); PbufferTest test = new PbufferTest(mode); test.execute(); } private static void kill(final String msg) { System.out.println(msg); System.out.println("-------"); System.out.println("Usage: java org.lwjgl.test.opengl.pbuffer.PbufferTest <mode>"); System.out.println("\n<mode>\tA number in the range 1-4."); System.out.println("\t1: Unique Context, no render-to-texture"); System.out.println("\t2: Unique Context, with render-to-texture"); System.out.println("\t3: Shared Context, no render-to-texture"); System.out.println("\t4: Shared Context, with render-to-texture"); System.exit(-1); } } --- NEW FILE: UniqueRendererRTT.java --- /* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'LWJGL' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.opengl.pbuffers; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.*; final class UniqueRendererRTT extends TextureRenderer { UniqueRendererRTT(final int width, final int height, final int texID) { super(width, height, texID); } // Initialize texture renderer protected Pbuffer init(final int width, final int height, final int texID) { Pbuffer pbuffer = null; try { final RenderTexture rt = new RenderTexture(true, false, false, false, RenderTexture.RENDER_TEXTURE_2D, 0); pbuffer = Pbuffer.createPbufferUsingUniqueContext(width, height, new PixelFormat(16, 0, 0, 0, 0), rt); // Initialise state of the pbuffer context. pbuffer.makeCurrent(); PbufferTest.initGLState(width, height, 0.5f); GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID); Display.makeCurrent(); } catch (LWJGLException e) { e.printStackTrace(); System.exit(-1); } return pbuffer; } void enable() { super.enable(); // Put the renderer contents to the texture pbuffer.releaseTexImage(Pbuffer.BACK_LEFT_BUFFER); } void updateTexture() { // Bind the texture after rendering. pbuffer.bindTexImage(Pbuffer.BACK_LEFT_BUFFER); } } |
|
From: Ioannis T. <sp...@us...> - 2004-07-26 19:13:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9946/pbuffers Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/pbuffers added to the repository |
|
From: Elias N. <eli...@us...> - 2004-07-26 19:13:25
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9894/src/native/win32 Modified Files: org_lwjgl_opengl_Pbuffer.cpp Log Message: Revert the Pbuffer "find singe buffered pixel format" behaviour in the Display context shared path. Index: org_lwjgl_opengl_Pbuffer.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Pbuffer.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- org_lwjgl_opengl_Pbuffer.cpp 26 Jul 2004 14:27:34 -0000 1.17 +++ org_lwjgl_opengl_Pbuffer.cpp 26 Jul 2004 19:13:02 -0000 1.18 @@ -139,54 +139,6 @@ return Pbuffer_context; } -static bool formatMatches(HDC hdc, int pixel_format1, int pixel_format2, int attribute) { - int format_val1; - int format_val2; - if (wglGetPixelFormatAttribivARB(hdc, pixel_format1, 0, 1, &attribute, &format_val1) != TRUE) - return false; - if (wglGetPixelFormatAttribivARB(hdc, pixel_format2, 0, 1, &attribute, &format_val2) != TRUE) - return false; - return format_val1 == format_val2; -} - -static int chooseSingleBufferedFormatFromFormat(HDC hdc, int orig_pixel_format) { - int max_pixel_format_index = DescribePixelFormat(hdc, 1, sizeof(PIXELFORMATDESCRIPTOR), NULL); - for (int i = 1; i <= max_pixel_format_index; i++) { - int attribute = WGL_DOUBLE_BUFFER_ARB; - int double_buffer; - if (wglGetPixelFormatAttribivARB(hdc, i, 0, 1, &attribute, &double_buffer) != TRUE) { - return -1; - } - attribute = WGL_DRAW_TO_PBUFFER_ARB; - int draw_to_pbuffer; - if (wglGetPixelFormatAttribivARB(hdc, i, 0, 1, &attribute, &draw_to_pbuffer) != TRUE) { - return -1; - } - if (double_buffer != FALSE || draw_to_pbuffer != TRUE) - continue; - if (formatMatches(hdc, i, orig_pixel_format, WGL_RED_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_GREEN_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_BLUE_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ALPHA_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ACCUM_RED_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ACCUM_GREEN_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ACCUM_BLUE_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ACCUM_ALPHA_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_DEPTH_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_STENCIL_BITS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_ACCELERATION_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_SUPPORT_OPENGL_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_STEREO_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_AUX_BUFFERS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_PIXEL_TYPE_ARB) && - (!extgl_Extensions.WGL_ARB_multisample || (formatMatches(hdc, i, orig_pixel_format, WGL_SAMPLE_BUFFERS_ARB) && - formatMatches(hdc, i, orig_pixel_format, WGL_SAMPLES_ARB)))) { - return i; - } - } - return -1; -} - JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Pbuffer_nCreate (JNIEnv *env, jclass clazz, jobject buffer_handle, jboolean use_display_context, jint width, jint height, jobject pixel_format, @@ -204,9 +156,7 @@ pBufferAttribs_ptr = NULL; } if (use_display_context) { - int iPixelFormat = chooseSingleBufferedFormatFromFormat(getCurrentWindowDC(), getCurrentPixelFormat()); - if (iPixelFormat == -1) - iPixelFormat = getCurrentPixelFormat(); + int iPixelFormat = getCurrentPixelFormat(); Pbuffer = wglCreatePbufferARB(getCurrentWindowDC(), iPixelFormat, width, height, pBufferAttribs_ptr); } else { Pbuffer = createPbuffer(env, width, height, pixel_format, pixelFormatCaps, pBufferAttribs_ptr); |
|
From: Elias N. <eli...@us...> - 2004-07-26 18:57:33
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6542/src/native/win32 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: Simplify cursor position in Mouse even more - get rid of hairy window rect code Index: org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- org_lwjgl_input_Mouse.cpp 26 Jul 2004 17:01:56 -0000 1.59 +++ org_lwjgl_input_Mouse.cpp 26 Jul 2004 18:57:18 -0000 1.60 @@ -58,7 +58,6 @@ static bool mFirstTimeInitialization = true; // boolean to determine first time initialization static POINT cursorPos; -static RECT windowRect; static bool mouse_grabbed; static int mouseMask = DISCL_NONEXCLUSIVE | DISCL_FOREGROUND; @@ -71,27 +70,10 @@ void InitializeMouseFields(); void UpdateMouseFields(JNIEnv *env, jclass clsMouse, jobject coord_buffer_obj, jobject button_buffer_obj); -/* Return the RECT of the current client area in the current window - * in screen coordinates - */ -static void getScreenClientRect(RECT* screen_client_rect) -{ - /* We can't use GetClientRect directly, because it is in - * local window coordinates and we can't use GetWindowRect - * because it returns the screen coordinate RECT of the entire - * window, inluding decoration. Luckily, the WINDOWINFO structure contains - * the client rect in screen coordinates. - */ - WINDOWINFO window_info; - window_info.cbSize = sizeof(WINDOWINFO); - GetWindowInfo(getCurrentHWND(), &window_info); - *screen_client_rect = window_info.rcClient; -} - static void resetCursorPos(void) { /* Reset cursor position to middle of the window */ RECT clientRect; - getScreenClientRect(&clientRect); + GetClientRect(getCurrentHWND(), &clientRect); cursorPos.x = (clientRect.left + clientRect.right)/2; cursorPos.y = clientRect.bottom - 1 - (clientRect.bottom - clientRect.top)/2; } @@ -401,17 +383,13 @@ int dy; POINT newCursorPos; - GetCursorPos(&newCursorPos); RECT clientRect; - RECT newWindowRect; - GetWindowRect(getCurrentHWND(), &newWindowRect); - cursorPos.x += newWindowRect.left - windowRect.left; - cursorPos.y += newWindowRect.top - windowRect.top; - windowRect = newWindowRect; - getScreenClientRect(&clientRect); - // Clip the position to the client rect + GetCursorPos(&newCursorPos); + ScreenToClient(getCurrentHWND(), &newCursorPos); + GetClientRect(getCurrentHWND(), &clientRect); newCursorPos.x = cap(newCursorPos.x, clientRect.left, clientRect.right - 1); newCursorPos.y = cap(newCursorPos.y, clientRect.top, clientRect.bottom - 1); + // Clip the position to the client rect dx = newCursorPos.x - cursorPos.x; dy = newCursorPos.y - cursorPos.y; cursorPos.x += dx; |