You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(5) |
2
(5) |
3
(1) |
4
(1) |
5
(5) |
6
|
|
7
(22) |
8
(2) |
9
(10) |
10
(5) |
11
(5) |
12
(1) |
13
|
|
14
|
15
(2) |
16
|
17
|
18
(2) |
19
|
20
|
|
21
(13) |
22
(4) |
23
(3) |
24
(14) |
25
(6) |
26
(26) |
27
(26) |
|
28
(2) |
29
(13) |
30
(17) |
31
(2) |
|
|
|
|
From: Ioannis T. <sp...@us...> - 2004-03-31 21:15:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3447 Modified Files: shaderFSH.fsh ShadersTest.java Log Message: Bugs fixed Index: ShadersTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ShadersTest.java 31 Mar 2004 17:43:46 -0000 1.2 +++ ShadersTest.java 31 Mar 2004 21:03:20 -0000 1.3 @@ -122,13 +122,11 @@ DisplayMode displayMode; - displayMode = chooseMode(modes, 1024, 768, 32); - if ( displayMode == null ) - displayMode = chooseMode(modes, 800, 600, 32); + displayMode = chooseMode(modes, 1024, 768); if ( displayMode == null ) - displayMode = chooseMode(modes, 1024, 768, 16); + displayMode = chooseMode(modes, 800, 600); if ( displayMode == null ) - displayMode = chooseMode(modes, 800, 600, 16); + displayMode = chooseMode(modes, 640, 480); if ( displayMode == null ) kill("Failed to set an appropriate display mode."); @@ -206,7 +204,7 @@ // Setup lighting for when we have fixed function fragment rendering. GL11.glShadeModel(GL11.GL_SMOOTH); - if (shader == null ) { + if ( shader == null ) { GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); } @@ -281,13 +279,13 @@ sphere.draw(1.0f, 32, 32); } - private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height, int bpp) { + private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) { DisplayMode bestMode = null; for ( int i = 0; i < modes.length; i++ ) { DisplayMode mode = modes[i]; - if ( mode.width == width && mode.height == height && mode.bpp == bpp && mode.freq <= 85 ) { - if ( bestMode == null || bestMode.freq < mode.freq ) + if ( mode.width == width && mode.height == height && mode.freq <= 85 ) { + if ( bestMode == null || (mode.bpp >= bestMode.bpp && mode.freq > bestMode.freq) ) bestMode = mode; } } Index: shaderFSH.fsh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.fsh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- shaderFSH.fsh 31 Mar 2004 17:43:46 -0000 1.2 +++ shaderFSH.fsh 31 Mar 2004 21:03:20 -0000 1.3 @@ -8,7 +8,7 @@ // Normalize position. // Multiply with current sin. - color2D.xy = normalize(color2D) * UNIFORMS.x; + color2D.xy = normalize(color2D).xy * UNIFORMS.x; // {-1..1} => {0..1} & Intensify colors. color2D.xy = (vec2(color2D) * 0.5 + 0.5) * 2.0; color2D.z = 1.0; |
|
From: Ioannis T. <sp...@us...> - 2004-03-31 17:55:36
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26517 Modified Files: shaderFSH.fsh shaderFSH.vsh ShadersTest.java shaderVSH.vsh Log Message: Fixed bugs Index: ShadersTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ShadersTest.java 30 Mar 2004 23:25:17 -0000 1.1 +++ ShadersTest.java 31 Mar 2004 17:43:46 -0000 1.2 @@ -206,8 +206,10 @@ // Setup lighting for when we have fixed function fragment rendering. GL11.glShadeModel(GL11.GL_SMOOTH); - GL11.glEnable(GL11.GL_LIGHTING); - GL11.glEnable(GL11.GL_LIGHT0); + if (shader == null ) { + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_LIGHT0); + } vectorBuffer.clear(); vectorBuffer.put(1.0f).put(1.0f).put(1.0f).put(1.0f); Index: shaderFSH.fsh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.fsh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- shaderFSH.fsh 30 Mar 2004 23:25:17 -0000 1.1 +++ shaderFSH.fsh 31 Mar 2004 17:43:46 -0000 1.2 @@ -5,7 +5,7 @@ void main(void) { // Offset window-space fragment position. vec3 color2D = vec3(gl_FragCoord + UNIFORMS.zwxx); - + // Normalize position. // Multiply with current sin. color2D.xy = normalize(color2D) * UNIFORMS.x; Index: shaderFSH.vsh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.vsh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- shaderFSH.vsh 30 Mar 2004 23:25:17 -0000 1.1 +++ shaderFSH.vsh 31 Mar 2004 17:43:46 -0000 1.2 @@ -1,3 +1,5 @@ +uniform vec4 UNIFORMS; + varying vec2 dots; void main(void) { @@ -6,6 +8,6 @@ vec3 normal = gl_NormalMatrix * gl_Normal; // Pass the dot products to the fragment shader. - dots.x = max(dot(normal, gl_LightSource[0].position), 0.0); - dots.y = max(dot(normal, gl_LightSource[0].halfVector), 0.0); + dots.x = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + dots.y = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); } \ No newline at end of file Index: shaderVSH.vsh =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderVSH.vsh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- shaderVSH.vsh 30 Mar 2004 23:25:17 -0000 1.1 +++ shaderVSH.vsh 31 Mar 2004 17:43:46 -0000 1.2 @@ -5,8 +5,8 @@ vec3 normal = gl_NormalMatrix * gl_Normal; - float diffuseDot = max(dot(normal, gl_LightSource[0].position), 0.0); - float specularDot = max(dot(normal, gl_LightSource[0].halfVector), 0.0); + float diffuseDot = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + float specularDot = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); specularDot = pow(specularDot, UNIFORMS.y); // Normalize position, to get a {-1..1} value for each vertex. @@ -16,7 +16,7 @@ color3D = (color3D * 0.5 + 0.5) * 2.0; // Accumulate color contributions. - color3D = diffuseDot * color3D + gl_LightModel.ambient; - gl_FrontColor.rgb = specularDot * gl_LightSource[0].specular + color3D; + color3D = diffuseDot * color3D + vec3(gl_LightModel.ambient); + gl_FrontColor.rgb = specularDot * vec3(gl_LightSource[0].specular) + color3D; gl_FrontColor.a = 1.0; } \ No newline at end of file |
|
From: Ioannis T. <sp...@us...> - 2004-03-30 23:37:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21732 Added Files: Shader.java shaderFP.fp ShaderFP.java shaderFP.vp shaderFSH.fsh ShaderFSH.java shaderFSH.vsh ShadersTest.java ShaderVP.java shaderVP.vp ShaderVSH.java shaderVSH.vsh Log Message: Added shader tests --- NEW FILE: ShaderFP.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 9:55:38 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.opengl.ARBFragmentProgram; import org.lwjgl.opengl.ARBProgram; import org.lwjgl.opengl.ARBVertexProgram; import org.lwjgl.opengl.GL11; import java.nio.ByteBuffer; final class ShaderFP extends Shader { final String vpFile; final ByteBuffer vpSource; final int vpID; final String fpFile; final ByteBuffer fpSource; final int fpID; ShaderFP(final String vpShaderFile, final String fpShaderFile) { // Initialize the vertex program. vpFile = vpShaderFile; vpSource = getShaderText(vpShaderFile); ARBProgram.glGenProgramsARB(programBuffer); vpID = programBuffer.get(0); ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID); ARBProgram.glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, vpSource); checkProgramError(vpFile, vpSource); // Initialize the fragment program. fpFile = fpShaderFile; fpSource = getShaderText(fpShaderFile); ARBProgram.glGenProgramsARB(programBuffer); fpID = programBuffer.get(0); ARBProgram.glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID); ARBProgram.glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, fpSource); checkProgramError(fpFile, fpSource); } void render() { GL11.glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID); GL11.glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB); ARBProgram.glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID); ARBProgram.glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f); ARBProgram.glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f); ShadersTest.renderObject(); GL11.glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); GL11.glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB); } void cleanup() { programBuffer.put(0, vpID); ARBProgram.glDeleteProgramsARB(programBuffer); programBuffer.put(0, fpID); ARBProgram.glDeleteProgramsARB(programBuffer); } } --- NEW FILE: shaderFSH.fsh --- uniform vec4 UNIFORMS; varying vec2 dots; void main(void) { // Offset window-space fragment position. vec3 color2D = vec3(gl_FragCoord + UNIFORMS.zwxx); // Normalize position. // Multiply with current sin. color2D.xy = normalize(color2D) * UNIFORMS.x; // {-1..1} => {0..1} & Intensify colors. color2D.xy = (vec2(color2D) * 0.5 + 0.5) * 2.0; color2D.z = 1.0; // Accumulate color contributions. // Hardcoded ambience and specular color, due to buggy drivers. color2D = dots.x * color2D + vec3(0.2, 0.2, 0.2); gl_FragColor.rgb = pow(dots.y, UNIFORMS.y) * vec3(1.0, 1.0, 0.5) + color2D; gl_FragColor.a = 1.0; } --- NEW FILE: shaderVSH.vsh --- uniform vec2 UNIFORMS; void main(void) { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; vec3 normal = gl_NormalMatrix * gl_Normal; float diffuseDot = max(dot(normal, gl_LightSource[0].position), 0.0); float specularDot = max(dot(normal, gl_LightSource[0].halfVector), 0.0); specularDot = pow(specularDot, UNIFORMS.y); // Normalize position, to get a {-1..1} value for each vertex. // Multiply with current sin. vec3 color3D = normalize(vec3(gl_Vertex)) * UNIFORMS.x; // {-1..1} => {0..1} & Intensify colors. color3D = (color3D * 0.5 + 0.5) * 2.0; // Accumulate color contributions. color3D = diffuseDot * color3D + gl_LightModel.ambient; gl_FrontColor.rgb = specularDot * gl_LightSource[0].specular + color3D; gl_FrontColor.a = 1.0; } --- NEW FILE: shaderVP.vp --- !!ARBvp1.0 ATTRIB iPos = vertex.position; ATTRIB iNormal = vertex.normal; PARAM mvp[4] = { state.matrix.mvp }; PARAM mvIT[4] = { state.matrix.modelview.invtrans }; PARAM ambience = state.lightmodel.ambient; PARAM lightDir = state.light[0].position; PARAM halfDir = state.light[0].half; PARAM diffuseColor = state.light[0].diffuse; PARAM specularColor = state.light[0].specular; PARAM UNIFORMS = program.local[0]; TEMP temp, temp2, normal, dots; OUTPUT oPos = result.position; OUTPUT oColor = result.color; # Transform the vertex to clip coordinates. DP4 oPos.x, mvp[0], iPos; DP4 oPos.y, mvp[1], iPos; DP4 oPos.z, mvp[2], iPos; DP4 oPos.w, mvp[3], iPos; # Transform the normal to eye coordinates. DP3 normal.x, mvIT[0], iNormal; DP3 normal.y, mvIT[1], iNormal; DP3 normal.z, mvIT[2], iNormal; # Compute diffuse and specular dot products and use LIT to compute # lighting coefficients. DP3 dots.x, normal, lightDir; DP3 dots.y, normal, halfDir; MOV dots.w, UNIFORMS.y; LIT dots, dots; # Normalize position, to get a {-1..1} value for each vertex. DP3 temp.w, iPos, iPos; RSQ temp.w, temp.w; MUL temp.xyz, iPos, temp.w; # Multiply with current sin. MUL temp.xyz, temp, UNIFORMS.x; # {-1..1} => {0..1} MAD temp.xyz, temp, 0.5, 0.5; # Intensify colors. MUL temp.xyz, temp, 2.0; # Accumulate color contributions. MAD temp.xyz, dots.y, temp, ambience; MAD oColor.xyz, dots.z, specularColor, temp; MOV oColor.w, 1.0; END --- NEW FILE: shaderFP.vp --- !!ARBvp1.0 ATTRIB iPos = vertex.position; ATTRIB iNormal = vertex.normal; PARAM mvp[4] = { state.matrix.mvp }; PARAM mvIT[4] = { state.matrix.modelview.invtrans }; PARAM lightDir = state.light[0].position; PARAM halfDir = state.light[0].half; PARAM UNIFORMS = program.local[0]; TEMP normal, dots; OUTPUT oPos = result.position; OUTPUT oDots = result.texcoord[0]; # Transform the vertex to clip coordinates. DP4 oPos.x, mvp[0], iPos; DP4 oPos.y, mvp[1], iPos; DP4 oPos.z, mvp[2], iPos; DP4 oPos.w, mvp[3], iPos; # Transform the normal to eye coordinates. DP3 normal.x, mvIT[0], iNormal; DP3 normal.y, mvIT[1], iNormal; DP3 normal.z, mvIT[2], iNormal; # Compute diffuse and specular dot products and clamp them. DP3 dots.x, normal, lightDir; MAX oDots.x, dots.x, 0.0; DP3 dots.y, normal, halfDir; MAX oDots.y, dots.y, 0.0; END --- NEW FILE: ShaderFSH.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 9:55:38 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.opengl.ARBShaderObjects; import org.lwjgl.opengl.ARBVertexShader; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.ARBFragmentShader; import java.nio.ByteBuffer; final class ShaderFSH extends Shader { final String vshFile; final ByteBuffer vshSource; final int vshID; final String fshFile; final ByteBuffer fshSource; final int fshID; final int programID; final int uniformLocation; ShaderFSH(final String vshFile, final String fshFile) { // Initialize the vertex shader. this.vshFile = vshFile; vshSource = getShaderText(vshFile); vshID = ARBShaderObjects.glCreateShaderObjectARB(ARBVertexShader.GL_VERTEX_SHADER_ARB); ARBShaderObjects.glShaderSourceARB(vshID, vshSource); ARBShaderObjects.glCompileShaderARB(vshID); printShaderObjectInfoLog(this.vshFile, vshID); ARBShaderObjects.glGetObjectParameterARB(vshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer); if ( programBuffer.get(0) == GL11.GL_FALSE ) ShadersTest.kill("A compilation error occured in a vertex shader."); // Initialize the fragment shader. this.fshFile = fshFile; fshSource = getShaderText(fshFile); fshID = ARBShaderObjects.glCreateShaderObjectARB(ARBFragmentShader.GL_FRAGMENT_SHADER_ARB); ARBShaderObjects.glShaderSourceARB(fshID, fshSource); ARBShaderObjects.glCompileShaderARB(fshID); printShaderObjectInfoLog(this.fshFile, fshID); ARBShaderObjects.glGetObjectParameterARB(fshID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer); if ( programBuffer.get(0) == GL11.GL_FALSE ) ShadersTest.kill("A compilation error occured in a fragment shader."); // Initialize the shader program. programID = ARBShaderObjects.glCreateProgramObjectARB(); ARBShaderObjects.glAttachObjectARB(programID, vshID); ARBShaderObjects.glAttachObjectARB(programID, fshID); ARBShaderObjects.glLinkProgramARB(programID); printShaderProgramInfoLog(programID); ARBShaderObjects.glGetObjectParameterARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB, programBuffer); if ( programBuffer.get(0) == GL11.GL_FALSE ) ShadersTest.kill("A linking error occured in a shader program."); uniformLocation = getUniformLocation(programID, "UNIFORMS"); } void render() { ARBShaderObjects.glUseProgramObjectARB(programID); ARBShaderObjects.glUniform4fARB(uniformLocation, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f); ShadersTest.renderObject(); ARBShaderObjects.glUseProgramObjectARB(0); } void cleanup() { ARBShaderObjects.glDetachObjectARB(programID, vshID); ARBShaderObjects.glDetachObjectARB(programID, fshID); ARBShaderObjects.glDeleteObjectARB(vshID); ARBShaderObjects.glDeleteObjectARB(fshID); ARBShaderObjects.glDeleteObjectARB(programID); } } --- NEW FILE: Shader.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 8:41:42 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.ARBProgram; import org.lwjgl.opengl.ARBShaderObjects; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.Util; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.nio.IntBuffer; abstract class Shader { protected static IntBuffer programBuffer = BufferUtils.createIntBuffer(1); protected static ByteBuffer fileBuffer = BufferUtils.createByteBuffer(1024 * 10); protected Shader() { } abstract void render(); abstract void cleanup(); protected static ByteBuffer getShaderText(String file) { ByteBuffer shader = null; try { ClassLoader loader = ShadersTest.class.getClassLoader(); InputStream inputStream = loader.getResourceAsStream("org/lwjgl/test/opengl/shaders/" + file); if ( inputStream == null ) ShadersTest.kill("A shader source file could not be found: " + file); BufferedInputStream stream = new BufferedInputStream(inputStream); byte character; while ( (character = (byte)stream.read()) != -1 ) fileBuffer.put(character); stream.close(); fileBuffer.flip(); shader = BufferUtils.createByteBuffer(fileBuffer.limit()); shader.put(fileBuffer); shader.clear(); fileBuffer.clear(); } catch (IOException e) { ShadersTest.kill("Failed to read the shader source file: " + file, e); } return shader; } protected static void checkProgramError(String programFile, ByteBuffer programSource) { if ( GL11.glGetError() == GL11.GL_INVALID_OPERATION ) { programSource.clear(); final byte[] bytes = new byte[programSource.capacity()]; programSource.get(bytes); final int errorPos = Util.glGetInteger(ARBProgram.GL_PROGRAM_ERROR_POSITION_ARB); int lineStart = 0; int lineEnd = -1; for ( int i = 0; i < bytes.length; i++ ) { if ( bytes[i] == '\n' ) { if ( i <= errorPos ) { lineStart = i + 1; } else { lineEnd = i; break; } } } if ( lineEnd == -1 ) lineEnd = bytes.length; ShadersTest.kill("Low-level program error in file: " + programFile + "\n\tError line: " + new String(bytes, lineStart, lineEnd - lineStart) + "\n\tError message: " + GL11.glGetString(ARBProgram.GL_PROGRAM_ERROR_STRING_ARB)); } } protected static int getUniformLocation(int ID, String name) { fileBuffer.clear(); int length = name.length(); char[] charArray = new char[length]; name.getChars(0, length, charArray, 0); for ( int i = 0; i < length; i++ ) fileBuffer.put((byte)charArray[i]); fileBuffer.put((byte)0); // Must be null-terminated. fileBuffer.flip(); final int location = ARBShaderObjects.glGetUniformLocationARB(ID, fileBuffer); if ( location == -1 ) throw new IllegalArgumentException("The uniform \"" + name + "\" does not exist in the Shader Program."); return location; } protected static void printShaderObjectInfoLog(String file, int ID) { ARBShaderObjects.glGetObjectParameterARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, programBuffer); final int logLength = programBuffer.get(0); if ( logLength <= 1 ) return; final ByteBuffer log = BufferUtils.createByteBuffer(logLength); ARBShaderObjects.glGetInfoLogARB(ID, null, log); final char[] charArray = new char[logLength]; for ( int i = 0; i < logLength; i++ ) charArray[i] = (char)log.get(); System.out.println("\nInfo Log of Shader Object: " + file); System.out.println("--------------------------"); System.out.println(new String(charArray, 0, logLength)); } protected static void printShaderProgramInfoLog(int ID) { ARBShaderObjects.glGetObjectParameterARB(ID, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, programBuffer); final int logLength = programBuffer.get(0); if ( logLength <= 1 ) return; final ByteBuffer log = BufferUtils.createByteBuffer(logLength); ARBShaderObjects.glGetInfoLogARB(ID, null, log); final char[] charArray = new char[logLength]; for ( int i = 0; i < logLength; i++ ) charArray[i] = (char)log.get(); System.out.println("\nShader Program Info Log: "); System.out.println("--------------------------"); System.out.println(new String(charArray, 0, logLength)); } } --- NEW FILE: ShadersTest.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 8:41:42 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.*; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GLContext; import org.lwjgl.opengl.Window; import org.lwjgl.opengl.glu.GLU; import org.lwjgl.opengl.glu.Sphere; import java.nio.FloatBuffer; public final class ShadersTest { private static DisplayMode displayMode; private static boolean run = true; private static final FloatBuffer vectorBuffer = BufferUtils.createFloatBuffer(4); private static Sphere sphere; private static Shader shader; private static float frameTime; private static float angle; private static float sin; private static int specularity = 4; private ShadersTest() { } public static void main(String[] args) { initialize(args); long frameStart; long lastFrameTime = 0; while ( run ) { if ( Window.isMinimized() ) Thread.yield(); else { // This is the current frame time. frameStart = Sys.getTime(); // How many seconds passed since last frame. frameTime = (float)((frameStart - lastFrameTime) / (double)Sys.getTimerResolution()); lastFrameTime = frameStart; angle += frameTime * 90.0f; sin = (float)Math.sin(Math.toRadians(angle)); handleIO(); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); if ( shader != null ) shader.render(); else renderObject(); // Restore camera position. GL11.glPopMatrix(); GL11.glPushMatrix(); } Window.update(); if ( Window.isCloseRequested() ) break; } cleanup(); } private static void initialize(String[] args) { if ( args.length != 1 ) argsError(); DisplayMode[] modes = Display.getAvailableDisplayModes(); DisplayMode displayMode; displayMode = chooseMode(modes, 1024, 768, 32); if ( displayMode == null ) displayMode = chooseMode(modes, 800, 600, 32); if ( displayMode == null ) displayMode = chooseMode(modes, 1024, 768, 16); if ( displayMode == null ) displayMode = chooseMode(modes, 800, 600, 16); if ( displayMode == null ) kill("Failed to set an appropriate display mode."); try { System.out.println("Setting display mode to: " + displayMode); Display.setDisplayMode(displayMode); Window.create("OpenGL Shaders Test", displayMode.bpp, 8, 24, 0); } catch (LWJGLException e) { kill(e.getMessage()); } ShadersTest.displayMode = displayMode; if ( "NONE".equalsIgnoreCase(args[0]) ) { shader = null; } else if ( "VP".equalsIgnoreCase(args[0]) ) { if ( !GLContext.GL_ARB_vertex_program ) kill("The ARB_vertex_program extension is not supported."); shader = new ShaderVP("shaderVP.vp"); } else if ( "FP".equalsIgnoreCase(args[0]) ) { if ( !GLContext.GL_ARB_vertex_program ) kill("The ARB_vertex_program extension is not supported."); if ( !GLContext.GL_ARB_fragment_program ) kill("The ARB_fragment_program extension is not supported."); shader = new ShaderFP("shaderFP.vp", "shaderFP.fp"); } else if ( "VSH".equalsIgnoreCase(args[0]) ) { if ( !GLContext.GL_ARB_vertex_shader ) kill("The ARB_vertex_shader extension is not supported."); shader = new ShaderVSH("shaderVSH.vsh"); } else if ( "FSH".equalsIgnoreCase(args[0]) ) { if ( !GLContext.GL_ARB_vertex_shader ) kill("The ARB_vertex_shader extension is not supported."); if ( !GLContext.GL_ARB_fragment_shader ) kill("The ARB_fragment_shader extension is not supported."); shader = new ShaderFSH("shaderFSH.vsh", "shaderFSH.fsh"); } else { argsError(); } GL11.glViewport(0, 0, displayMode.width, displayMode.height); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GLU.gluPerspective(45, displayMode.width / (float)displayMode.height, 1.0f, 10.0f); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); // Setup camera position. GL11.glTranslatef(0.0f, 0.0f, -4.0f); GL11.glRotatef(15.0f, 1.0f, 0.0f, 0.0f); GL11.glPushMatrix(); GL11.glClearDepth(1.0f); GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST); GL11.glFrontFace(GL11.GL_CCW); GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); GL11.glCullFace(GL11.GL_BACK); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glAlphaFunc(GL11.GL_NOTEQUAL, 0.0f); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_BLEND); // Setup lighting for when we have fixed function fragment rendering. GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHT0); vectorBuffer.clear(); vectorBuffer.put(1.0f).put(1.0f).put(1.0f).put(1.0f); vectorBuffer.clear(); GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, vectorBuffer); vectorBuffer.put(1.0f).put(1.0f).put(1.0f).put(1.0f); vectorBuffer.clear(); GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, vectorBuffer); vectorBuffer.put(1.0f).put(1.0f).put(0.5f).put(1.0f); vectorBuffer.clear(); GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, vectorBuffer); vectorBuffer.put(-1.0f / 3.0f).put(1.0f / 3.0f).put(1.0f / 3.0f).put(0.0f); // Infinite vectorBuffer.clear(); GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, vectorBuffer); vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f); vectorBuffer.clear(); GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, vectorBuffer); sphere = new Sphere(); } private static void handleIO() { if ( Keyboard.getNumKeyboardEvents() != 0 ) { while ( Keyboard.next() ) { if ( Keyboard.getEventKeyState() ) continue; switch ( Keyboard.getEventKey() ) { case Keyboard.KEY_EQUALS: if ( specularity < 8 ) specularity++; break; case Keyboard.KEY_MINUS: if ( specularity > 1 ) specularity--; break; case Keyboard.KEY_ESCAPE: run = false; break; } } } while ( Mouse.next() ) ; } static int getDisplayWidth() { return displayMode.width; } static int getDisplayHeight() { return displayMode.height; } static float getSin() { return sin; } static int getSpecularity() { return specularity; } static void renderObject() { GL11.glColor3b((byte)255, (byte)255, (byte)255); sphere.draw(1.0f, 32, 32); } private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height, int bpp) { DisplayMode bestMode = null; for ( int i = 0; i < modes.length; i++ ) { DisplayMode mode = modes[i]; if ( mode.width == width && mode.height == height && mode.bpp == bpp && mode.freq <= 85 ) { if ( bestMode == null || bestMode.freq < mode.freq ) bestMode = mode; } } return bestMode; } private static void cleanup() { // This is not necessary, just showing how to properly delete a program/shader. if ( shader != null ) shader.cleanup(); if ( Window.isCreated() ) Window.destroy(); Display.resetDisplayMode(); } private static void argsError() { System.out.println("\nInvalid program arguments."); System.out.println("\nUsage: ShadersTest <shaderType>, where <shaderType> argument can be one of the following:\n"); System.out.println("none\t- Use fixed function rendering."); System.out.println("vp\t- Use ARB_vertex_program (low-level) only."); System.out.println("vsh\t- Use ARB_vertex_shader (GLSL) only."); System.out.println("fp\t- Use ARB_vertex_program + ARB_fragment_program (low-level)."); System.out.println("fsh\t- Use ARB_vertex_shader + ARB_fragment_shader (GLSL)."); cleanup(); System.exit(-1); } static void kill(String reason) { System.out.println("The ShaderTest program was terminated because an error occured.\n"); System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); cleanup(); System.exit(-1); } static void kill(String reason, Throwable t) { System.out.println("The ShaderTest program was terminated because an exception occured.\n"); System.out.println("Reason: " + reason == null ? "Unknown" : reason); System.out.println("Exception message: " + t.getMessage()); cleanup(); System.exit(-1); } } --- NEW FILE: ShaderVP.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 9:55:38 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.opengl.ARBProgram; import org.lwjgl.opengl.ARBVertexProgram; import org.lwjgl.opengl.GL11; import java.nio.ByteBuffer; final class ShaderVP extends Shader { final String file; final ByteBuffer source; final int ID; ShaderVP(final String shaderFile) { file = shaderFile; source = getShaderText(shaderFile); ARBProgram.glGenProgramsARB(programBuffer); ID = programBuffer.get(0); ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ID); ARBProgram.glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ARBProgram.GL_PROGRAM_FORMAT_ASCII_ARB, source); checkProgramError(file, source); } void render() { GL11.glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); ARBProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, ID); ARBProgram.glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f); ShadersTest.renderObject(); GL11.glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); } void cleanup() { programBuffer.put(0, ID); ARBProgram.glDeleteProgramsARB(programBuffer); } } --- NEW FILE: shaderFSH.vsh --- varying vec2 dots; void main(void) { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; vec3 normal = gl_NormalMatrix * gl_Normal; // Pass the dot products to the fragment shader. dots.x = max(dot(normal, gl_LightSource[0].position), 0.0); dots.y = max(dot(normal, gl_LightSource[0].halfVector), 0.0); } --- NEW FILE: shaderFP.fp --- !!ARBfp1.0 OPTION ARB_precision_hint_fastest; ATTRIB winPos = fragment.position; ATTRIB iDots = fragment.texcoord[0]; PARAM ambience = state.lightmodel.ambient; PARAM specularColor = state.light[0].specular; PARAM UNIFORMS = program.local[0]; TEMP temp; OUTPUT oColor = result.color; # Offset window-space fragment position. ADD temp.xyz, winPos, UNIFORMS.zwxx; # Normalize position. DP3 temp.w, temp, temp; RSQ temp.w, temp.w; MUL temp.xy, temp, temp.w; # Multiply with current sin. MUL temp.xy, temp, UNIFORMS.x; # {-1..1} => {0..1} MAD temp.xy, temp, 0.5, 0.5; # Intensify colors. MUL temp.xy, temp, 2.0; MOV temp.z, 1.0; # Accumulate color contributions. MAD temp.xyz, iDots.x, temp, ambience; # Calculate <specular dot product>^<specular exponent> POW temp.w, iDots.y, UNIFORMS.y; MAD oColor.xyz, temp.w, specularColor, temp; MOV oColor.w, 1.0; END --- NEW FILE: ShaderVSH.java --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Created by LWJGL. * User: spasi * Date: 2004-03-30 * Time: 9:55:38 pm */ package org.lwjgl.test.opengl.shaders; import org.lwjgl.opengl.ARBShaderObjects; import org.lwjgl.opengl.ARBVertexShader; import org.lwjgl.opengl.GL11; import java.nio.ByteBuffer; final class ShaderVSH extends Shader { final String file; final ByteBuffer source; final int shaderID; final int programID; final int uniformLocation; ShaderVSH(final String shaderFile) { file = shaderFile; source = getShaderText(shaderFile); shaderID = ARBShaderObjects.glCreateShaderObjectARB(ARBVertexShader.GL_VERTEX_SHADER_ARB); ARBShaderObjects.glShaderSourceARB(shaderID, source); ARBShaderObjects.glCompileShaderARB(shaderID); printShaderObjectInfoLog(file, shaderID); ARBShaderObjects.glGetObjectParameterARB(shaderID, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB, programBuffer); if ( programBuffer.get(0) == GL11.GL_FALSE ) ShadersTest.kill("A compilation error occured in a vertex shader."); programID = ARBShaderObjects.glCreateProgramObjectARB(); ARBShaderObjects.glAttachObjectARB(programID, shaderID); ARBShaderObjects.glLinkProgramARB(programID); printShaderProgramInfoLog(programID); ARBShaderObjects.glGetObjectParameterARB(programID, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB, programBuffer); if ( programBuffer.get(0) == GL11.GL_FALSE ) ShadersTest.kill("A linking error occured in a shader program."); uniformLocation = getUniformLocation(programID, "UNIFORMS"); } void render() { ARBShaderObjects.glUseProgramObjectARB(programID); ARBShaderObjects.glUniform2fARB(uniformLocation, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f); ShadersTest.renderObject(); ARBShaderObjects.glUseProgramObjectARB(0); } void cleanup() { ARBShaderObjects.glDetachObjectARB(programID, shaderID); ARBShaderObjects.glDeleteObjectARB(shaderID); ARBShaderObjects.glDeleteObjectARB(programID); } } |
|
From: Ioannis T. <sp...@us...> - 2004-03-30 23:35:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21525/shaders Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/shaders added to the repository |
Update of /cvsroot/java-game-lib/LWJGL/www/jnlp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642/jnlp Added Files: lwjgl-demo.php lwjgl-media.jar lwjgl-windows.jar lwjgl.jar lwjgl_test.jar lwjglaudio-windows.jar source.php Log Message: readded site under www --- NEW FILE: lwjgl-windows.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: lwjgl-demo.php --- <? header("Content-type: application/x-java-jnlp-file"); ?> <!-- JNLP File for LWJGL Demos --> <jnlp spec="1.0+" codebase="http://lwjgl.org/jnlp/" href="lwjgl-demo.php/<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>"> <information> <title>LWJGL Demo [<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>]</title> <vendor>LWJGL</vendor> <homepage href="http://lwjgl.orgt/"/> <description>Demonstration of LWJGL</description> <description kind="short">Technology Preview</description> <offline-allowed/> </information> <security> <all-permissions/> </security> <resources> <j2se version="1.4+"/> <?php if (strpos($_SERVER["PATH_INFO"], "openal") > -1 || strpos($_SERVER["PATH_INFO"], "opengl") > -1) { echo " <jar href=\"lwjgl-media.jar\"/>"; } ?> <jar href="lwjgl.jar"/> <jar href="lwjgl_test.jar" main="true"/> </resources> <resources os="Windows"> <j2se version="1.4+"/> <nativelib href="lwjgl-windows.jar"/> <nativelib href="lwjglaudio-windows.jar"/> </resources> <resources os="Linux" arch="i386"> <j2se version="1.4+"/> <nativelib href="lwjgl-rh8-9.jar"/> <nativelib href="openal-rh8-9.jar"/> </resources> <!--<property key="java.library.path" value="." />--> <application-desc main-class="org.lwjgl.test.<?php echo substr($_SERVER["PATH_INFO"], 1, strlen($_SERVER["PATH_INFO"])-1); ?>"/> </jnlp> --- NEW FILE: lwjgl-media.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: lwjgl.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: source.php --- <?php header("Location: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/" . $_GET['path'] . "?rev=HEAD&content-type=text/vnd.viewcvs-markup"); exit; ?> --- NEW FILE: lwjgl_test.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: lwjglaudio-windows.jar --- (This appears to be a binary file; contents omitted.) |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:30:20
|
Update of /cvsroot/java-game-lib/LWJGL/www/changelogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642/changelogs Added Files: 0.10-changelog.txt 0.20-changelog.txt 0.30-changelog.txt 0.40-changelog.txt 0.50-changelog.txt 0.60-changelog.txt 0.70-changelog.txt 0.80-changelog.txt 0.89-changelog.txt full-changelog.txt Log Message: readded site under www --- NEW FILE: 0.50-changelog.txt --- 2003-03-02 23:59 matzon * website/documents/readme.html: update to reflect newest readme 2003-03-02 23:09 matzon * doc/README: added mo content 2003-03-02 20:27 matzon * build.xml: mod: we're now at 0.5 2003-03-02 20:27 matzon * build.xml: fix: let's include correct files 2003-03-02 20:24 matzon * src/java/org/lwjgl/opengl/GL.java: fix: only output wgl if debug 2003-03-02 19:57 matzon * src/java/org/lwjgl/test/input/MouseTest.java: simple mouse test added 2003-03-01 22:39 matzon * src/native/win32/: org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp: fix: no longer fatal to not acquire input 2003-02-26 19:11 elias_naur * src/native/linux/org_lwjgl_input_Mouse.cpp: Linux mouse buttons now match those on win32 (again) 2003-02-26 18:49 elias_naur * src/native/linux/org_lwjgl_input_Mouse.cpp: Linux mouse buttons now match those on win32 2003-02-24 20:46 elias_naur * src/native/linux/org_lwjgl_input_Mouse.cpp: linux scroller now match win32 behaviour more precisely - scrolling reversed and scaled 120 2003-02-20 16:13 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: Fixed a buffer overflow problem in dåz 2003-02-20 14:27 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Fixed bug when a X display connection cannot be established (again) 2003-02-20 14:20 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Fixed bug when a X display connection cannot be established 2003-02-20 13:14 cix_foo * src/: native/common/org_lwjgl_opengl_CoreGL.cpp, java/org/lwjgl/vector/Vector3f.java: [no log message] 2003-02-17 16:13 elias_naur * src/: java/org/lwjgl/opengl/CoreGL.java, native/common/org_lwjgl_opengl_CoreGL.cpp, native/common/org_lwjgl_opengl_CoreGL.h: Added glMultiDrawArrays and glMultiDrawElements 2003-02-14 12:23 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp, org_lwjgl_opengl_BaseGL.cpp: Don't fail create if grab doesn't succeed on the first try 2003-02-13 16:32 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: replaced PeekMessage() -> handleMessages() 2003-02-12 18:12 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp: Added preliminary alt-tab support on linux 2003-02-12 13:11 elias_naur * src/native/win32/org_lwjgl_input_Mouse.cpp: Don't allow the mouse to drift when failing poll 2003-02-12 13:07 elias_naur * src/native/win32/org_lwjgl_Display.cpp: Don't allow to show the window menu 2003-02-12 12:27 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: Don't return -1 on keyboard read failure 2003-02-12 10:55 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: Don't return -1 on keyboard read failure 2003-02-12 10:33 elias_naur * src/native/win32/org_lwjgl_Display.cpp: added check for software only modes 2003-02-12 10:29 elias_naur * src/native/win32/org_lwjgl_opengl_BaseGL.cpp: replaced wglSwapLayerBuffers -> SwapBuffers 2003-02-11 00:07 matzon * src/java/org/lwjgl/input/: Controller.java, Mouse.java: formatting and better javadoc 2003-02-11 00:02 matzon * src/java/org/lwjgl/DisplayMode.java: formatting and better javadoc 2003-02-10 23:57 matzon * src/java/org/lwjgl/Display.java: formatting and better javadoc 2003-02-10 23:13 matzon * src/native/win32/org_lwjgl_Display.cpp: fix: releasing device context for window, as per msdn docs 2003-02-10 01:00 cix_foo * src/native/common/org_lwjgl_opengl_CoreGL.cpp: Fixed CHECK ERROR bug 2003-02-09 22:14 matzon * build.xml: add: javah target added 2003-02-09 20:59 matzon * src/java/org/lwjgl/test/input/ControllerCreationTest.java: add: simple controller test that tests multiple creation 2003-02-09 20:58 matzon * src/java/org/lwjgl/test/input/: MouseCreationTest.java, MouseTest.java: MouseTest renamed to MouseCreationTest 2003-02-09 20:54 matzon * src/native/win32/org_lwjgl_input_Controller.cpp: fix: using own DI instance since we've been horking the one created from display, which when not horked cannot be used, since it does not work with dx3+ fix: changed to use firstime initialization logic like mouse 2003-02-09 20:51 matzon * src/native/win32/org_lwjgl_input_Mouse.cpp: fix: behave with Controller 2003-02-09 20:18 matzon * src/native/win32/org_lwjgl_input_Mouse.cpp: mod: some formatting fix: allow creation of mouse more than one time 2003-02-09 20:17 matzon * src/java/org/lwjgl/test/input/MouseTest.java: add: simple mouse test that tests multiple creation 2003-02-09 18:55 matzon * src/java/org/lwjgl/Display.java: mod: changed closeRequested to follow isMinimized() 2003-02-09 18:01 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp, org_lwjgl_opengl_BaseGL.cpp: Added closeRequested support to linux 2003-02-09 12:06 elias_naur * src/native/linux/org_lwjgl_Display.cpp: linux windows can't be resized now 2003-02-09 00:25 matzon * src/native/win32/: org_lwjgl_Display.cpp, org_lwjgl_opengl_BaseGL.cpp: fix: moved handleMessages to its rightfull place 2003-02-09 00:00 matzon * src/: native/common/org_lwjgl_Display.h, java/org/lwjgl/Display.java, native/win32/org_lwjgl_Display.cpp: add: close button enabled 2003-02-08 21:36 elias_naur * src/native/linux/org_lwjgl_input_Mouse.cpp: Updated linux files to recent mouse and display changes 2003-02-08 20:55 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp, org_lwjgl_opengl_BaseGL.cpp: Added isMinimized to linux 2003-02-08 20:37 matzon * src/java/org/lwjgl/test/opengl/Game.java: fix: updated to reflect changes in new mouse 2003-02-08 20:31 matzon * src/native/win32/org_lwjgl_input_Controller.cpp: mod: renaming of most methods/fields due to name clashes with Mouse fix: check for DIERR_NOTACQUIRED when loosing focus fix: check for controller failed, and would crash VM if no controller could be found 2003-02-08 20:30 matzon * src/native/win32/org_lwjgl_Display.cpp: fix: make mouse actually behave! 2003-02-08 20:29 matzon * src/: native/common/org_lwjgl_input_Mouse.h, java/org/lwjgl/input/Mouse.java, native/win32/org_lwjgl_input_Mouse.cpp: new Mouse implementation, rewritten to better fit Controller structure 2003-02-08 17:33 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: Removed dead code 2003-02-08 02:02 matzon * src/native/win32/org_lwjgl_Display.cpp: added minimize button, disabling close button since we have no mechnism to notify the user of a close 2003-02-08 00:21 cix_foo * src/native/win32/org_lwjgl_Display.cpp: [no log message] 2003-02-07 22:53 cix_foo * src/native/win32/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_opengl_BaseGL.cpp, org_lwjgl_input_Mouse.cpp: [no log message] 2003-02-07 22:50 cix_foo * src/: java/org/lwjgl/Display.java, native/common/org_lwjgl_Display.h: [no log message] 2003-02-06 21:40 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Added window title bars to linux 2003-02-06 19:23 cix_foo * src/: java/org/lwjgl/Display.java, native/common/org_lwjgl_Display.h, native/win32/org_lwjgl_Display.cpp: [no log message] 2003-02-06 19:18 cix_foo * src/java/org/lwjgl/test/: opengl/Game.java, opengl/Grass.java, openal/ALCTest.java, openal/MovingSoundTest.java: [no log message] 2003-02-02 23:49 elias_naur * src/native/linux/org_lwjgl_input_Keyboard.cpp: Added missing linux keyboard mapping 2003-01-31 20:04 elias_naur * src/native/win32/org_lwjgl_Display.cpp: Added win32 alpha check 2003-01-31 02:17 exocet * src/native/macosx/altivec/org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp: First draft of a altivec copy with cache prefetch 2003-01-30 19:56 gregorypierce * src/native/macosx/: org_lwjgl_opengl_BaseGL.cpp, RenderingContext.cpp, RenderingContext.h, org_lwjgl_Display.cpp: Added changes to support the selection of display modes on OSX in multiple monitor configurations. Currently defaults to only getting the display modes of display[0] - the primary display since lwjgl doesn't yet support clean multi monitor configuration programatically. This code based off the Apple provided sample code at http://developer.apple.com/samplecode/Sample_Code/Graphics_2D/Mode.htm 2003-01-29 22:34 matzon * website/documents/tutorials/opengl/skeleton_code.html: made compatible with 0.4 2003-01-29 22:34 matzon * src/java/org/lwjgl/test/opengl/Game.java: cleaned up removed some stuff (specifically buffered mouse mode) 2003-01-23 22:38 matzon * src/: java/org/lwjgl/test/input/ControllerTest.java, java/org/lwjgl/input/Controller.java, native/win32/org_lwjgl_input_Controller.cpp: added rotational axis too 2003-01-23 22:14 matzon * src/native/win32/org_lwjgl_input_Controller.cpp: small comment on using z axis as slider 2003-01-23 22:11 matzon * src/: native/win32/org_lwjgl_input_Controller.cpp, java/org/lwjgl/test/input/ControllerTest.java: new and improved version - w00t 2003-01-12 23:22 matzon * src/java/org/lwjgl/test/openal/WaveData.java: rem: not needed import 2003-01-12 12:42 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Bug fix 2003-01-12 00:09 elias_naur * src/: native/common/org_lwjgl_input_Keyboard.h, native/win32/org_lwjgl_input_Keyboard.cpp, java/org/lwjgl/input/Keyboard.java: Added keyboard translation to linux and win32 2003-01-11 22:02 elias_naur * src/native/linux/: org_lwjgl_input_Controller.cpp, Makefile.am, org_lwjgl_input_GamePad.cpp, org_lwjgl_input_Joystick.cpp, org_lwjgl_input_Keyboard.cpp: Fixed linux compile 2003-01-11 14:56 matzon * website/documents/links.html: add: link to chman's nehe ports added 2003-01-03 19:47 matzon * src/: java/org/lwjgl/input/Controller.java, java/org/lwjgl/input/GamePad.java, java/org/lwjgl/input/Joystick.java, java/org/lwjgl/test/input/ControllerTest.java, java/org/lwjgl/test/input/JoystickTest.java, native/common/org_lwjgl_input_Controller.h, native/common/org_lwjgl_input_GamePad.h, native/common/org_lwjgl_input_Joystick.h, native/win32/org_lwjgl_input_Controller.cpp, native/win32/org_lwjgl_input_GamePad.cpp, native/win32/org_lwjgl_input_Joystick.cpp: Joystick replaced by Controller GamePad no modelled as a controller 2003-01-03 02:19 matzon * build.xml: mod: now loads data files for examples from /res/ 2003-01-03 02:17 matzon * res/: Footsteps.wav, ding.wav, mono.wav, Wave1.WAV, Wave2.WAV, Wave3.WAV, Wave4.WAV, stereo.wav: files needed by ALTest - from openal source tree, thus lgpl 2003-01-03 02:14 matzon * src/java/org/lwjgl/test/openal/WaveData.java: fix: better comments on create(filepath) 2003-01-03 02:11 matzon * src/java/org/lwjgl/test/openal/WaveData.java: mod: now using getResourceAsStream to load, since this enables us to load from ./ and from classpath 2003-01-02 19:19 gregorypierce * src/native/macosx/org_lwjgl_Sys.cpp: Added in timer support 2003-01-02 06:44 gregorypierce * src/native/: macosx/RenderingContext.cpp, macosx/RenderingContext.h, common/extgl.c, common/extgl.h, common/extal.h: Clean OSX release, changed the platform flag to TARGET_OS_MAC to match what's in OpenAL so everything builds smootly together. 2003-01-02 00:05 gregorypierce * src/native/: common/extgl.h, macosx/RenderingContext.cpp, macosx/RenderingContext.h: Moved typedefs into extgl.h so that OpenGL symbols not multiply defined - removes 650 warnings. Removed all imports of agl.h and gl.h. Removed OpenGL.framework from the project 2003-01-01 05:04 gregorypierce * src/native/common/: extgl.c, extgl.h: Changes to support dynamic loads on the mac and finish the initial build 2003-01-01 05:03 gregorypierce * src/native/common/extal.h: Quick change for OSX support 2003-01-01 04:58 gregorypierce * src/native/: win32/org_lwjgl_opengl_BaseGL.cpp, macosx/RenderingContext.cpp, macosx/RenderingContext.h, macosx/org_lwjgl_Display.cpp, macosx/org_lwjgl_input_Keyboard.cpp, macosx/org_lwjgl_input_Mouse.cpp, macosx/org_lwjgl_opengl_BaseGL.cpp, common/extal.c: no message 2002-12-30 23:24 gregorypierce * src/native/common/extgl.h: Removed typo - sorry 2002-12-30 23:05 gregorypierce * src/native/: common/extgl.h, common/extgl.c, macosx/org_lwjgl_Display.cpp, macosx/org_lwjgl_opengl_BaseGL.cpp: Updated to include the dynamic loading of the OpenGL.framework and use function pointers so OpenGL functions can be called. 2002-12-30 12:41 elias_naur * src/native/configure.in: Added -D_X11 to c flags in linux 2002-12-30 08:09 gregorypierce * src/native/macosx/: RenderingContext.cpp, RenderingContext.h, org_lwjgl_Display.cpp, org_lwjgl_Sys.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp, org_lwjgl_opengl_BaseGL.cpp: Changes to bring in minimal functionality of the OSX port. Still needs virtual function definitions before GL functions can be called properly. 2002-12-30 08:07 gregorypierce * src/native/common/: extgl.c, extgl.h: Changes to allow more than just Windows and UNIX build targets. Adds in the _X11 define for the Unix boys and will include the _OSX define to handle stuff for OSX. 2002-12-28 11:41 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Fixed embarrassing Display.destroy() bug 2002-12-24 10:42 matzon * doc/README: add: explanation about running demos --- NEW FILE: 0.30-changelog.txt --- 2002-10-28 21:01 exocet * src/java/org/lwjgl/vector/: Matrix4f.java, Matrix3f.java: Fixed inversion error. 2002-10-26 20:54 exocet * src/native/win32/: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp: Fixed some bugs. 2002-10-19 16:27 cix_foo * src/native/win32/: org_lwjgl_input_GamePad.cpp, org_lwjgl_input_Joystick.cpp: Ready to fill in. Go on, you know you want to. 2002-10-19 01:28 cix_foo * src/java/org/lwjgl/: Display.java, DisplayMode.java, Math.java, Sys.java, opengl/CoreGL.java, opengl/GLConstants.java: *** keyword substitution change *** 2002-10-19 01:21 cix_foo * src/java/org/lwjgl/opengl/: CoreGL.java, GL.java, GLConstants.java: New extensions 2002-10-17 00:34 exocet * src/java/org/lwjgl/vector/: Matrix2f.java, Matrix3f.java, Matrix4f.java: added invert/determinant 2002-10-16 23:00 exocet * src/native/win32/MatrixOpCommon.cpp: fixed some memory errors 2002-10-15 22:30 cix_foo * src/native/: win32/org_lwjgl_opengl_CoreGL.cpp, win32/MatrixOpCommon.cpp, common/org_lwjgl_opengl_CoreGL.h: Fixed native matrix code so it compiles. Added EXT_paletted_texture functions to CoreGL - whoops 2002-10-06 23:34 cix_foo * src/java/org/lwjgl/vector/: Vector3f.java, Vector4f.java: Added load method 2002-09-28 18:53 exocet * src/native/win32/: MatrixOpCommon.cpp, MatrixOpCommon.h, org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp: Optimised INVERT cases for Orthogonal Matricies (Rotations) 2002-09-20 19:00 cix_foo * src/native/win32/org_lwjgl_opengl_GL.cpp: Fixed wglGetExtensionsStringARB problem 2002-09-20 18:57 cix_foo * src/java/org/lwjgl/opengl/GL.java: Catching up 2002-09-20 18:53 cix_foo * doc/tutorial/skeleton_code.html: Catching up 2002-09-12 03:42 matzon * src/native/win32/org_lwjgl_opengl_eax_CoreEAX.cpp: fix: don't do the whole initializing thingy - just assume that OpenAL is initialized fix:: wrong comment fix: changed ifndef to ifdef DOH! 2002-09-12 03:26 matzon * src/java/org/lwjgl/openal/eax/BaseEAX.java: add: added finalizer 2002-09-11 18:57 matzon * src/java/org/lwjgl/openal/eax/EAXListenerProperties.java: fix: now reading ints instead of longs - buffer overflow, since longs are 64 bit in java 2002-09-11 18:46 matzon * src/java/org/lwjgl/openal/eax/EAXBufferProperties.java: fix: now reading ints instead of longs - buffer overflow, since longs are 64 bit in java 2002-09-10 16:35 matzon * doc/CREDITS: add: Added Gregory Pierce to credits list 2002-09-09 18:41 matzon * doc/: openal_c-to-java.html, openal_c-to-java.txt: mod: changed text file to html, so that it can be included on website 2002-09-09 01:57 exocet * src/native/win32/: MatrixOpCommon.cpp, MatrixOpCommon.h, org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpNegate_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpNegate_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpSubtract_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.cpp: Cleaned up the code, all test cases I have sent at it work. check current compatibility at: http://www.happypedestrian.com/lwjgl/matrixop.html 2002-09-08 08:20 gregorypierce * src/native/macosx/: RenderingContext.h, RenderingContext.cpp: RenderingContext - OpenGL context 2002-09-08 08:19 gregorypierce * src/native/macosx/org_lwjgl_Display.cpp: Updated to use RenderingContext --- NEW FILE: 0.40-changelog.txt --- 2002-12-23 22:50 gregorypierce * src/native/macosx/org_lwjgl_input_Keyboard.cpp: Started trimming the OSX keyboard interface to what OSX supports in Carbon. Won't use InputSprocket because there appears to be no support plan from Apple. 2002-12-23 14:23 cix_foo * src/native/win32/org_lwjgl_Display.cpp: Fixed? 2002-12-23 12:31 elias_naur * src/native/: common/extgl.c, common/extgl.h, linux/org_lwjgl_Display.cpp: Added more intelligent pixel format chooser in linux 2002-12-22 23:42 matzon [...1132 lines suppressed...] org_lwjgl_input_Mouse.c, org_lwjgl_opengl_BaseGL.c, org_lwjgl_opengl_CoreGL.c, org_lwjgl_opengl_GL.c, org_lwjgl_opengl_GLU.c: Corrected revision and id tags 2002-11-15 12:00 elias_naur * src/native/linux/org_lwjgl_Display.c: corrected id and revisions tags 2002-11-15 11:58 elias_naur * src/native/linux/org_lwjgl_Display.c: corrected revision and id 2002-11-15 11:40 elias_naur * src/native/linux/: Game.java, Makefile, org_lwjgl_Display.c, org_lwjgl_Sys.c, org_lwjgl_input_Keyboard.c, org_lwjgl_input_Mouse.c, org_lwjgl_opengl_BaseGL.c, org_lwjgl_opengl_CoreGL.c, org_lwjgl_opengl_GL.c, org_lwjgl_opengl_GLU.c: Added linux native src files --- NEW FILE: 0.10-changelog.txt --- 2002-08-19 16:29 cix_foo * src/java/org/lwjgl/Sys.java: Encapsulated LIBRARY_NAME (properly!) 2002-08-19 16:02 matzon * src/java/org/lwjgl/openal/: ALUT.java, BaseAL.java: fix: now uses getLibraryName() for determening lib to load 2002-08-19 15:59 cix_foo * src/java/org/lwjgl/: Display.java, Sys.java, opengl/BaseGL.java, opengl/CoreGL.java, opengl/GL.java, opengl/GLU.java, input/GamePad.java, input/Joystick.java, input/Keyboard.java, input/Mouse.java: Encapsulated LIBRARY_NAME 2002-08-19 15:55 matzon * src/java/org/lwjgl/openal/CoreAL.java: fix: wrong prototypes for some methods, while switching to ByteBuffer 2002-08-19 15:54 matzon * src/native/: common/org_lwjgl_openal_CoreAL.h, win32/org_lwjgl_openal_CoreAL.cpp: basic al support complete 2002-08-19 14:02 matzon * src/native/common/org_lwjgl_openal_CoreAL.h: add: rest of al methods 2002-08-19 13:59 matzon * src/java/org/lwjgl/openal/CoreAL.java: mod: now use ByteBuffer addresses instead of arrays - this way we reduce object creation 2002-08-19 13:30 cix_foo * src/native/common/org_lwjgl_Sys.h: Tweakage 2002-08-19 13:29 cix_foo * src/java/org/lwjgl/: Math.java, Sys.java: Matrix code started 2002-08-19 04:37 matzon * src/java/org/lwjgl/openal/CoreAL.java: add: last al methods added 2002-08-19 03:10 matzon * src/java/org/lwjgl/openal/CoreAL.java: add: more al methods (work in progress) 2002-08-18 15:56 matzon * src/: native/win32/org_lwjgl_openal_ALUT.cpp, java/org/lwjgl/openal/ALUT.java, java/org/lwjgl/openal/ALUTLoadWAVData.java, java/org/lwjgl/openal/ALUTLoadWAVFile.java, java/org/lwjgl/openal/OpenALTest.java: change: ALUTLoadWAVFile -> ALUTLoadWAVData 2002-08-18 15:47 matzon * src/native/win32/org_lwjgl_openal_ALUT.cpp: fix: memory leak 2002-08-18 15:42 matzon * src/native/win32/org_lwjgl_openal_ALUT.cpp: add: loadWAVMemory implemented fix: wrong comments on alutInit 2002-08-18 15:41 matzon * src/native/common/org_lwjgl_openal_ALUT.h: loadWAVMemory implemented 2002-08-17 16:13 cix_foo * src/native/: win32/LWJGL.cpp, win32/org_lwjgl_input_Keyboard.cpp, win32/org_lwjgl_opengl_BaseGL.cpp, win32/org_lwjgl_opengl_GL.cpp, win32/org_lwjgl_opengl_GLU.cpp, common/org_lwjgl_Audio.h, common/org_lwjgl_opengl_GL.h, common/org_lwjgl_opengl_GLU.h, common/org_lwjgl_opengl_GLUT.h, win32/extgl.c, win32/org_lwjgl_Display.cpp: Working 2002-08-17 16:10 cix_foo * src/java/org/lwjgl/: opengl/GL.java, Sys.java: Working 2002-08-16 23:53 cix_foo * src/java/org/lwjgl/: StructBuffer.java, Sys.java, opengl/GL.java, opengl/GLConstants.java, opengl/GLU.java, opengl/GLUT.java, opengl/GLUTConstants.java: Removed StructBuffer 2002-08-16 23:52 cix_foo * src/java/org/lwjgl/vector/: Matrix2f.java, Matrix3f.java, Matrix4f.java, Vector2f.java, Vector3f.java, Vector4f.java: Added licenses. 2002-08-15 23:41 matzon * doc/manifest.txt: well someone has to be the victim... 2002-08-15 23:38 matzon * CVSROOT/loginfo: now posting to jav...@li... 2002-08-15 22:33 matzon * doc/manifest.txt: uhm.. needed to find a file to modify - testing syncmail ;) 2002-08-15 22:30 matzon * CVSROOT/: checkoutlist, loginfo: enabled syncmail again 2002-08-15 18:27 cix_foo * src/java/org/lwjgl/Audio.java: Removed audio class 2002-08-15 18:18 cix_foo * src/java/org/lwjgl/: opengl/BaseGL.java, opengl/CoreGL.java, opengl/CoreGLConstants.java, opengl/GL.java, opengl/GLConstants.java, opengl/GLU.java, opengl/GLUConstants.java, opengl/OpenGLException.java, input/GamePad.java, input/Joystick.java, input/Keyboard.java: Copyright added 2002-08-15 18:11 matzon * src/native/common/: checkGLerror.h, org_lwjgl_opengl_CoreGL.h: fixed: removed -kb switch - changed to default kkv 2002-08-15 18:08 matzon * src/native/win32/org_lwjgl_opengl_CoreGL.cpp: fixed: removed -kb switch - changed to default kkv 2002-08-15 17:46 cix_foo * src/java/org/lwjgl/: Display.java, DisplayMode.java, Math.java, StructBuffer.java, Sys.java: Copyright added 2002-08-15 17:45 matzon * CVSROOT/checkoutlist: changed: removed syncmail until SF changes execute bits 2002-08-15 17:42 cix_foo * src/: java/org/lwjgl/input/Mouse.java, native/win32/LWJGL.cpp, native/win32/org_lwjgl_Audio.cpp, native/win32/org_lwjgl_Math.cpp, native/win32/org_lwjgl_Sys.cpp, native/win32/org_lwjgl_input_Keyboard.cpp, native/win32/org_lwjgl_input_Mouse.cpp, native/win32/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_opengl_CoreGL.cpp, native/win32/org_lwjgl_opengl_GL.cpp, native/win32/org_lwjgl_opengl_GLU.cpp, native/win32/org_lwjgl_opengl_GLUT.cpp: Copyright added 2002-08-15 17:41 matzon * src/native/win32/: org_lwjgl_openal_ALUT.c, org_lwjgl_openal_ALUT.cpp, org_lwjgl_openal_CoreAL.c, org_lwjgl_openal_CoreAL.cpp: change: old JNI Cimplementaion upgraded to C++ 2002-08-15 17:38 cix_foo * src/native/win32/org_lwjgl_Display.cpp: Copyright added 2002-08-15 17:14 matzon * src/java/org/lwjgl/openal/: AL.java, ALConstants.java, ALUT.java, ALUTLoadWAVFile.java, BaseAL.java, BaseALConstants.java, CoreAL.java, EAXALConstants.java, OpenALTest.java: add: copyright header 2002-08-15 17:10 matzon * src/native/: common/org_lwjgl_openal_ALUT.h, common/org_lwjgl_openal_CoreAL.h, win32/org_lwjgl_openal_ALUT.c, win32/org_lwjgl_openal_CoreAL.c: add: copyright header 2002-08-15 16:53 matzon * src/native/win32/org_lwjgl_Display.cpp: changed: now defines using dx7 2002-08-15 16:34 matzon * src/native/win32/: org_lwjgl_openal_ALUT.c, org_lwjgl_openal_CoreAL.c: changed: AL_ and al prefix removed (this included lowercasing first letter in method) 2002-08-15 16:29 matzon * src/: java/org/lwjgl/openal/ALUT.java, java/org/lwjgl/openal/BaseALConstants.java, java/org/lwjgl/openal/CoreAL.java, java/org/lwjgl/openal/OpenALTest.java, native/common/org_lwjgl_openal_ALUT.h, native/common/org_lwjgl_openal_CoreAL.h: changed: AL_ and al prefix removed (this included lowercasing first letter in method) 2002-08-15 16:10 matzon * CVSROOT/loginfo: remove syncmail stuff untill execute bits are set bt SF 2002-08-15 16:08 matzon * src/java/org/lwjgl/input/Mouse.java: fixed: joystick javadoc changed to mouse 2002-08-15 15:25 cix_foo * src/: native/common/org_lwjgl_opengl_CoreGL.h, native/win32/org_lwjgl_opengl_CoreGL.cpp, java/org/lwjgl/opengl/GLUConstants.java: Removed GL_ prefixes 2002-08-15 15:20 cix_foo * src/java/org/lwjgl/opengl/CoreGLConstants.java: Removed GL_ prefixes 2002-08-15 15:19 cix_foo * src/java/org/lwjgl/opengl/CoreGL.java: Removed gl prefixes 2002-08-15 13:17 matzon * CVSROOT/modules: added lwjgl as module 2002-08-14 16:32 cix_foo * src/java/org/lwjgl/Display.java: Renamed setDisplayMode to create for consistency with other classes 2002-08-14 16:31 cix_foo * src/java/org/lwjgl/input/: GamePad.java, Joystick.java, Keyboard.java, Mouse.java: Added GamePad and Joystick and some query methods 2002-08-14 12:55 matzon * src/native/win32/: org_lwjgl_openal_CoreAL.c, org_lwjgl_openal_CoreAL10.c: CoreAL10 -> CoreAL 2002-08-14 12:52 matzon * src/: java/org/lwjgl/openal/AL.java, java/org/lwjgl/openal/CoreAL.java, java/org/lwjgl/openal/CoreAL10.java, native/common/org_lwjgl_openal_CoreAL.h, native/common/org_lwjgl_openal_CoreAL10.h: CoreAL10 -> CoreAL 2002-08-14 03:31 cix_foo * src/native/win32/org_lwjgl_opengl_CoreGL.cpp: Added automatic error checking to debug build 2002-08-14 03:30 cix_foo * src/native/common/checkGLerror.h: Fixed a few things 2002-08-14 03:27 cix_foo * src/native/common/checkGLerror.h: GL error checking macro for debug builds 2002-08-14 03:08 cix_foo * src/: java/org/lwjgl/opengl/CoreGL.java, java/org/lwjgl/opengl/CoreGL11.java, java/org/lwjgl/opengl/CoreGL11Constants.java, java/org/lwjgl/opengl/CoreGL12.java, java/org/lwjgl/opengl/CoreGL12Constants.java, java/org/lwjgl/opengl/CoreGL13.java, java/org/lwjgl/opengl/CoreGL13Constants.java, java/org/lwjgl/opengl/CoreGL14.java, java/org/lwjgl/opengl/CoreGL14Constants.java, java/org/lwjgl/opengl/CoreGLConstants.java, java/org/lwjgl/opengl/GL.java, java/org/lwjgl/opengl/GLConstants.java, java/org/lwjgl/opengl/GLUConstants.java, native/common/org_lwjgl_opengl_CoreGL.h, native/common/org_lwjgl_opengl_CoreGL11.h, native/common/org_lwjgl_opengl_CoreGL12.h, native/common/org_lwjgl_opengl_CoreGL13.h, native/common/org_lwjgl_opengl_CoreGL14.h, native/win32/org_lwjgl_opengl_CoreGL.cpp, native/win32/org_lwjgl_opengl_CoreGL11.cpp, native/win32/org_lwjgl_opengl_CoreGL12.cpp, native/win32/org_lwjgl_opengl_CoreGL13.cpp, native/win32/org_lwjgl_opengl_CoreGL14.cpp: Removed redundant class heirarchy 2002-08-14 02:09 matzon * CVSROOT/syncmail: added obos version of syncmail 2002-08-14 01:49 matzon * CVSROOT/syncmail: readding syncmail with correct bits 2002-08-14 01:47 matzon * CVSROOT/syncmail: removing file. need to set executable bit 2002-08-14 01:13 matzon * src/java/org/lwjgl/openal/: AL.java, ALConstants.java, ALUT.java, ALUTLoadWAVFile.java, BaseAL.java, BaseALConstants.java, CoreAL10.java, EAXALConstants.java: initial commit of OpenAL code 2002-08-14 01:01 matzon * src/java/org/lwjgl/openal/OpenALTest.java: initial commit of test class for OpenAL 2002-08-14 00:58 matzon * CVSROOT/: checkoutlist, loginfo, syncmail: added syncmail script 2002-08-12 01:38 mpcooke3 * .project, build.xml, content/about.xml, content/contact.xml, content/credits.xml, content/download.xml, content/license.xml, content/navbar.xml, content/simple.xsl, content/source.xml, website/about.html, website/contact.html, website/credits.html, website/download.html, website/license.html, website/navbar.html, website/simple.css, website/source.html, website/title.png: Some initial stuff for the website. Not ready to go live yet - Matt 2002-08-11 18:27 matzon * src/native/common/: org_lwjgl_openal_ALUT.h, org_lwjgl_openal_CoreAL10.h: initial import of OpenAL native implementation 2002-08-11 17:59 matzon * src/native/win32/: org_lwjgl_openal_ALUT.c, org_lwjgl_openal_CoreAL10.c: corrected Id keyword substitution 2002-08-11 17:56 matzon * src/native/win32/: org_lwjgl_openal_ALUT.c, org_lwjgl_openal_CoreAL10.c: initial import of OpenAL native implementation 2002-08-11 13:52 cix_foo * src/native/win32/: org_lwjgl_opengl_CoreGL11.cpp, org_lwjgl_opengl_CoreGL12.cpp, org_lwjgl_opengl_CoreGL13.cpp, org_lwjgl_opengl_CoreGL14.cpp, org_lwjgl_opengl_GL.cpp, org_lwjgl_opengl_GLU.cpp, org_lwjgl_opengl_GLUT.cpp, org_lwjgl_Sys.cpp: Initial import 2002-08-11 13:52 cix_foo * src/native/win32/: org_lwjgl_opengl_CoreGL11.cpp, org_lwjgl_opengl_CoreGL12.cpp, org_lwjgl_opengl_CoreGL13.cpp, org_lwjgl_opengl_CoreGL14.cpp, org_lwjgl_opengl_GL.cpp, org_lwjgl_opengl_GLU.cpp, org_lwjgl_opengl_GLUT.cpp, org_lwjgl_Sys.cpp: Initial revision 2002-08-11 13:49 cix_foo * src/native/: common/org_lwjgl_Audio.h, common/org_lwjgl_Display.h, common/org_lwjgl_input_Keyboard.h, common/org_lwjgl_Math.h, common/org_lwjgl_input_Mouse.h, common/org_lwjgl_opengl_BaseGL.h, common/org_lwjgl_opengl_CoreGL11.h, common/org_lwjgl_opengl_CoreGL12.h, common/org_lwjgl_opengl_CoreGL13.h, common/org_lwjgl_opengl_CoreGL14.h, common/org_lwjgl_opengl_GL.h, common/org_lwjgl_opengl_GLU.h, common/org_lwjgl_opengl_GLUT.h, common/org_lwjgl_Sys.h, win32/extgl.c, win32/LWJGL.cpp, win32/extgl.h, win32/org_lwjgl_Audio.cpp, win32/org_lwjgl_Display.cpp, win32/org_lwjgl_input_Keyboard.cpp, win32/org_lwjgl_input_Mouse.cpp, win32/org_lwjgl_Math.cpp, win32/org_lwjgl_opengl_BaseGL.cpp: Initial import 2002-08-11 13:49 cix_foo * src/native/: common/org_lwjgl_Audio.h, common/org_lwjgl_Display.h, common/org_lwjgl_input_Keyboard.h, common/org_lwjgl_Math.h, common/org_lwjgl_input_Mouse.h, common/org_lwjgl_opengl_BaseGL.h, common/org_lwjgl_opengl_CoreGL11.h, common/org_lwjgl_opengl_CoreGL12.h, common/org_lwjgl_opengl_CoreGL13.h, common/org_lwjgl_opengl_CoreGL14.h, common/org_lwjgl_opengl_GL.h, common/org_lwjgl_opengl_GLU.h, common/org_lwjgl_opengl_GLUT.h, common/org_lwjgl_Sys.h, win32/extgl.c, win32/LWJGL.cpp, win32/extgl.h, win32/org_lwjgl_Audio.cpp, win32/org_lwjgl_Display.cpp, win32/org_lwjgl_input_Keyboard.cpp, win32/org_lwjgl_input_Mouse.cpp, win32/org_lwjgl_Math.cpp, win32/org_lwjgl_opengl_BaseGL.cpp: Initial revision 2002-08-11 13:36 cix_foo * src/java/org/lwjgl/: Math.java, StructBuffer.java, Sys.java, input/Keyboard.java, opengl/BaseGL.java, opengl/CoreGL11.java, opengl/GLUConstants.java: StructBuffer added. Numerous changes to timing code in Sys. 2002-08-09 21:42 cix_foo * src/java/org/lwjgl/opengl/: CoreGL11.java, CoreGL11Constants.java, CoreGL12.java, CoreGL12Constants.java, CoreGL13.java, CoreGL13Constants.java, CoreGL14.java, CoreGL14Constants.java, GLU.java, GLUT.java: Added GL constants and GLs 1.1, 1.2, 1.3 2002-08-09 20:50 cix_foo * src/java/org/lwjgl/: Display.java, Sys.java, input/Keyboard.java, opengl/CoreGL14.java, opengl/GLU.java, opengl/GLUConstants.java, opengl/GLUT.java, opengl/GLUTConstants.java: Added GLU and GLUT, and core GL commands 2002-08-09 12:56 cix_foo * src/java/org/lwjgl/: Audio.java, Display.java, DisplayMode.java, Math.java, Sys.java, input/Keyboard.java, input/Mouse.java, opengl/BaseGL.java, opengl/CoreGL14.java, opengl/CoreGL14Constants.java, opengl/GL.java, opengl/GLConstants.java, opengl/OpenGLException.java, vector/Matrix2f.java, vector/Matrix3f.java, vector/Matrix4f.java, vector/Vector2f.java, vector/Vector3f.java, vector/Vector4f.java: First code import. 2002-08-06 17:10 cix_foo * manifest.txt, doc/manifest.txt, src/manifest.txt, src/java/manifest.txt, src/native/manifest.txt, src/native/common/manifest.txt, src/native/win32/manifest.txt: Initial import 2002-08-06 17:10 cix_foo * manifest.txt, doc/manifest.txt, src/manifest.txt, src/java/manifest.txt, src/native/manifest.txt, src/native/common/manifest.txt, src/native/win32/manifest.txt: Initial revision 2002-07-23 22:11 root * CVSROOT/: checkoutlist, commitinfo, config, cvswrappers, editinfo, loginfo, modules, notify, rcsinfo, taginfo, verifymsg: initial checkin --- NEW FILE: full-changelog.txt --- 2004-03-23 22:23 matzon * src/native/macosx/org_lwjgl_opengl_Window.cpp: added nMakeCurrent 2004-03-23 11:19 elias_naur * src/native/common/common_tools.cpp: Fixed warning in vc++ 6 2004-03-23 08:47 elias_naur * src/native/win32/org_lwjgl_input_Keyboard.cpp: Use the actual buffer size in nPoll 2004-03-22 21:36 matzon * CVSROOT/history: enable history 2004-03-22 11:02 elias_naur [...7413 lines suppressed...] 2002-08-06 17:10 cix_foo * manifest.txt, doc/manifest.txt, src/manifest.txt, src/java/manifest.txt, src/native/manifest.txt, src/native/common/manifest.txt, src/native/win32/manifest.txt: Initial import 2002-08-06 17:10 cix_foo * manifest.txt, doc/manifest.txt, src/manifest.txt, src/java/manifest.txt, src/native/manifest.txt, src/native/common/manifest.txt, src/native/win32/manifest.txt: Initial revision 2002-07-23 22:11 root * CVSROOT/: checkoutlist, commitinfo, config, cvswrappers, editinfo, loginfo, modules, notify, rcsinfo, taginfo, verifymsg: initial checkin --- NEW FILE: 0.89-changelog.txt --- 2004-03-04 01:36 spasi * src/java/org/lwjgl/opengl/glu/: Project.java, Util.java: optimizations 2004-03-03 11:06 cix_foo * src/java/org/lwjgl/test/opengl/PbufferTest.java: Fixed compilation error (untested) 2004-03-02 02:57 spasi * src/: java/org/lwjgl/opengl/Pbuffer.java, java/org/lwjgl/opengl/RenderTexture.java, native/common/org_lwjgl_opengl_Pbuffer.h, native/linux/org_lwjgl_opengl_Pbuffer.cpp, native/macosx/org_lwjgl_opengl_Pbuffer.cpp, native/win32/org_lwjgl_opengl_Pbuffer.cpp: render-to-texture support [...1589 lines suppressed...] * src/native/: common/extal.cpp, macosx/hid.cpp, macosx/org_lwjgl_input_Mouse.cpp: [no log message] 2003-10-23 19:17 matzon * src/java/org/lwjgl/test/input/MouseCreationTest.java: move mouse in right direction on y axis 2003-10-23 10:42 elias_naur * src/native/common/org_lwjgl_opengl_GL.cpp: Another VBO fix 2003-10-23 09:18 elias_naur * src/: java/org/lwjgl/test/opengl/PbufferTest.java, native/common/org_lwjgl_opengl_GL.cpp, native/linux/org_lwjgl_Display.cpp, native/win32/org_lwjgl_Display.cpp: Fixed ARBFragmentProgram and ARB_vbo --- NEW FILE: 0.60-changelog.txt --- 2003-04-30 17:38 matzon * src/java/org/lwjgl/vector/: Matrix.java, Matrix2f.java, Matrix3f.java, Matrix4f.java, Vector.java, Vector2f.java, Vector3f.java, Vector4f.java: fix: added Serializable interface to allow serialization 2003-04-29 00:43 matzon * src/java/org/lwjgl/openal/AL.java: fix: call base destroy fix: null references 2003-04-28 23:50 cix_foo * src/java/org/lwjgl/openal/AL.java: Added destroy() method to prevent a crash 2003-04-28 18:41 elias_naur * src/java/org/lwjgl/opengl/CoreGLConstants.java: Fixed a typo 2003-04-28 14:10 elias_naur * src/java/org/lwjgl/vector/Matrix4f.java: Added scale to Matrix4f 2003-04-28 13:20 elias_naur * src/native/common/extgl.c: Reverted the glu loading 2003-04-28 13:12 elias_naur * src/java/org/lwjgl/vector/Matrix4f.java: [no log message] 2003-04-28 13:04 cix_foo * src/native/common/extgl.c: [no log message] 2003-04-27 23:46 matzon * doc/tutorial/openal_basics.html: updated to reflect version in website folder 2003-04-27 23:25 matzon * website/documents/tutorials/openal/openal_basics.html, src/java/org/lwjgl/openal/AL.java, src/java/org/lwjgl/test/openal/BasicTest.java, src/java/org/lwjgl/test/openal/OpenALCreationTest.java: add: default constructor for OpenAL 2003-04-27 20:39 matzon * src/java/org/lwjgl/test/openal/BasicTest.java: only do 10 updates / sec 2003-04-27 20:37 matzon * src/java/org/lwjgl/openal/AL.java, src/java/org/lwjgl/openal/ALC.java, src/java/org/lwjgl/openal/ALCcontext.java, src/java/org/lwjgl/openal/ALCdevice.java, src/java/org/lwjgl/openal/BaseAL.java, src/java/org/lwjgl/openal/BaseALConstants.java, src/java/org/lwjgl/openal/CoreAL.java, src/java/org/lwjgl/test/openal/ALCTest.java, src/java/org/lwjgl/test/openal/ALTest.java, src/java/org/lwjgl/test/openal/BasicTest.java, src/java/org/lwjgl/test/openal/EAXTest.java, src/java/org/lwjgl/test/openal/MovingSoundTest.java, src/java/org/lwjgl/test/openal/OpenALCreationTest.java, src/java/org/lwjgl/test/openal/PlayTest.java, src/java/org/lwjgl/test/openal/PlayTestMemory.java, src/java/org/lwjgl/test/openal/SourceLimitTest.java, src/java/org/lwjgl/test/openal/StressTest.java, src/native/common/org_lwjgl_openal_ALC.cpp, src/native/common/org_lwjgl_openal_ALC.h, src/native/common/org_lwjgl_openal_BaseAL.h, src/native/common/org_lwjgl_openal_CoreAL.h, website/documents/tutorials/openal/openal_basics.html: New OpenAL programming model: no context/device fiddling easier initialization 2003-04-26 08:54 elias_naur * src/: java/org/lwjgl/opengl/BaseGL.java, native/common/org_lwjgl_opengl_BaseGL.h, native/linux/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_opengl_BaseGL.cpp: Removed makeContexCurrent and releaseContext 2003-04-16 22:28 elias_naur * src/java/org/lwjgl/opengl/GL.java: Merged cfmdobbie's gl version checking 2003-04-14 20:17 matzon * src/native/win32/org_lwjgl_Display.cpp: Using EnumDisplaySettingsEx now, to force monitor comparing 2003-04-13 11:28 elias_naur * src/native/common/extgl.c: Corrected a linux gl lib loading bug 2003-04-09 17:24 elias_naur * src/java/org/lwjgl/vector/Vector3f.java: Removed superflous Vector3f.magnitude() 2003-04-07 19:49 elias_naur * src/native/linux/org_lwjgl_input_Controller.cpp: Fixed missing header include 2003-04-07 19:30 elias_naur * src/native/linux/org_lwjgl_Sys.cpp: [no log message] 2003-04-07 19:04 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_Sys.cpp: Added dummy gamma controls to linux 2003-04-07 17:21 cix_foo * src/java/org/lwjgl/: input/Controller.java, input/Mouse.java, input/Keyboard.java, openal/BaseAL.java: Added some isCreated() methods to input classes and keyboard key name mapping 2003-04-03 23:02 elias_naur * src/java/org/lwjgl/Sys.java: Don't call nGetNULLValue before loading the library 2003-04-03 22:58 elias_naur * src/java/org/lwjgl/opengl/GLConstants.java: Added ARBVertexBufferObject to list of implemented interfaces in GLConstants.java 2003-04-03 22:20 elias_naur * src/: java/org/lwjgl/Sys.java, native/common/org_lwjgl_Sys.h, native/linux/org_lwjgl_Sys.cpp, native/win32/org_lwjgl_Sys.cpp: Added Sys.NULL constant 2003-04-03 13:32 elias_naur * src/: java/org/lwjgl/opengl/GL.java, native/common/extgl.c, native/common/extgl.h, native/common/org_lwjgl_opengl_GL.cpp, native/common/org_lwjgl_opengl_GL.h: Added support for ARB_vertex_buffer_object 2003-03-31 12:56 elias_naur * src/native/linux/org_lwjgl_Window.cpp: Minor linux fix 2003-03-30 21:53 elias_naur * src/native/win32/org_lwjgl_Window.cpp: Minor win32 fix 2003-03-30 21:40 elias_naur * src/: java/org/lwjgl/opengl/BaseGL.java, native/common/org_lwjgl_opengl_BaseGL.h, native/linux/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_opengl_BaseGL.cpp: I like those makeContextCurrent/releaseContext... 2003-03-30 21:26 elias_naur * src/: java/org/lwjgl/Window.java, java/org/lwjgl/opengl/BaseGL.java, native/config.h.in, native/configure.in, native/common/extgl.c, native/common/extgl.h, native/common/org_lwjgl_Window.h, native/common/org_lwjgl_opengl_BaseGL.h, native/linux/Makefile.am, native/linux/Window.h, native/linux/org_lwjgl_Display.cpp, native/linux/org_lwjgl_Window.cpp, native/linux/org_lwjgl_input_Keyboard.cpp, native/linux/org_lwjgl_input_Mouse.cpp, native/linux/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_Window.cpp, native/win32/org_lwjgl_opengl_BaseGL.cpp: Linux/win32 changes for 0.6 2003-03-30 15:30 matzon * doc/tutorial/intro.html, website/documents/tutorials/intro.html: fix: remove platform specific wording 2003-03-29 22:51 cix_foo * src/: java/org/lwjgl/Display.java, native/common/org_lwjgl_Display.h, native/win32/org_lwjgl_Display.cpp, native/win32/Window.h, native/win32/org_lwjgl_Window.cpp: Stuff for 0.6 2003-03-29 00:58 matzon * src/java/org/lwjgl/test/: WindowCreationTest.java, input/ControllerCreationTest.java, input/MouseTest.java: fix: go for 16 bit mode instead of 32 2003-03-29 00:47 matzon * src/java/org/lwjgl/test/input/MouseCreationTest.java: fix: rewritten windowed/fullscreen selection 2003-03-29 00:46 matzon * src/java/org/lwjgl/test/input/MouseTest.java: fix: make certain that gl.tick is always called 2003-03-29 00:40 matzon * src/java/org/lwjgl/test/opengl/Game.java: fix: removed double Keyboard.read 2003-03-29 00:15 cix_foo * src/: java/org/lwjgl/Display.java, java/org/lwjgl/Window.java, native/win32/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_Display.cpp, native/win32/org_lwjgl_Window.cpp: Big changes for the new 0.6 LWJGL release 2003-03-28 23:12 matzon * src/java/org/lwjgl/: opengl/GL.java, test/WindowCreationTest.java, test/input/ControllerCreationTest.java, test/input/MouseCreationTest.java, test/input/MouseTest.java, test/openal/MovingSoundTest.java, test/opengl/Grass.java: fix: make it all compile 2003-03-28 22:03 cix_foo * src/: java/org/lwjgl/opengl/BaseGL.java, java/org/lwjgl/opengl/GL.java, native/common/org_lwjgl_opengl_BaseGL.h, native/win32/org_lwjgl_Window.cpp, native/win32/org_lwjgl_opengl_BaseGL.h: Fixed 2003-03-28 20:17 cix_foo * src/java/org/lwjgl/: test/opengl/Game.java, opengl/CoreGL.java, opengl/GL.java: Fixed 2003-03-28 20:07 cix_foo * src/java/org/lwjgl/opengl/BaseGL.java: Removed Exception from constructor 2003-03-28 20:00 cix_foo * src/: java/org/lwjgl/input/Mouse.java, java/org/lwjgl/input/Keyboard.java, java/org/lwjgl/Display.java, java/org/lwjgl/Window.java, java/org/lwjgl/opengl/BaseGL.java, java/org/lwjgl/opengl/GL.java, native/win32/org_lwjgl_opengl_BaseGL.cpp, native/win32/org_lwjgl_Display.cpp, native/win32/Window.h, native/win32/org_lwjgl_Window.cpp, native/common/org_lwjgl_opengl_BaseGL.h: [no log message] 2003-03-28 02:27 cix_foo * src/native/: win32/org_lwjgl_opengl_BaseGL.h, win32/org_lwjgl_Display.cpp, win32/org_lwjgl_input_Controller.cpp, win32/org_lwjgl_input_Keyboard.cpp, win32/org_lwjgl_input_Mouse.cpp, win32/org_lwjgl_opengl_BaseGL.cpp, common/org_lwjgl_opengl_BaseGL.h, common/org_lwjgl_Display.h, common/org_lwjgl_Window.h, win32/Window.h, win32/org_lwjgl_Window.cpp: New Window class, and major changes to Display 2003-03-28 02:24 cix_foo * src/java/org/lwjgl/: opengl/CoreGL.java, opengl/GL.java, opengl/BaseGL.java, Window.java: New Window class, and major changes to Display 2003-03-28 00:01 cix_foo * src/java/org/lwjgl/Window.java: New Window class, and major changes to Display 2003-03-27 23:54 cix_foo * src/java/org/lwjgl/input/: Keyboard.java, Mouse.java: New Window class, and major changes to Display 2003-03-27 23:46 cix_foo * src/java/org/lwjgl/Window.java: New Window class, and major changes to Display 2003-03-27 23:35 cix_foo * src/java/org/lwjgl/Display.java: New Window class, and major changes to Display 2003-03-27 23:32 cix_foo * src/java/org/lwjgl/: test/opengl/Grass.java, test/opengl/Game.java, opengl/BaseGL.java, test/input/MouseCreationTest.java, test/input/MouseTest.java, test/WindowCreationTest.java, test/input/ControllerCreationTest.java, Display.java, Window.java: New Window class, and major changes to Display 2003-03-27 19:27 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_opengl_BaseGL.cpp: Various linux fixes(alot) 2003-03-27 18:27 elias_naur * doc/TODO: [no log message] 2003-03-27 18:22 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Linux various (5) 2003-03-27 17:25 matzon * doc/TODO: initial commit 2003-03-27 16:42 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Various linux fixes(4) 2003-03-27 16:38 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Various linux fixes(3) 2003-03-27 16:28 elias_naur * src/native/common/extgl.c: Various linux fixes(2) 2003-03-27 16:16 elias_naur * src/native/: config.h.in, configure.in, common/extgl.c, linux/org_lwjgl_Display.cpp, linux/org_lwjgl_input_Keyboard.cpp, linux/org_lwjgl_opengl_BaseGL.cpp: Various linux fixes 2003-03-24 23:15 cix_foo * src/java/org/lwjgl/Sys.java: [no log message] 2003-03-24 23:12 cix_foo * src/java/org/lwjgl/Sys.java: [no log message] 2003-03-24 23:08 cix_foo * src/java/org/lwjgl/opengl/: BaseGL.java, CoreGL.java, GL.java: [no log message] 2003-03-24 22:42 cix_foo * src/java/org/lwjgl/: input/Controller.java, input/Keyboard.java, input/Mouse.java, Display.java: [no log message] 2003-03-24 22:38 cix_foo * src/java/org/lwjgl/: Game.java, Display.java, Sys.java: [no log message] 2003-03-24 19:10 elias_naur * src/native/linux/org_lwjgl_input_Mouse.cpp: Updated linux Mouse 2003-03-24 18:16 matzon * src/java/org/lwjgl/test/WindowCreationTest.java: add: small window test - wanted to test how fast a display is created 2003-03-24 18:07 matzon * src/java/org/lwjgl/test/input/: MouseCreationTest.java, MouseTest.java: mod: making it possible to see color differences by clicking mouse buttons 2003-03-24 17:58 matzon * src/java/org/lwjgl/input/Mouse.java: fix: creation of buttons array now occurs in java side 2003-03-24 12:56 elias_naur * src/: java/org/lwjgl/openal/BaseAL.java, java/org/lwjgl/test/openal/ALTest.java, native/common/extal.cpp, native/common/org_lwjgl_openal_ALC.cpp: Fixed Brian's bugs 2003-03-23 21:08 elias_naur * src/native/win32/org_lwjgl_input_Mouse.cpp: Fixed mouse clamping 2003-03-23 21:00 matzon * src/native/win32/org_lwjgl_input_Mouse.cpp: fix: VM crash when using > 4 button mouse 2003-03-23 13:52 elias_naur * src/native/common/: Makefile.am, extal.c, extal.cpp: Renamed extal.c->extal.cpp 2003-03-23 02:13 exocet * src/java/org/lwjgl/Math.java: Fixed some bugs that were not allowing bulk adds and some binary incompatibilities. Fixed error involving incorrectly setting strides when the stride is 0. 2003-03-23 00:22 matzon * src/native/common/extal.c: beautyfication 2003-03-23 00:16 matzon * src/: java/org/lwjgl/openal/BaseAL.java, native/common/extal.c, native/common/extal.h, native/common/org_lwjgl_openal_BaseAL.cpp, native/common/org_lwjgl_openal_BaseAL.h: fix: load OpenAL based on java.library.path 2003-03-22 22:39 cix_foo * src/native/win32/org_lwjgl_Display.cpp: Fixed nasty bug in Win9x display mode enumeration 2003-03-22 00:28 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Controller.cpp, org_lwjgl_input_Keyboard.cpp, org_lwjgl_input_Mouse.cpp, org_lwjgl_opengl_BaseGL.cpp: Various linux fixes 2003-03-21 18:55 matzon * src/native/common/: extal.c, extal.h, org_lwjgl_openal_BaseAL.cpp: wip: load oal based on java.library.path 2003-03-21 18:37 elias_naur * src/native/linux/org_lwjgl_Display.cpp: Added getPlatform() to linux 2003-03-21 18:05 cix_foo * src/: java/org/lwjgl/Display.java, java/org/lwjgl/opengl/BaseGL.java, java/org/lwjgl/Math.java, java/org/lwjgl/Sys.java, native/win32/org_lwjgl_Display.cpp, native/win32/org_lwjgl_Sys.cpp, native/common/org_lwjgl_Display.h, native/common/org_lwjgl_Sys.h: New getPlatform() method added 2003-03-21 17:57 cix_foo * src/: java/org/lwjgl/Sys.java, native/win32/org_lwjgl_Sys.cpp: New getPlatform() method added 2003-03-21 17:51 cix_foo * src/: java/org/lwjgl/Sys.java, native/common/org_lwjgl_Sys.h, native/win32/org_lwjgl_Sys.cpp: New getPlatform() method added 2003-03-19 13:41 elias_naur * src/: java/org/lwjgl/Display.java, java/org/lwjgl/DisplayMode.java, java/org/lwjgl/test/input/ControllerCreationTest.java, java/org/lwjgl/test/input/MouseCreationTest.java, java/org/lwjgl/test/input/MouseTest.java, java/org/lwjgl/test/openal/MovingSoundTest.java, java/org/lwjgl/test/opengl/Game.java, java/org/lwjgl/test/opengl/Grass.java, native/common/org_lwjgl_Display.h, native/linux/org_lwjgl_Display.cpp, native/win32/org_lwjgl_Display.cpp: Reverted display mode selection 2003-03-18 17:38 cix_foo * src/native/win32/org_lwjgl_input_Mouse.cpp: Fixed JNI error 2003-03-17 19:57 cix_foo * src/java/org/lwjgl/input/Mouse.java: Fixed some JNI errors. One remains. 2003-03-17 19:40 matzon * src/native/win32/org_lwjgl_Display.cpp: fix: dragging of window doesn't work, when returning directly from unhandled WM_SYSCOMMAND - so let's not do that! 2003-03-17 19:34 cix_foo * src/native/common/: extal.c, org_lwjgl_openal_ALC.cpp: Fix Brians bugs 2003-03-17 00:30 matzon * doc/changelogs/full-changeLog.text: changelog 2003-03-17 00:29 matzon * doc/changelogs/0.4-0.5-changelog.text: 0.4 -> 0.5 changelog 2003-03-16 23:52 matzon * src/java/org/lwjgl/test/openal/OpenALCreationTest.java: initial commit of OpenAL create/destroy test 2003-03-16 22:55 elias_naur * src/native/: configure.in, common/org_lwjgl_opengl_GL.cpp: Fixed runtime breakage on linux 2003-03-16 21:31 matzon * src/java/org/lwjgl/test/input/MouseCreationTest.java: fix: stop checking Hz 2003-03-16 21:13 matzon * src/java/org/lwjgl/test/input/MouseTest.java: fix: destroy keyboard upon exit 2003-03-16 21:12 matzon * src/java/org/lwjgl/test/input/MouseTest.java: fix: escape testing 2003-03-16 21:09 matzon * src/java/org/lwjgl/test/input/MouseCreationTest.java: fix: get 60Hz fix: keep polygon within window 2003-03-16 18:37 cix_foo * src/native/common/: extal.c, org_lwjgl_opengl_CoreGL.cpp: [no log message] 2003-03-14 00:11 cix_foo * src/native/common/org_lwjgl_opengl_GL.cpp: [no log message] 2003-03-13 20:54 matzon * src/native/common/org_lwjgl_opengl_GL.cpp: fix: compile bug, since glx* didn't return value 2003-03-13 20:48 cix_foo * src/native/common/org_lwjgl_opengl_GL.cpp: [no log message] 2003-03-13 20:31 cix_foo * src/native/common/checkGLerror.h: [no log message] 2003-03-08 23:14 elias_naur * src/native/linux/: org_lwjgl_Display.cpp, org_lwjgl_input_Keyboard.cpp: Moved disabling of repeat rate to Display 2003-03-08 19:47 elias_naur * src/native/linux/org_lwjgl_input_Keyboard.cpp: Disable linux key repeat while Keyboard is created - match win32 behavior 2003-03-07 17:01 cix_foo * src/native/win32/org_lwjgl_input_Mouse.cpp: Tweaked but little else 2003-03-07 16:23 matzon * src/native/win32/org_lwjgl_input_Controller.cpp: fix: removed GlobalRef fix: now sets fields to JNI_TRUE/JNI_FALSE respectively 2003-03-07 16:04 cix_foo * src/native/common/org_lwjgl_opengl_CoreGL.cpp: [no log message] 2003-03-06 23:55 cix_foo * src/native/win32/org_lwjgl_input_Mouse.cpp: [no log message] 2003-03-06 21:55 matzon * src/native/win32/: org_lwjgl_input_Controller.cpp, org_lwjgl_input_Mouse.cpp: wip fix: buttons array now being ref'ed from native side to avoid GC'ing 2003-03-06 21:54 elias_naur * src/: java/org/lwjgl/opengl/GL.java, native/common/org_lwjgl_opengl_GL.cpp, native/common/org_lwjgl_opengl_GL.h, native/win32/org_lwjgl_Display.cpp: added glXAllocateMemoryNV/glXFreeMemoryNV 2003-03-06 18:52 elias_naur * src/native/common/org_lwjgl_opengl_CoreGL.cpp: [no log message] 2003-03-04 07:08 matzon * src/native/win32/org_lwjgl_Display.cpp: fix: won't be needing hashmaps from native side 2003-03-03 23:12 cix_foo * src/java/org/lwjgl/DisplayMode.java: [no log message] 2003-03-03 22:58 matzon * src/java/org/lwjgl/Display.java: fix: possible NPE evaded 2003-03-03 22:50 matzon * src/native/: common/org_lwjgl_Display.h, win32/org_lwjgl_Display.cpp: fix: small beautification 2003-03-03 22:49 matzon * src/native/linux/org_lwjgl_Display.cpp: fix: now enumerates multiple displaydevices, if available 2003-03-03 22:46 matzon * src/: native/common/org_lwjgl_Display.h, native/win32/org_lwjgl_Display.cpp, java/org/lwjgl/Display.java: fix: now enumerates multiple displaydevices, if available --- NEW FILE: 0.20-changelog.txt --- 2002-09-07 21:52 exocet * src/native/win32/: MatrixOpCommon.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp: Recent Testing: Mul and Inv work for 3x3 matrix, more testing coming check www.happypedestrian.com/lwjgl/matrixop.html for current status 2002-09-07 01:58 cix_foo * src/java/org/lwjgl/input/Keyboard.java: Fixed various bugs 2002-09-07 01:35 matzon * src/: java/org/lwjgl/openal/ALC.java, java/org/lwjgl/openal/CoreAL.java, native/common/org_lwjgl_openal_ALC.h, native/common/org_lwjgl_openal_CoreAL.h, native/win32/org_lwjgl_openal_ALC.cpp, native/win32/org_lwjgl_openal_CoreAL.cpp: rem: getProcAddress removed, since it serves no purpose for Java programmers 2002-09-05 17:46 matzon * doc/tutorial/: openal_basics.html, OpenAL_Tutoral.html: renamed OpenAL_Tutoral to openal_basics 2002-09-05 17:43 matzon * doc/tutorial/: index.html, intro.html: renamed index.html to intro.html 2002-09-03 23:25 matzon * doc/tutorial/OpenAL_Tutoral.html: initial import of tutorial 2002-09-03 21:58 matzon * doc/README: initial import of README 2002-09-03 21:46 matzon * doc/openal_c-to-java.txt: initial import of basic OpenAL conversion from c/c++ to Java 2002-09-03 21:24 matzon * src/native/: common/org_lwjgl_openal_ALC.h, common/org_lwjgl_openal_ALUT.h, common/org_lwjgl_openal_BaseAL.h, win32/org_lwjgl_openal_ALC.cpp, win32/org_lwjgl_openal_ALUT.cpp, win32/org_lwjgl_openal_BaseAL.cpp: mod: adopted create/destroy architecture 2002-09-03 20:54 matzon * src/java/org/lwjgl/openal/: ALC.java, ALUT.java, BaseAL.java: mod: updated to create/destroy architecture 2002-09-03 13:17 matzon * src/java/org/lwjgl/openal/eax/: BaseEAXConstants.java, EAXBufferProperties.java, EAXListenerProperties.java: mod: refactored some EAX constants to Buffer or Listerner Properties class 2002-09-03 07:53 gregorypierce * src/native/macosx/org_lwjgl_Display.cpp: Updated with GL setup functions 2002-09-03 06:57 gregorypierce * src/native/macosx/org_lwjgl_Display.cpp: Initial revision of the Mac version of the display class. Just testing CVS script. 2002-09-03 00:08 matzon * src/native/: common/org_lwjgl_openal_eax_EAXBufferProperties.h, common/org_lwjgl_openal_eax_EAXListenerProperties.h, win32/org_lwjgl_openal_eax_EAXBufferProperties.cpp, win32/org_lwjgl_openal_eax_EAXListenerProperties.cpp: add: finished EAX support 2002-09-03 00:06 matzon * src/java/org/lwjgl/openal/eax/: BaseEAXConstants.java, EAXBufferProperties.java, EAXListenerProperties.java: add: EAX support done - needs some cleaning, and possibly refactoring of constants... 2002-09-02 20:01 matzon * src/java/org/lwjgl/openal/ALConstants.java: mod: AL shouldn't have EAX constants 2002-09-02 15:21 matzon * src/native/: common/org_lwjgl_openal_BaseEAX.h, common/org_lwjgl_openal_CoreEAX.h, common/org_lwjgl_openal_eax_BaseEAX.h, common/org_lwjgl_openal_eax_CoreEAX.h, win32/org_lwjgl_opengl_BaseEAX.cpp, win32/org_lwjgl_opengl_CoreEAX.cpp, win32/org_lwjgl_opengl_eax_BaseEAX.cpp, win32/org_lwjgl_opengl_eax_CoreEAX.cpp: mod: moving to eax subpackage 2002-09-02 15:07 matzon * src/java/org/lwjgl/openal/: BaseEAX.java, BaseEAXConstants.java, CoreEAX.java, EAX.java, eax/BaseEAX.java, eax/BaseEAXConstants.java, eax/CoreEAX.java, eax/EAX.java: mod: moved to eax subpackage 2002-09-02 11:51 matzon * doc/: CREDITS, LICENSE: initial commit 2002-08-30 23:45 matzon * src/: java/org/lwjgl/openal/BaseEAX.java, java/org/lwjgl/openal/CoreEAX.java, native/common/org_lwjgl_openal_CoreEAX.h, native/win32/org_lwjgl_opengl_CoreEAX.cpp: fix: actually set Listener & Buffer GUID's 2002-08-30 23:30 matzon * src/java/org/lwjgl/openal/: BaseEAX.java, BaseEAXConstants.java, CoreEAX.java, EAX.java: add: first stab at EAX support 2002-08-30 23:29 matzon * src/java/org/lwjgl/openal/ALConstants.java: fix: constants cleanup 2002-08-30 23:26 matzon * src/native/: common/extal.h, common/org_lwjgl_openal_BaseEAX.h, common/org_lwjgl_openal_CoreEAX.h, win32/extal.c, win32/org_lwjgl_opengl_BaseEAX.cpp, win32/org_lwjgl_opengl_CoreEAX.cpp: add: first stab at EAX support 2002-08-29 23:40 exocet * src/native/win32/: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp: Safe version now exists, some testing performed. 2002-08-29 16:06 matzon * src/java/org/lwjgl/openal/EAXALConstants.java: mov: renamed to BaseEAXConstants.java 2002-08-29 03:09 matzon * src/: native/win32/org_lwjgl_openal_CoreAL.cpp, native/common/org_lwjgl_openal_CoreAL.h, java/org/lwjgl/openal/ALUT.java, java/org/lwjgl/openal/CoreAL.java: fix: now using ByteBuffer all the way 2002-08-29 01:41 matzon * src/native/win32/org_lwjgl_openal_ALUT.cpp: fix: don't check for errors after the exit! - will crash since no current context 2002-08-29 00:46 matzon * src/native/win32/org_lwjgl_openal_ALUT.cpp: fix: now uses ByteBuffer address to load buffer when using alutLoadWAVMemory fix: minor cleanup 2002-08-29 00:45 matzon * src/native/common/org_lwjgl_openal_ALUT.h: fix: now uses ByteBuffer address to load buffer when using alutLoadWAVMemory 2002-08-28 23:58 cix_foo * src/java/org/lwjgl/input/: Joystick.java, Keyboard.java, Mouse.java: Stuff 2002-08-28 18:45 exocet * src/native/win32/: MatrixOpCommon.cpp, MatrixOpCommon.h, org_lwjgl_Math_MatrixOpAdd_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpAdd_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpCopy_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpCopy_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpInvert_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpDirect.cpp, org_lwjgl_Math_MatrixOpMultiply_MatrixOpSafe.cpp, org_lwjgl_Math_MatrixOpNegate_Matrix... [truncated message content] |
Update of /cvsroot/java-game-lib/LWJGL/www/images/projects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642/images/projects Added Files: alienflux_1.jpg alienflux_2.jpg alienflux_3.jpg alienflux_small_1.jpg alienflux_small_2.jpg alienflux_small_3.jpg extorris_1.jpg extorris_2.jpg extorris_3.jpg extorris_small_1.jpg extorris_small_2.jpg extorris_small_3.jpg marathon_1.jpg marathon_2.jpg marathon_3.jpg marathon_small_1.jpg marathon_small_2.jpg marathon_small_3.jpg tribaltrouble_1.jpg tribaltrouble_2.jpg tribaltrouble_3.jpg tribaltrouble_small_1.jpg tribaltrouble_small_2.jpg tribaltrouble_small_3.jpg Log Message: readded site under www --- NEW FILE: alienflux_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: alienflux_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_small_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_small_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: alienflux_small_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_small_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_small_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_small_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_small_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: extorris_small_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_small_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: alienflux_small_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: marathon_1.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: alienflux_small_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: alienflux_2.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_small_3.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tribaltrouble_3.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:30:19
|
Update of /cvsroot/java-game-lib/LWJGL/www/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642/include Added Files: default.php faq.php news.php Log Message: readded site under www --- NEW FILE: default.php --- <?php // LWJGL menu // ======================================================= $menuItems['LWJGL'] = array( "home", "/", "_top", "about", "about.php", "_top", "download", "download.php", "_top", "installation", "installation.php", "_top", "documentation", "documentation.php", "_top", "forum", "http://forum.lwjgl.org/", "_blank", "faq", "faq.php", "_top", "projects", "projects.php", "_top", // "demos", "demos.php", "_top", "license", "license.php", "_top", "contact", "contact.php", "_top", "credits", "credits.php", "_top"); // Developers $menuItems['Developers'] = array( "CVS tree", "http://cvs.sourceforge.net/viewcvs.py/java-game-lib/", "_blank", "project home", "http://sourceforge.net/projects/java-game-lib", "_blank"); // Developers $menuItems['Miscellaneous'] = array( "links", "links.php", "_top", "changelog", "changelog.php", "_top"); // ------------------------------------------------------- //////////////////////////////////////////////////////////////////////////////// // Prints the left navigation menu, makring $current as selected element //////////////////////////////////////////////////////////////////////////////// function printMenu($current) { // LWJGL menu global $menuItems; // print out beginning echo "<!-- left navigation -->\n"; echo "<div class=\"menu\">\n"; // iterate each array for sub items foreach ($menuItems as $key => $value) { echo " <div class=\"menu_header\">" . $key ."</div>\n"; for ($i = 0; $i < count($value); $i+=3) { echo " "; if (strcmp($current, $value[$i]) == 0) { echo "<div class=\"current_page\">" . $value[$i] . "</div>\n"; } else { echo "<a class=\"menu_item\" href=\"" . $value[$i+1] . "\" target=\"" . $value[$i+2] . "\">" . $value[$i] . "</a>\n"; } } echo " <br>\n\n"; } echo " <!-- icon block -->\n"; echo " <div align=\"center\">\n"; echo " <!-- donation -->\n"; echo " <p> </p>\n"; echo " <a href=\"http://sourceforge.net/donate/index.php?group_id=58488\"><img src=\"http://images.sourceforge.net/images/project-support.jpg\" width=\"88\" height=\"32\" border=\"0\" alt=\"Support This Project\" title=\"Donate to LWJGL\"/></a>\n"; echo " <!-- SF icon -->\n"; echo " <br><br>\n"; echo " <a href=\"http://sourceforge.net\"><img src=\"http://sourceforge.net/sflogo.php?group_id=58488&type=1\" width=\"88\" height=\"31\" border=\"0\" alt=\"SourceForge.net Logo\" title=\"SourceForge.net Logo\"></a>\n"; echo " </div>\n"; echo " <br>\n"; echo "</div>\n\n"; } //////////////////////////////////////////////////////////////////////////////// // Prints the LWJGL header, using $title and $header as supplied name // If no header or title is given, defaults are used //////////////////////////////////////////////////////////////////////////////// function printHeader($title, $header) { // check for title if(!isset($title)) { $title = "LWJGL"; } // check for header if(!isset($header)) { $header = "Lightweight Java Game Library"; } echo "<html>\n"; echo " <head>\n"; echo " <title>" . $title . "</title>\n"; echo " <link type=\"text/css\" rel=\"stylesheet\" href=\"default.css\">\n"; echo " </head>\n"; echo "<body>\n"; echo "<!-- top header -->\n"; echo "<div class=\"header\"><a class=\"header\" href=\"/\">" . $header . "</a></div>\n\n"; } //////////////////////////////////////////////////////////////////////////////// // Prints the LWJGL footer //////////////////////////////////////////////////////////////////////////////// function printFooter() { echo "<div class=\"footer\">this site and its content is © <a class=\"footer\" href=\"mailto:in...@lw...\">lwjgl.org</a>"; echo "<!-- java.net icon -->\n"; echo "<br><br>\n"; echo "</div>\n\n"; echo "</body>"; echo "</html>"; } ?> --- NEW FILE: news.php --- <?php // News // ======================================================= $news[0] = array( "New site!", "Welcome to the grand opening of our new site! Please browse around. Should you find any errors or have trouble finding exactly what your looking for, please email <a href=\"mailto:in...@lw...\">in...@lw...</a>", "Sunday, March 28th, 2004"); // ------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////////// // Prints the news //////////////////////////////////////////////////////////////////////////////// function printNews() { global $news; echo "<!-- news area -->\n "; echo "<div class=\"news\">"; echo "<h2>News</h2>"; // iterate each array for sub items foreach ($news as $item) { echo "\n <div class=\"news_item\">"; echo "<h4>" . $item[0] . "</h4>"; echo "<p>"; echo "$item[1]"; echo "<span class=\"date\"><br><i>$item[2]</i></span>"; echo "</p>"; echo "</div>"; echo "<br>"; } echo "\n </div>\n"; } ?> --- NEW FILE: faq.php --- <?php // News // ======================================================= $faq[0] = array( "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.", "When running the examples or my own program I get a 'Exception in thread \"main\" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.", "The VM cannot locate the lwjgl runtime library. Specify the path to it using -Djava.library.path=<path/to/library>"); $faq[1] = array( "Applets and LWJGL", "Is it possible to use LWJGL from an Applet?", "Unfortunately, no. However you can start a LWJGL application from a webpage using Java WebStart. For more information click <a href=\"http://www.google.com/search?q=java+web+start+tutorial\" target=\"_blank\">here</a>"); $faq[2] = array( "OpenGL ES and LWJGL", "Will LWJGL support OpenGL ES", "OpenGL ES is basically a subset of OpenGL, and we will make the best efforts to get LWJGL running on a device. However we have yet to get our hands on one :("); $faq[3] = array( "ByteBuffer VS. Arrays", "Whats up with all those ByteBuffers? Why not just use arrays?", "Basically because it's the fastest way to transport data to the OpenGL layer. For more indepth discussion, click <a href=\"http://www.puppygames.net/forums/viewtopic.php?t=295\" target=\"_blank\">here</a>"); $faq[4] = array( "Lack of documentation", "I have been looking all around the site, but I can't find any documentation, apart from the javadoc?", "Yes, this is a known \"issue\". We're only a handfull of developers doing this in our sparetime. We therefor tend to prioritize what we need, or want to work on. Documentation, alas, tend to be at the bottom of the chain. We are aware of it though..."); // ------------------------------------------------------- ///////////////////////////////////////////////////////////////////////////////// // Prints the FAQs //////////////////////////////////////////////////////////////////////////////// function printFAQ() { global $faq; echo "<!-- faq area -->\n "; echo "<div class=\"faq\">"; echo "<h2>Frequently Asked Questions</h2>"; // create a list of Q&A // iterate each array for sub items $count = 0; echo "<p><ul>"; foreach ($faq as $item) { echo "<li><a href=\"#" . $count++ . "\">$item[0]</a></li>"; } echo "</ul></p>"; echo "<p>If you have a question which isn't answered here, please post it to the <a href=\"http://forum.lwjgl.org\" target=\"_blank\">forum</a></p>"; echo "<hr>"; // iterate each array for sub items $count = 0; foreach ($faq as $item) { echo "\n <div class=\"faq_item\">"; echo "<p><a name=\"#" . $count++ . "\"></a>"; echo "<font size=\"4\" color=\"ff0000\"><b>Q</b>: </font>" . $item[1]; echo "<br>"; echo "<font size=\"4\" color=\"ff0000\"><b>A</b>: </font>" . $item[2]; echo "</p>"; echo "</div>"; } echo "\n </div>\n"; } ?> |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:30:17
|
Update of /cvsroot/java-game-lib/LWJGL/www/images/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642/images/installation Added Files: eclipse-1.png eclipse-2.png eclipse-3.png eclipse-4.png Log Message: readded site under www --- NEW FILE: eclipse-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: eclipse-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: eclipse-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: eclipse-1.png --- (This appears to be a binary file; contents omitted.) |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:30:17
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12642 Added Files: about.php changelog.php contact.php credits.php default.css demos.php documentation.php download.php faq.php forum.php index.php installation.php license.php links.php projects.php Log Message: readded site under www --- NEW FILE: projects.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("projects"); ?> <script type="text/javascript" language="javascript"> // our window var ssWindow = null; // shows the screenshot using supplied name. File to show is based on document & number function showScreenShot(name, document, number, imgWidth, imgHeight) { // nuke old if exists if (ssWindow != null) { ssWindow.close(); } // calculate sizes var docWidth = imgWidth + 1; var docHeight = imgHeight + 40; var centerX = (screen.width) ? (screen.width-docWidth)/2 : 0; var centerY = (screen.height) ? (screen.height-docHeight)/2 : 0; var extra = (navigator.userAgent.toLowerCase().indexOf("msie") > -1) ? 15 : 0; // if screen is < image, make window window size - scrollbar size if (screen.width < imgWidth) { docWidth = screen.width - 50; } if (screen.height < imgHeight) { docHeight = screen.height - 50; } // open our window ssWindow = window.open("", name, "left=" + centerX + ",top=" + centerY + ",width=" + docWidth + ", height=" + (docHeight + extra) + ",location=no,menubar=no,status=no,toolbar=no,scrollbars=no,resizable=no"); // write the html ssWindow.document.open(); ssWindow.document.write("<html>\n"); ssWindow.document.write(" <head>\n"); ssWindow.document.write(" <title>" + name + "</title>\n"); ssWindow.document.write(" <link rel=\"STYLESHEET\" href=\"default.css\" type=\"text/css\"\n>"); ssWindow.document.write(" </head>\n"); ssWindow.document.write(" <body leftmargin=\"0\" topmargin=\"0\">\n"); ssWindow.document.write(" <a href=\"javascript:window.close()\"><img src=\"" + "images/projects/" + document + "_" + number + ".jpg\" border=\"0\" width=\"" + imgWidth + "\" height=\"" + imgHeight + "\"></a>\n"); ssWindow.document.write(" <p>\n"); ssWindow.document.write(" <div align=\"center\"><font family=\"Fixedsys\"><a href=\"javascript:window.close()\">close window</a></font>\n"); ssWindow.document.write(" </body>\n"); ssWindow.document.write("<html>"); ssWindow.document.close(); // come hence forth, my true popup! ssWindow.focus(); } </script> <!-- Introduction --> <div class="paragraph_item"> <h2>Projects</h2> <p> The following is a list of projects that use LWJGL:<br> <i>Please write to <a href="mailto:in...@lw...">in...@lw...</a> if you have a project you want to have listed</i> </p> <!-- ALIEN FLUX --> <p><u>Alien Flux</u></p> <p> <table width="600" border="0"> <tr> <td width="75">Website: </td> <td><a href="http://puppygames.net/info.php?game=Alien_Flux" target="_blank">http://puppygames.net</a></td> </tr> <tr> <td width="75">Type: </td> <td>Commercial game</td> </tr> <tr valign="top "> <td width="75">Description:</td> <td>Defend the cutest, fluffiest little creatures in the Galaxy from a horde of evil aliens from the fifth dimension! With only fast reactions, animal cunning and a very big laser cannon to help you, you must rescue the Fluffies as malevolent Bubbles attempt to turn them into lime jelly. Fast, fun and furious original arcade action, incredible graphics, and atmospheric sound effects combine to make Alien Flux the best arcade shoot-em-up you've played for over a decade!</td> </tr> <tr> <td colspan="2"> </td> </tr> </table> <table width="600" border="0"> <tr> <td><a href="javascript:showScreenShot('AlienFlux', 'alienflux', '1', 499, 379);"><img src="images/projects/alienflux_small_1.jpg" border="0" width="150" height="112"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('AlienFlux', 'alienflux', '2', 499, 379);"><img src="images/projects/alienflux_small_2.jpg" border="0" width="150" height="112"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('AlienFlux', 'alienflux', '3', 499, 379);"><img src="images/projects/alienflux_small_3.jpg" border="0" width="150" height="112"><a/></td> </tr> </table> </p> <!-- TRIBAL TROUBLE --> <p> </p> <p> </p> <p><u>Tribal Trouble</u></p> <p> <table width="600" border="0"> <tr> <td width="75">Website: </td> <td><a href="http://www.tribaltrouble.com/" target="_blank">http://www.tribaltrouble.com/</a></td> </tr> <tr> <td width="75">Type: </td> <td>Commercial game</td> </tr> <tr valign="top "> <td width="75">Description:</td> <td>Take the role of a chieftain and lead your clueless kinsmen to new discoveries and victories as tribal clashes rage across a group of tropical islands. Tribal Trouble is a fast paced realtime strategy game where you will find yourself pitted against your computer or online players as you collect resources, research new ground-breaking technologies (such as the spear) and rejoice as your armies burn down enemy villages.</td> </tr> <tr> <td colspan="2"> </td> </tr> </table> <table width="600" border="0"> <tr> <td><a href="javascript:showScreenShot('TribalTrouble', 'tribaltrouble', '1', 1024, 768);"><img src="images/projects/tribaltrouble_small_1.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('TribalTrouble', 'tribaltrouble', '2', 1024, 768);"><img src="images/projects/tribaltrouble_small_2.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('TribalTrouble', 'tribaltrouble', '3', 1024, 768);"><img src="images/projects/tribaltrouble_small_3.jpg" border="0" width="150" height="113"><a/></td> </tr> </table> </p> <!-- EXTORRIS --> <p> </p> <p> </p> <p><u>Extorris</u></p> <p> <table width="600" border="0"> <tr> <td width="75">Website: </td> <td><a href="http://extorris.com/" target="_blank">http://extorris.com/</a></td> </tr> <tr> <td width="75">Type: </td> <td><i>not provided</i></td> </tr> <tr valign="top "> <td width="75">Description:</td> <td><i>not provided</i></td> </tr> <tr> <td colspan="2"> </td> </tr> </table> <table width="600" border="0"> <tr> <td><a href="javascript:showScreenShot('Extorris', 'extorris', '1', 1024, 768);"><img src="images/projects/extorris_small_1.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('Extorris', 'extorris', '2', 1024, 768);"><img src="images/projects/extorris_small_2.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('Extorris', 'extorris', '3', 1024, 768);"><img src="images/projects/extorris_small_3.jpg" border="0" width="150" height="113"><a/></td> </tr> </table> </p> <!-- MARATHON --> <p> </p> <p> </p> <p><u>Marathon</u></p> <p> <table width="600" border="0"> <tr> <td width="75">Website: </td> <td><a href="http://www.digitalage.gr/zdimensions/" target="_blank">http://www.digitalage.gr/zdimensions/</a></td> </tr> <tr> <td width="75">Type: </td> <td><i>not provided</i></td> </tr> <tr valign="top "> <td width="75">Description:</td> <td><i>not provided</i></td> </tr> <tr> <td colspan="2"> </td> </tr> </table> <table width="600" border="0"> <tr> <td><a href="javascript:showScreenShot('Marathon', 'marathon', '1', 600, 450);"><img src="images/projects/marathon_small_1.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('Marathon', 'marathon', '2', 1024, 768);"><img src="images/projects/marathon_small_2.jpg" border="0" width="150" height="113"><a/></td> <td witdh="10"> </td> <td><a href="javascript:showScreenShot('Marathon', 'marathon', '3', 600, 450);"><img src="images/projects/marathon_small_3.jpg" border="0" width="150" height="113"><a/></td> </tr> </table> </p> </div> <?php printFooter(); ?> --- NEW FILE: changelog.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("changelog"); function printChangelog($version) { echo "<a name=\"$version\"></a>\n"; echo "<h3>LWJGL $version <a href=\"#top\">top</a></h3>\n"; echo "<div style=\"padding-left: 20px;\">\n"; echo "<pre>"; @readfile("changelogs/$version-changelog.txt"); echo "</pre>\n"; echo "</div>\n"; } ?> <a name="top"></a> <!-- Introduction --> <div class="paragraph_item"> <h2>Changelog</h2> <p>The following is a list of changes of LWJGL per release.</p> <p> <ul> <li><a href="changelogs/full-changelog.txt">Full changelog</a></li> <li><a href="#0.89">LWJGL 0.89</a></li> <li><a href="#0.80">LWJGL 0.80</a></li> <li><a href="#0.70">LWJGL 0.70</a></li> <li><a href="#0.60">LWJGL 0.60</a></li> <li><a href="#0.50">LWJGL 0.50</a></li> <li><a href="#0.40">LWJGL 0.40</a></li> <li><a href="#0.30">LWJGL 0.30</a></li> <li><a href="#0.20">LWJGL 0.20</a></li> <li><a href="#0.10">LWJGL 0.10</a></li> </ul> </p> <?php printChangelog("0.89"); ?> <?php printChangelog("0.80"); ?> <?php printChangelog("0.70"); ?> <?php printChangelog("0.60"); ?> <?php printChangelog("0.50"); ?> <?php printChangelog("0.40"); ?> <?php printChangelog("0.30"); ?> <?php printChangelog("0.20"); ?> <?php printChangelog("0.10"); ?> </div> <?php printFooter(); ?> --- NEW FILE: index.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("home"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Introduction</h2> <p> The Lightweight Java Game Library (LWJGL) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform libraries such as OpenGL (Open Graphics Library) and OpenAL (Open Audio Library) allowing for state of the art 3D games and 3D sound. Additionally LWJGL provides access to controllers such as Gamepads, Steering wheel and Joysticks. All in a simple and straight forward API. </p> <p> LWJGL is not meant to make writing games particularly easy; it is primarily an enabling technology which allows developers to get at resources that are simply otherwise unavailable or poorly implemented on the existing Java platform. We anticipate that the LWJGL will, through evolution and extension, become the foundation for more complete game libraries and "game engines" as they have popularly become known, and hide some of the new evils we have had to expose in the APIs. </p> <p> LWJGL is available under a BSD license, which means it's open source and freely available at no charge. However, we won't mind a <a href="http://sourceforge.net/donate/index.php?group_id=58488">donation</a>. </p> </div> <?php printNews(); printFooter(); ?> --- NEW FILE: links.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("links"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Links</h2> <p> The following list of links are sites that either relate to our effort, or we just think are cool:<br><br> - <a href="http://www.javagaming.org/" target="blank">http://www.javagaming.org/</a><br> Site related to Java gamming <br> <br> - <a href="http://www.puppygames.net/" target="blank">http://www.puppygames.net/</a><br> First commercial game using LWJGL! <br> <br> - <a href="http://www.tribaltrouble.com/" target="blank">http://www.tribaltrouble.com/</a><br> Awesome new commercial game using LWJGL <br> <br> - <a href="http://sourceforge.net/projects/spgl/" target="blank">http://sourceforge.net/projects/spgl/</a><br> Game library building on top of lwjgl <br> <br> - <a href="http://www.mojomonkeycoding.com/" target="blank">http://www.mojomonkeycoding.com/</a><br> jME (or jMonkeyEngine) is an attempt at a fully functional game engine using the Java programming language. <br> <br> - <a href="http://www.hardcode.de/jxinput/" target="blank">http://www.hardcode.de/jxinput/</a><br> More feature complete input support for java </p> </div> <?php printFooter(); ?> --- NEW FILE: credits.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("credits"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Credits</h2> <p> The following people have helped to make this project what it is today: <br> <br> <b>Active developers:</b><br> - Caspian Rychlik-Prince<br> - Brian Matzon<br> - Elias Naur<br> - Erik Duijs<br> - Ioannis Tsakpinis<br> <br> <br> <b>Contributors:</b><br> - Niels Jørgensen<br> - Tristan Campbell<br> - Gregory Pierce<br> - Luke Holden<br> <br> <br> <b>Additional credits goes to:</b><br> - Joseph I. Valenzuela [OpenAL stuff]<br> - Lev Povalahev [OpenGL Extensions]<br> </p> </div> <?php printFooter(); ?> --- NEW FILE: forum.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("forum"); ?> <div class="iframe"> <iframe FRAMEBORDER="0" width="100%" height="2800" src="http://forum.lwjgl.org/"></iframe> </div> <?php printFooter(); ?> --- NEW FILE: faq.php --- <?php require 'include/default.php'; require 'include/faq.php'; printHeader(null, null); printMenu("faq"); ?> <?php printFAQ(); ?> <?php printFooter(); ?> --- NEW FILE: documentation.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("documentation"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Documentation</h2> <p> Here you will find documentation for LWJGL. Currently only javadoc is available. </p> <p> <a href="/javadoc" target="_blank">LWJGL javadoc</a> </p> </div> <?php printFooter(); ?> --- NEW FILE: contact.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("contact"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Contact</h2> <p> The LWJGL project is an opensource project, being actively developed by several people from all over the world. Any contact to the project as a group is therefore best done using either:<br> <ul> <li><a href="http://forum.lwjgl.org/" target="_blank">LWJGL forum</a></li> <li><a href="irc://irc.freenode.net/lwjgl">#LWJGL IRC channel</a> on the freenode network</li> </ul> </p> <p> If you wish to contact the LWJGL developers directly, please send an email to <a href="mailto:in...@lw...">in...@lw...</a> </p> </div> <?php printFooter(); ?> --- NEW FILE: demos.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("demos"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Demos</h2> <p>The following is a list of webstartable demos of LWJGL, all from the <code>org.lwjgl.test.*</code> package</p> <p><b>Input</b></p> <p><pre> ControllerCreationTest [<a href="jnlp/lwjgl-demo.php/input.ControllerCreationTest">launch</a> | <a href="jnlp/source.php?path=input/ControllerCreationTest.java" target="_blank">source</a>] ControllerTest [<a href="jnlp/lwjgl-demo.php/input.ControllerTest">launch</a> | <a href="jnlp/source.php?path=input/ControllerTest.java" target="_blank">source</a>] HWCursorTest [<a href="jnlp/lwjgl-demo.php/input.HWCursorTest">launch</a> | <a href="jnlp/source.php?path=input/HWCursorTest.java" target="_blank">source</a>] KeyboardTest [<a href="jnlp/lwjgl-demo.php/input.KeyboardTest">launch</a> | <a href="jnlp/source.php?path=input/KeyboardTest.java" target="_blank">source</a>] MouseCreationTest [<a href="jnlp/lwjgl-demo.php/input.MouseCreationTest">launch</a> | <a href="jnlp/source.php?path=input/MouseCreationTest.java" target="_blank">source</a>] MouseTest [<a href="jnlp/lwjgl-demo.php/input.MouseTest">launch</a> | <a href="jnlp/source.php?path=input/MouseTest.java" target="_blank">source</a>]</pre> </p> <p><b>OpenAL</b></p> <p><pre> ALCTest [<a href="jnlp/lwjgl-demo.php/openal.ALCTest">launch</a> | <a href="jnlp/source.php?path=openal/ALCTest.java" target="_blank">source</a>] PositionTest [<a href="jnlp/lwjgl-demo.php/openal.PositionTest">launch</a> | <a href="jnlp/source.php?path=openal/PositionTest.java" target="_blank">source</a>] EAXTest [<a href="jnlp/lwjgl-demo.php/openal.EAXTest">launch</a> | <a href="jnlp/source.php?path=openal/EAXTest.java" target="_blank">source</a>] MovingSoundTest [<a href="jnlp/lwjgl-demo.php/openal.MovingSoundTest">launch</a> | <a href="jnlp/source.php?path=openal/MovingSoundTest.java" target="_blank">source</a>] OpenALCreationTest [<a href="jnlp/lwjgl-demo.php/openal.OpenALCreationTest">launch</a> | <a href="jnlp/source.php?path=openal/OpenALCreationTest.java" target="_blank">source</a>] PlayTest [<a href="jnlp/lwjgl-demo.php/openal.PlayTest">launch</a> | <a href="jnlp/source.php?path=openal/PlayTest.java" target="_blank">source</a>] PlayTestMemory [<a href="jnlp/lwjgl-demo.php/openal.PlayTestMemory">launch</a> | <a href="jnlp/source.php?path=openal/PlayTestMemory.java" target="_blank">source</a>] SourceLimitTest [<a href="jnlp/lwjgl-demo.php/openal.SourceLimitTest">launch</a> | <a href="jnlp/source.php?path=openal/SourceLimitTest.java" target="_blank">source</a>] StressTest [<a href="jnlp/lwjgl-demo.php/openal.StressTest">launch</a> | <a href="jnlp/source.php?path=openal/StressTest.java" target="_blank">source</a>]</pre> </p> <p><b>OpenGL</b></p> <p><pre> FullScreenWindowedTest [<a href="jnlp/lwjgl-demo.php/opengl.FullScreenWindowedTest">launch</a> | <a href="jnlp/source.php?path=opengl/FullScreenWindowedTest.java" target="_blank">source</a>] Game [<a href="jnlp/lwjgl-demo.php/opengl.Game">launch</a> | <a href="jnlp/source.php?path=opengl/Game.java" target="_blank">source</a>] Grass [<a href="jnlp/lwjgl-demo.php/opengl.Grass">launch</a> | <a href="jnlp/source.php?path=opengl/Grass.java" target="_blank">source</a>] PbufferTest [<a href="jnlp/lwjgl-demo.php/opengl.PbufferTest">launch</a> | <a href="jnlp/source.php?path=opengl/PbufferTest.java" target="_blank">source</a>] VBOIndexTest [<a href="jnlp/lwjgl-demo.php/opengl.VBOIndexTest">launch</a> | <a href="jnlp/source.php?path=opengl/VBOIndexTest.java" target="_blank">source</a>] VBOTest [<a href="jnlp/lwjgl-demo.php/opengl.VBOTest">launch</a> | <a href="jnlp/source.php?path=opengl/VBOTest.java" target="_blank">source</a>]</pre> </p> <p><b>org.lwjgl</b></p> <p><pre> SysTest [<a href="jnlp/lwjgl-demo.php/SysTest">launch</a> | <a href="jnlp/source.php?path=SysTest.java" target="_blank">source</a>] DisplayTest [<a href="jnlp/lwjgl-demo.php/DisplayTest">launch</a> | <a href="jnlp/source.php?path=DisplayTest.java" target="_blank">source</a>] WindowCreationTest [<a href="jnlp/lwjgl-demo.php/WindowCreationTest">launch</a> | <a href="jnlp/source.php?path=WindowCreationTest.java" target="_blank">source</a>]</pre> </p> </div> <?php printFooter(); ?> --- NEW FILE: about.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("about"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>About</h2> <p> <i>Taken from a <a href="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=LWJGL;action=display;num=1067072465;start=31#31" target="_blank">post</a> by Caspian on Javagaming.org</i> <br> <br> In response to everything here I'd like to state our goals with LWJGL: <ul> <li>Speed<br></li> <li>Simplicity<br></li> <li>Ubiquity<br></li> <li>Smallness<br></li> <li>Security<br></li> <li>Robustness<br></li> <li>Minimalism<br></li> </ul> <p> and this will help explain how we got to where we are today and more importantly where we're going and <i>where we're not going</i>. <p><u><b>Speed</b></u><br> The whole point of LWJGL was to bring the speed of Java rendering into the 21st century. This is why we have: <br> <ul> <br> <li>Thrown out methods designed for efficient C programming that make no sense at all in java, such as glColor3fv. <br></li> <li>Made the library throw an exception when hardware acceleration is not available on Windows. No point in running at 5fps is there? <br></li> </ul> <br> <p><u><b>Ubquity</b></u><br> Our library is designed to work on devices as small as phones right the way up to multiprocessor rendering servers. Just because there aren't any phones or consoles yet with fast enough JVMs and 3d acceleration is neither here nor there - there will be, one day. We're carefully tailoring the library so that when it happens we'll have OpenGL ES support in there just like that. This means that: <br> <ul> <li>We had to have a very small footprint or it'll never catch on in the J2ME space at all. That's why the binary distribution is under half a meg, and that takes care of 3d sound, graphics, and IO. <br> </li><li> Even under desktop environments having a 1-2mb download just to call a few 3D functions is daft. <br></li> <li> We've worked to a lowest common denominator principle rather than attempting to design for all possibilities, but we've made sure that 99% of required uses are covered. That's why we've only got one window, and why we don't guarantee that windowed mode is even supported (it's officially a debug mode and hence we don't even supply some very basic windowy abilities that you'd get in AWT) and why we don't allow multiple thread rendering contexts. <br></li> </ul> <br> <p><u><b>Simplicity</b></u><br> LWJGL needed to be simple for it to be used by a wide range of developers. We wanted relative newbies to be able to get on with it, and professionals to be able to use it professionally, maybe typically coming from a C++ background. We had to choose a paradigm that actually fits with OpenGL, and one that fits with our target platforms which ranges from PDA to desktop level. This is why: <br> <ul><br> <li>We aren't catering for single-buffered drawing<br></li> <li>We don't require that an instance of GL is passed around all over the place but <i>we do not prevent this style of coding</i>. See below for why. <br></li> <li>We removed a lot of stuff that 99% of games programmers need to know nothing about <br> </li> <li>We have decided that consistency is better than complexity. Rather than allowing multiple ways to call the same methods and bloating the library we've just said, "Right, no arrays. They're slower anyway. Get used to buffers, as this is what buffers are meant to be used for." </li> </ul> <br> <p><u><b>Smallness</b></u> <br> See ubiquity above. We had to be small. <br> <ul><br> <li>Small == simple. The less ways there are to do something, the easier it is to learn the only way that works or is allowed. <br> </li> <li>Small == <i>our code</i> is less buggy. Wouldn't you rather be hunting for bugs in your own code, not ours? <br> </li> <li>Small == downloadable. No version nightmares. LWJGL is small enough to download with every application that uses it. <br></li> <li>Small == J2ME. <br> </li> </ul><br> <p><u><b>Security</b></u> <br> We realised a few months ago that no-one was going to take us seriously if we couldn't guarantee the security of the LWJGL native libraries. This is why we: <br> <ul><br> <li>No longer use pointers but exclusively use buffers instead <br> </li> <li> Are gradually adding further checks to buffer positions and limits to ensure that the values are within allowed ranges to prevent buffer attacks <br></li> </ul> <br><p> <u><b>Robustness</b></u> <br> Similarly to security we have now realised that a reliable system is far more useful than a fast system. When we actually had a proper application to benchmark finally we had some real data. Many of our original design decisions were based on microbenchmarks - well, you have to start somewhere! But with a real application to benchmark we now know we can throw out asserts and replace them with a proper if (...) check and a thrown exception. We know also that we can move all that GL error checking out of native code and into Java code and we will no longer need a separate DLL for debug mode. <br> <br> As for runtime exceptions, they have their place. There's not a reasonably well defined argument as to when you should use a runtime exception and when you should use a checked exception. When I made OpenGLException a checked exception all it did was end up littering my code with try {} catch {} sections - except that if you've got an OpenGLException there is very little sensible you can do to rectify it because it should never have occurred in the first place. That's why it's a runtime exception. You should simply not write code than can throw it because it is generally not recoverable nicely. However for robustness (and security) we are required to throw an exception if something is amiss. It falls, I believe, into exactly the same category of trouble as NPEs, ArrayIndexOOBs and ClassCastExceptions: should never occur but needs to be trapped somewhere. <br> <p> <u><b>Minimalism</b></u> <br> This is another critical factor in our design decisions. If it doesn't need to be in the library, it's not in the library. Our original aim was to produce a library that provided the bare minimum required to access the hardware that Java couldn't access, and by and large we're sticking to this mantra. The vector math code in the LWJGL is looking mighty scared at the moment because it's probably for the chop - well, at least, from the core library - as it's not an enabling technology at all, and there are numerous more fully featured alternatives. We chucked out GLU because it's mostly irrelevant to game developers except for a few functions that we really need to get redeveloped in pure Java - but basically, GLU is just a library of code built on top of the enablement layer. </p> </div> <?php printFooter(); ?> --- NEW FILE: installation.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("installation"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Installation</h2> <p> As LWJGL is more or less self contained, the actual installation typically amounts to extracting the archive, and asserting that everything works fine by running an example. The following paragraphs will walk you through the installation on the supported platforms. </p> <p>For IDE integration click <a href="#ide">here</a>.</p> <!-- Windows --> <h3>Windows</h3> <p> 1. <a href="http://sourceforge.net/project/showfiles.php?group_id=58488">Download</a> the distribution<br> 2. Unpack the archive, file contents should include (amongst other things): <pre> lwjgl.dll lwjglaudio.dll lwjgl.jar lwjgl_test.jar</pre> </p> <p> 3. Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. once navigated, issue the following command: <pre> java -cp lwjgl.jar;lwjgl_test.jar; org.lwjgl.test.WindowCreationTest</pre> </p> <p> a window should appear, and you should see the following output: <pre> Found <number> display modes 240, 320, WindowCreationTest Display created</pre> </p> <p> 4. Should you wish to place the dll's in some other directory than you're class files (say /native as opposed to /classes) you could do so, by using the java.library.path property. For example <pre> java -cp classes; -Djava.library.path=native org.lwjgl.test.WindowCreationTest</pre> </p> <!-- linux --> <p> </p> <h3>Linux</h3> <p> 1. <a href="http://sourceforge.net/project/showfiles.php?group_id=58488">Download</a> the distribution<br> 2. Unpack the archive, file contents should include (amongst other things): <pre> liblwjgl.so libopenal.so lwjgl.jar lwjgl_test.jar</pre> </p> <p> 3. Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. once navigated, issue the following command: <pre> java -cp lwjgl.jar:lwjgl_test.jar: org.lwjgl.test.WindowCreationTest</pre> </p> <p> a window should appear, and you should see the following output: <pre> Found <number> display modes 240, 320, WindowCreationTest Display created</pre> </p> <p> 4. Should you wish to place the so files in some other directory than you're class files (say /native as opposed to /classes) you could do so, by using the java.library.path property. For example <pre> java -cp classes -Djava.library.path=native org.lwjgl.test.WindowCreationTest</pre> </p> <!-- Mac OS X --> <p> </p> <h3>Mac OS X</h3> <p> 1. <a href="http://sourceforge.net/project/showfiles.php?group_id=58488">Download</a> the distribution<br> 2. Unpack the archive, file contents should include (amongst other things): <pre> liblwjgl.jnilib libopenal.dylib lwjgl.jar lwjgl_test.jar</pre> </p> <p> 3. Test LWJGL by opening a command prompt, and navigating to the folder where the archive was extracted. once navigated, issue the following command: <pre> java -cp lwjgl.jar:lwjgl_test.jar: org.lwjgl.test.WindowCreationTest</pre> </p> <p> a window should appear, and you should see the following output: <pre> Found <number> display modes 240, 320, WindowCreationTest Display created</pre> </p> <p> 4. Should you wish to place the so files in some other directory than you're class files (say /native as opposed to /classes) you could do so, by using the java.library.path property. For example <pre> java -cp classes -Djava.library.path=native org.lwjgl.test.WindowCreationTest</pre> </p> </div> <p> </p> <a name="ide"></a> <div class="paragraph_item"> <h2>IDE integration</h2> <p> Using LWJGL in your IDE is as as simple as including the jar and telling where the native files are to be located. The following lists how to install LWJGL in some popular IDEs. </p> <!-- Eclipse --> <h3>Eclipse</h3> <p> 1. Having installed LWJGL on your platform of choice, fire up Eclipse.<br> 2. Create a new project, and add lwjgl.jar to the build path of your project (Project->Properties->Java build path) by clicking 'Add External JARs' under the Libraries tab<br><br> <img src="images/installation/eclipse-1.png"><br><br> 3. Having created a class to run, create a new run target by selecting the 'Run' icon or using the menu (Run -> Run...)<br><br> <img src="images/installation/eclipse-2.png"><br><br> select 'New' from the dialog box<br><br> <img src="images/installation/eclipse-3.png"><br><br> Supply a name for your new target, and make SURE you add the path to the dll files supplying the -Djava.library.path argument to the vm. The path you supply is relative to the working directory. Adjust this too if needed.<br><br> <img src="images/installation/eclipse-4.png"><br><br> 4. You should now be able to run the application directly from Eclipse. Run the newly created target to confirm. </p> <!-- Netbeans --> <p> </p> <h3>Netbeans</h3> <p> <i>no text yet</i> </p> <!-- JCreator --> <p> </p> <h3>JCreator</h3> <p> 1. At the top, click Project -> Project Properties<br> 2. Click a tab that says "Required Libraries"<br> 3. Then click the "new" button<br> 4. A new window should pop up. At the top text box, put LWJGL<br> 5. Then click add --> add path, and select the file were you put the .class/dll files<br> 6. Click add -> add archive and add both .jar files<br> </p> </div> <?php printFooter(); ?> --- NEW FILE: license.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("license"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>License</h2> <p> <pre> /* * Copyright (c) 2002-2004 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ </pre> </p> </div> <?php printFooter(); ?> --- NEW FILE: download.php --- <?php require 'include/default.php'; require 'include/news.php'; printHeader(null, null); printMenu("download"); ?> <!-- Introduction --> <div class="paragraph_item"> <h2>Download</h2> <p> Latest stable release is 0.8. Please download it here:<br> <a href="http://sourceforge.net/project/showfiles.php?group_id=58488&package_id=54362&release_id=192924" target="_blank">LWJGL 0.8 alpha</a> </p> <p> Latest CVS tarball. Please download it here:<br> <a href="http://cvs.sourceforge.net/cvstarballs/java-game-lib-cvsroot.tar.bz2">CVS Tarball</a> </p> <p> For a list of all releases of LWJGL please follow this link:<br> <a href="http://sourceforge.net/project/showfiles.php?group_id=58488" target="_blank">LWJGL all releases</a> </p> </div> <?php printFooter(); ?> --- NEW FILE: default.css --- /* default body style */ body { font-family: Verdana, Arial; font-size: 13px; margin: 0px; vertical-align: top; } /* Top header */ div.header { color: #ffffff; padding: 30px 0em 30px 7em; background-color: #666666; text-align: center; vertical-align: middle; font-size: 36px; font-weight: bold; } /* footer */ div.footer { color: #999999; text-align: center; vertical-align: bottom; padding: 1.5em 0em 1.5em 7em; } /* left menu */ div.menu { vertical-align: top; background-color: #666666; float: left; width: 10em; } /* header menu items */ div.menu_header { padding-left: 0.5em; color: #ff0000; font-size: 14px; text-decoration: none; font-weight: bold; line-height: 125%; } /* menu item links */ a { text-decoration: none; } a:hover { text-decoration: underline; } /* menu item links */ a.menu_item { padding-left: 1.0em; color: #ffffff; text-decoration: none; display: block; } a.menu_item:hover { color: #5D90ED; text-decoration: underline; } /* menu item links */ a.header { color: #ffffff; text-decoration: none; } /* menu item links */ a.footer { color: #999999; text-decoration: none; } a.footer:hover { color: #5D90ED; text-decoration: underline; } /* menu item links */ div.current_page { padding-left: 1.0em; color: #ffffff; text-decoration: none; font-weight: bold; display: block; } /* introduction area */ div.paragraph_item { margin-left: 10.5em; } div.paragraph_item > h2:first-child { color: #ff0000; } div.paragraph_item > p { margin-left: 1em; } /* news area */ div.news { margin-left: 10.5em; } div.news > h2:first-child { color: #ff0000; } div.news_item { margin-left: 1em; } /* introduction area */ div.iframe { margin-left: 10em; } /* faq area */ div.faq { margin-left: 10.5em; } div.faq > h2:first-child { color: #ff0000; } div.faq_item { margin-left: 1em; } |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:26:56
|
Update of /cvsroot/java-game-lib/LWJGL/www/images/projects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12221/projects Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/images/projects added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:26:42
|
Update of /cvsroot/java-game-lib/LWJGL/www/images/installation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12171/installation Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/images/installation added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:26:14
|
Update of /cvsroot/java-game-lib/LWJGL/www/changelogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12045/changelogs Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/changelogs added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:26:01
|
Update of /cvsroot/java-game-lib/LWJGL/www/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12014/images Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/images added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:25:49
|
Update of /cvsroot/java-game-lib/LWJGL/www/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11898/include Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/include added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:25:21
|
Update of /cvsroot/java-game-lib/LWJGL/www/jnlp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11821/jnlp Log Message: Directory /cvsroot/java-game-lib/LWJGL/www/jnlp added to the repository |
|
From: Ioannis T. <sp...@us...> - 2004-03-30 17:25:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11706 Modified Files: ARBBufferObject.java ARBFragmentProgram.java ARBProgram.java ARBVertexBufferObject.java ARBVertexProgram.java EXTPixelBufferObject.java NVFragmentProgram.java NVProgram.java NVVertexProgram.java Log Message: Restored hierarchies and completed EXT_pixel_buffer_object Index: NVVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVVertexProgram.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- NVVertexProgram.java 29 Mar 2004 16:44:36 -0000 1.6 +++ NVVertexProgram.java 30 Mar 2004 17:13:35 -0000 1.7 @@ -46,7 +46,7 @@ import java.nio.IntBuffer; import java.nio.ShortBuffer; -public final class NVVertexProgram { +public final class NVVertexProgram extends NVProgram { /* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, Index: NVProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVProgram.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NVProgram.java 29 Mar 2004 16:44:36 -0000 1.3 +++ NVProgram.java 30 Mar 2004 17:13:35 -0000 1.4 @@ -43,7 +43,7 @@ import java.nio.ByteBuffer; import java.nio.IntBuffer; -public final class NVProgram { +public class NVProgram { /* Accepted by the <pname> parameter of GetProgramivNV: Index: ARBVertexBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexBufferObject.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ARBVertexBufferObject.java 29 Mar 2004 16:44:36 -0000 1.5 +++ ARBVertexBufferObject.java 30 Mar 2004 17:13:35 -0000 1.6 @@ -41,7 +41,7 @@ package org.lwjgl.opengl; -public final class ARBVertexBufferObject { +public final class ARBVertexBufferObject extends ARBProgram { /* * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, Index: NVFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFragmentProgram.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NVFragmentProgram.java 29 Mar 2004 16:44:36 -0000 1.5 +++ NVFragmentProgram.java 30 Mar 2004 17:13:35 -0000 1.6 @@ -42,7 +42,7 @@ import java.nio.ByteBuffer; import java.nio.FloatBuffer; -public final class NVFragmentProgram { +public final class NVFragmentProgram extends NVProgram { /* Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the Index: ARBFragmentProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBFragmentProgram.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ARBFragmentProgram.java 29 Mar 2004 16:44:36 -0000 1.6 +++ ARBFragmentProgram.java 30 Mar 2004 17:13:35 -0000 1.7 @@ -32,7 +32,7 @@ package org.lwjgl.opengl; -public final class ARBFragmentProgram { +public final class ARBFragmentProgram extends ARBProgram { /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the Index: EXTPixelBufferObject.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTPixelBufferObject.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- EXTPixelBufferObject.java 29 Mar 2004 16:44:36 -0000 1.1 +++ EXTPixelBufferObject.java 30 Mar 2004 17:13:35 -0000 1.2 @@ -37,10 +37,21 @@ */ package org.lwjgl.opengl; -public final class EXTPixelBufferObject { +public final class EXTPixelBufferObject extends ARBProgram { + /* + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ public static final int GL_PIXEL_PACK_BUFFER_EXT = 0x88EB; - public static final int GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC; + /* + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + 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 Index: ARBProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBProgram.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ARBProgram.java 29 Mar 2004 16:44:36 -0000 1.5 +++ ARBProgram.java 30 Mar 2004 17:13:35 -0000 1.6 @@ -45,7 +45,7 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; -public final class ARBProgram { +public class ARBProgram { /* * Accepted by the <format> parameter of ProgramStringARB: Index: ARBVertexProgram.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBVertexProgram.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ARBVertexProgram.java 29 Mar 2004 16:44:36 -0000 1.5 +++ ARBVertexProgram.java 30 Mar 2004 17:13:35 -0000 1.6 @@ -44,7 +44,7 @@ import java.nio.IntBuffer; import java.nio.ShortBuffer; -public final class ARBVertexProgram { +public final class ARBVertexProgram extends ARBProgram { /* * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:24:29
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11591/www Log Message: Directory /cvsroot/java-game-lib/LWJGL/www added to the repository |
|
From: Brian M. <ma...@us...> - 2004-03-30 17:21:08
|
Update of /cvsroot/java-game-lib/LWJGL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10854 Modified Files: .cvsignore Log Message: added .project to cvs ignore - keep IDE's out of root folder Index: .cvsignore =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- .cvsignore 25 Nov 2002 06:55:28 -0000 1.2 +++ .cvsignore 30 Mar 2004 17:09:28 -0000 1.3 @@ -1 +1 @@ -.classpath *.class *.class~ *.java~ .nbattrs \ No newline at end of file +.classpath *.class *.class~ *.java~ .nbattrs .project \ No newline at end of file |
|
From: Elias N. <eli...@us...> - 2004-03-29 19:20:41
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25376/src/java/org/lwjgl/opengl Modified Files: BufferChecks.java Log Message: Add error message to the buffer overflow exception Index: BufferChecks.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/BufferChecks.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- BufferChecks.java 18 Feb 2004 22:31:00 -0000 1.7 +++ BufferChecks.java 29 Mar 2004 19:09:10 -0000 1.8 @@ -66,7 +66,7 @@ */ static void checkBuffer(Buffer buf, int size) { if (buf.remaining() < size) { - throw new BufferOverflowException(); + throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size); } } /** |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:07:04
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/ext In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30361 Modified Files: Makefile.am Added Files: org_lwjgl_opengl_EXTDepthBoundsTest.cpp Log Message: New extensions and static import modifications --- NEW FILE: org_lwjgl_opengl_EXTDepthBoundsTest.cpp --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.EXTDepthBoundsTest // ---------------------------------- #include "extgl.h" typedef void (APIENTRY * glDepthBoundsEXTPROC) (GLclampd zmin, GLclampd zmax); static glDepthBoundsEXTPROC glDepthBoundsEXT; /* * Class: org.lwjgl.opengl.EXTDepthBoundsTest * Method: glDepthBoundsEXT */ static void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT (JNIEnv * env, jclass clazz, jfloat zmin, jfloat zmax) { glDepthBoundsEXT(zmin, zmax); } void extgl_InitEXTDepthBoundsTest(JNIEnv *env, jobject ext_set) { JavaMethodAndExtFunction functions[] = { {"glDepthBoundsEXT", "(FF)V", (void*)&Java_org_lwjgl_opengl_EXTDepthBoundsTest_glDepthBoundsEXT, "glDepthBoundsEXT", (void**)&glDepthBoundsEXT} }; int num_functions = NUMFUNCTIONS(functions); jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/EXTDepthBoundsTest"); if (extgl_Extensions.GL_EXT_depth_bounds_test) extgl_InitializeClass(env, clazz, ext_set, "GL_EXT_depth_bounds_test", num_functions, functions); } Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/ext/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile.am 8 Feb 2004 20:30:29 -0000 1.2 +++ Makefile.am 29 Mar 2004 16:55:26 -0000 1.3 @@ -4,6 +4,7 @@ INCLUDES=-I.. SRC=org_lwjgl_opengl_EXTBlendFuncSeparate.cpp \ org_lwjgl_opengl_EXTCompiledVertexArray.cpp \ + org_lwjgl_opengl_EXTDepthBoundsTest.cpp \ org_lwjgl_opengl_EXTDrawRangeElements.cpp \ org_lwjgl_opengl_EXTFogCoord.cpp \ org_lwjgl_opengl_EXTMultiDrawArrays.cpp \ |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:03:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/nv In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29576 Modified Files: org_lwjgl_opengl_NVFragmentProgram.cpp Log Message: New extensions and static import modifications Index: org_lwjgl_opengl_NVFragmentProgram.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/nv/org_lwjgl_opengl_NVFragmentProgram.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_opengl_NVFragmentProgram.cpp 9 Mar 2004 09:25:10 -0000 1.5 +++ org_lwjgl_opengl_NVFragmentProgram.cpp 29 Mar 2004 16:51:57 -0000 1.6 @@ -1,110 +1,78 @@ -/* -* Copyright (c) 2002 Lightweight Java Game Library Project -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* -* * Neither the name of 'Light Weight Java Game Library' nor the names of -* its contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// ---------------------------------- -// IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFragmentProgram -// ---------------------------------- - -#include "extgl.h" - - -typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * glProgramLocalParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRY * glGetProgramLocalParameterfvARBPROC) (GLenum target, GLuint index, GLfloat *params); - -static glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; -static glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB; -static glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; -static glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB; - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglProgramNamedParameter4fNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV - (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jfloat x, jfloat y, jfloat z, jfloat w) -{ - GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; - glProgramNamedParameter4fNV(id, length, name_ptr, x, y, z, w); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglGetProgramNamedParameterfvNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV - (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jobject params, jint paramsOffset) -{ - GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; - GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + paramsOffset; - glGetProgramNamedParameterfvNV(id, length, name_ptr, params_ptr); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: glProgramLocalParameter4fNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_glProgramLocalParameter4fARB - (JNIEnv * env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w) -{ - glProgramLocalParameter4fARB(target, index, x, y, z, w); - -} - -/* - * Class: org.lwjgl.opengl.NVFragmentProgram - * Method: nglGetProgramLocalParameterfvNV - */ -static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramLocalParameterfvARB - (JNIEnv * env, jclass clazz, jint target, jint index, jobject params, jint params_offset) -{ - GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + params_offset; - glGetProgramLocalParameterfvARB(target, index, params_ptr); - -} - -void extgl_InitNVFragmentProgram(JNIEnv *env, jobject ext_set) -{ - JavaMethodAndExtFunction functions[] = { - {"nglProgramNamedParameter4fNV", "(IILjava/nio/ByteBuffer;IFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV, "glProgramNamedParameter4fNV", (void**)&glProgramNamedParameter4fNV}, - {"nglGetProgramNamedParameterfvNV", "(IILjava/nio/ByteBuffer;ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV, "glGetProgramNamedParameterfvNV", (void**)&glGetProgramNamedParameterfvNV}, - {"glProgramLocalParameter4fARB", "(IIFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_glProgramLocalParameter4fARB, "glProgramLocalParameter4fARB", (void**)&glProgramLocalParameter4fARB}, - {"nglGetProgramLocalParameterfvARB", "(IILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramLocalParameterfvARB, "glGetProgramLocalParameterfvARB", (void**)&glGetProgramLocalParameterfvARB} - }; - int num_functions = NUMFUNCTIONS(functions); - jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/NVFragmentProgram"); - if (extgl_Extensions.GL_NV_fragment_program) - extgl_InitializeClass(env, clazz, ext_set, "GL_NV_fragment_program", num_functions, functions); -} +/* +* Copyright (c) 2002 Lightweight Java Game Library Project +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* * Neither the name of 'Light Weight Java Game Library' nor the names of +* its contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// ---------------------------------- +// IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.NVFragmentProgram +// ---------------------------------- + +#include "extgl.h" + +typedef void (APIENTRY * glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY * glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); + +static glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV; +static glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV; + +/* + * Class: org.lwjgl.opengl.NVFragmentProgram + * Method: nglProgramNamedParameter4fNV + */ +static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV + (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jfloat x, jfloat y, jfloat z, jfloat w) +{ + GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; + glProgramNamedParameter4fNV(id, length, name_ptr, x, y, z, w); +} + +/* + * Class: org.lwjgl.opengl.NVFragmentProgram + * Method: nglGetProgramNamedParameterfvNV + */ +static void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV + (JNIEnv * env, jclass clazz, jint id, jint length, jobject name, jint nameOffset, jobject params, jint paramsOffset) +{ + GLubyte *name_ptr = (GLubyte *)env->GetDirectBufferAddress(name) + nameOffset; + GLfloat *params_ptr = (GLfloat *)env->GetDirectBufferAddress(params) + paramsOffset; + glGetProgramNamedParameterfvNV(id, length, name_ptr, params_ptr); +} + +void extgl_InitNVFragmentProgram(JNIEnv *env, jobject ext_set) +{ + JavaMethodAndExtFunction functions[] = { + {"nglProgramNamedParameter4fNV", "(IILjava/nio/ByteBuffer;IFFFF)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV, "glProgramNamedParameter4fNV", (void**)&glProgramNamedParameter4fNV}, + {"nglGetProgramNamedParameterfvNV", "(IILjava/nio/ByteBuffer;ILjava/nio/FloatBuffer;I)V", (void*)&Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV, "glGetProgramNamedParameterfvNV", (void**)&glGetProgramNamedParameterfvNV}, + }; + int num_functions = NUMFUNCTIONS(functions); + jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/NVFragmentProgram"); + if (extgl_Extensions.GL_NV_fragment_program) + extgl_InitializeClass(env, clazz, ext_set, "GL_NV_fragment_program", num_functions, functions); +} |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 17:02:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/arb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29475 Modified Files: Makefile.am Added Files: org_lwjgl_opengl_ARBBufferObject.cpp Removed Files: org_lwjgl_opengl_ARBVertexBufferObject.cpp Log Message: New extensions and static import modifications --- NEW FILE: org_lwjgl_opengl_ARBBufferObject.cpp --- /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // ---------------------------------- // IMPLEMENTATION OF NATIVE METHODS FOR CLASS: org.lwjgl.opengl.ARBBufferObject // ---------------------------------- #include "extgl.h" #include "common_tools.h" typedef int GLintptrARB; typedef unsigned int GLsizeiptrARB; typedef void (APIENTRY * glBindBufferARBPROC) (GLenum target, GLuint buffer); typedef void (APIENTRY * glDeleteBuffersARBPROC) (GLsizei n, const GLuint *buffers); typedef void (APIENTRY * glGenBuffersARBPROC) (GLsizei n, GLuint *buffers); typedef GLboolean (APIENTRY * glIsBufferARBPROC) (GLuint buffer); typedef void (APIENTRY * glBufferDataARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); typedef void (APIENTRY * glBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); typedef void (APIENTRY * glGetBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); typedef void * (APIENTRY * glMapBufferARBPROC) (GLenum target, GLenum access); typedef GLboolean (APIENTRY * glUnmapBufferARBPROC) (GLenum target); typedef void (APIENTRY * glGetBufferParameterivARBPROC) (GLenum target, GLenum pname, GLint *params); typedef void (APIENTRY * glGetBufferPointervARBPROC) (GLenum target, GLenum pname, GLvoid **params); static glBindBufferARBPROC glBindBufferARB; static glDeleteBuffersARBPROC glDeleteBuffersARB; static glGenBuffersARBPROC glGenBuffersARB; static glIsBufferARBPROC glIsBufferARB; static glBufferDataARBPROC glBufferDataARB; static glBufferSubDataARBPROC glBufferSubDataARB; static glGetBufferSubDataARBPROC glGetBufferSubDataARB; static glMapBufferARBPROC glMapBufferARB; static glUnmapBufferARBPROC glUnmapBufferARB; static glGetBufferParameterivARBPROC glGetBufferParameterivARB; static glGetBufferPointervARBPROC glGetBufferPointervARB; /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBindBufferARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBindBufferARB (JNIEnv * env, jclass clazz, jint target, jint buffer) { glBindBufferARB(target, buffer); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglDeleteBuffersARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglDeleteBuffersARB (JNIEnv * env, jclass clazz, jint n, jobject buffers, jint buffers_offset) { GLuint *buffers_ptr = (GLuint *)env->GetDirectBufferAddress(buffers) + buffers_offset; glDeleteBuffersARB(n, buffers_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGenBuffersARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGenBuffersARB (JNIEnv * env, jclass clazz, jint n, jobject buffers, jint buffers_offset) { GLuint *buffers_ptr = (GLuint *)env->GetDirectBufferAddress(buffers) + buffers_offset; glGenBuffersARB(n, buffers_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glIsBufferARB */ static jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glIsBufferARB (JNIEnv * env, jclass clazz, jint buffer) { GLboolean result = glIsBufferARB(buffer); return result; } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBufferDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB (JNIEnv * env, jclass clazz, jint target, jint size, jobject data, jint data_offset, jint usage) { GLvoid *data_ptr = (GLvoid *)safeGetBufferAddress(env, data, data_offset); glBufferDataARB(target, size, data_ptr, usage); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglBufferSubDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferSubDataARB (JNIEnv * env, jclass clazz, jint target, jint offset, jint size, jobject data, jint data_offset) { GLvoid *data_ptr = (GLvoid *)((GLubyte *)env->GetDirectBufferAddress(data) + data_offset); glBufferSubDataARB(target, offset, size, data_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGetBufferSubDataARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferSubDataARB (JNIEnv * env, jclass clazz, jint target, jint offset, jint size, jobject data, jint data_offset) { GLvoid *data_ptr = (GLvoid *)((GLubyte *)env->GetDirectBufferAddress(data) + data_offset); glGetBufferSubDataARB(target, offset, size, data_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glMapBufferARB */ static jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glMapBufferARB (JNIEnv * env, jclass clazz, jint target, jint access, jint size, jobject oldBuffer) { void *buffer_address = glMapBufferARB((GLenum)target, (GLenum)access); void *old_buffer_address = safeGetBufferAddress(env, oldBuffer, 0); if (old_buffer_address == buffer_address) return oldBuffer; else return safeNewBuffer(env, buffer_address, size); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glUnmapBufferARB */ static jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glUnmapBufferARB (JNIEnv * env, jclass clazz, jint target) { GLboolean result = glUnmapBufferARB(target); return result; } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: nglGetBufferParameterivARB */ static void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferParameterivARB (JNIEnv * env, jclass clazz, jint target, jint pname, jobject params, jint params_offset) { GLint *params_ptr = (GLint *)env->GetDirectBufferAddress(params) + params_offset; glGetBufferParameterivARB(target, pname, params_ptr); } /* * Class: org.lwjgl.opengl.ARBBufferObject * Method: glGetBufferPointerARB */ static jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_glGetBufferPointerARB (JNIEnv * env, jclass clazz, jint target, jint pname, jint size) { void *pointer; glGetBufferPointervARB((GLenum)target, (GLenum)pname, &pointer); return safeNewBuffer(env, pointer, size); } void extgl_InitARBBufferObject(JNIEnv *env, jobject ext_set) { JavaMethodAndExtFunction functions[] = { {"nglBindBufferARB", "(II)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBindBufferARB, "glBindBufferARB", (void**)&glBindBufferARB}, {"nglDeleteBuffersARB", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglDeleteBuffersARB, "glDeleteBuffersARB", (void**)&glDeleteBuffersARB}, {"nglGenBuffersARB", "(ILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGenBuffersARB, "glGenBuffersARB", (void**)&glGenBuffersARB}, {"glIsBufferARB", "(I)Z", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glIsBufferARB, "glIsBufferARB", (void**)&glIsBufferARB}, {"nglBufferDataARB", "(IILjava/nio/Buffer;II)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB, "glBufferDataARB", (void**)&glBufferDataARB}, {"nglBufferSubDataARB", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglBufferSubDataARB, "glBufferSubDataARB", (void**)&glBufferSubDataARB}, {"nglGetBufferSubDataARB", "(IIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferSubDataARB, "glGetBufferSubDataARB", (void**)&glGetBufferSubDataARB}, {"glMapBufferARB", "(IIILjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glMapBufferARB, "glMapBufferARB", (void**)&glMapBufferARB}, {"glUnmapBufferARB", "(I)Z", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glUnmapBufferARB, "glUnmapBufferARB", (void**)&glUnmapBufferARB}, {"nglGetBufferParameterivARB", "(IILjava/nio/IntBuffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferParameterivARB, "glGetBufferParameterivARB", (void**)&glGetBufferParameterivARB}, {"glGetBufferPointerARB", "(III)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_opengl_ARBBufferObject_glGetBufferPointerARB, "glGetBufferPointervARB", (void**)&glGetBufferPointervARB} }; int num_functions = NUMFUNCTIONS(functions); jclass clazz = ext_ResetClass(env, "org/lwjgl/opengl/ARBBufferObject"); extgl_InitializeClass(env, clazz, NULL, "<ARBBufferObject>", num_functions, functions); } Index: Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/arb/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 17 Feb 2004 21:59:09 -0000 1.5 +++ Makefile.am 29 Mar 2004 16:51:29 -0000 1.6 @@ -2,7 +2,8 @@ libarb_la_SOURCES = $(SRC) INCLUDES=-I.. -SRC = org_lwjgl_opengl_ARBProgram.cpp \ +SRC = org_lwjgl_opengl_ARBBufferObject.cpp \ + org_lwjgl_opengl_ARBProgram.cpp \ org_lwjgl_opengl_ARBProgram.cpp \ org_lwjgl_opengl_ARBMatrixPalette.cpp \ org_lwjgl_opengl_ARBMultisample.cpp \ @@ -12,7 +13,6 @@ org_lwjgl_opengl_ARBTextureCompression.cpp \ org_lwjgl_opengl_ARBTransposeMatrix.cpp \ org_lwjgl_opengl_ARBVertexBlend.cpp \ - org_lwjgl_opengl_ARBVertexBufferObject.cpp \ org_lwjgl_opengl_ARBVertexProgram.cpp \ org_lwjgl_opengl_ARBWindowPos.cpp \ org_lwjgl_opengl_ARBOcclusionQuery.cpp \ --- org_lwjgl_opengl_ARBVertexBufferObject.cpp DELETED --- |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 16:59:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28608 Modified Files: extgl.cpp extgl.h Log Message: New extensions and static import modifications Index: extgl.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- extgl.cpp 18 Mar 2004 21:58:02 -0000 1.34 +++ extgl.cpp 29 Mar 2004 16:47:53 -0000 1.35 @@ -545,8 +545,6 @@ } } - extgl_Extensions.GL_ARB_depth_texture = GLQueryExtension(env, ext_set, "GL_ARB_depth_texture"); - extgl_Extensions.GL_ARB_imaging = GLQueryExtension(env, ext_set, "GL_ARB_imaging"); extgl_Extensions.GL_ARB_depth_texture = GLQueryExtension(env, ext_set, "GL_ARB_depth_texture"); extgl_Extensions.GL_ARB_fragment_program = GLQueryExtension(env, ext_set, "GL_ARB_fragment_program"); @@ -582,11 +580,14 @@ extgl_Extensions.GL_EXT_bgra = GLQueryExtension(env, ext_set, "GL_EXT_bgra"); extgl_Extensions.GL_EXT_blend_func_separate = GLQueryExtension(env, ext_set, "GL_EXT_blend_func_separate"); extgl_Extensions.GL_EXT_blend_subtract = GLQueryExtension(env, ext_set, "GL_EXT_blend_subtract"); + extgl_Extensions.GL_EXT_Cg_shader = GLQueryExtension(env, ext_set, "GL_EXT_Cg_shader"); extgl_Extensions.GL_EXT_compiled_vertex_array = GLQueryExtension(env, ext_set, "GL_EXT_compiled_vertex_array"); + extgl_Extensions.GL_EXT_depth_bounds_test = GLQueryExtension(env, ext_set, "GL_EXT_depth_bounds_test"); extgl_Extensions.GL_EXT_draw_range_elements = GLQueryExtension(env, ext_set, "GL_EXT_draw_range_elements"); extgl_Extensions.GL_EXT_fog_coord = GLQueryExtension(env, ext_set, "GL_EXT_fog_coord"); extgl_Extensions.GL_EXT_multi_draw_arrays = GLQueryExtension(env, ext_set, "GL_EXT_multi_draw_arrays"); extgl_Extensions.GL_EXT_packed_pixels = GLQueryExtension(env, ext_set, "GL_EXT_packed_pixels"); + extgl_Extensions.GL_EXT_pixel_buffer_object = GLQueryExtension(env, ext_set, "GL_EXT_pixel_buffer_object"); extgl_Extensions.GL_EXT_point_parameters = GLQueryExtension(env, ext_set, "GL_EXT_point_parameters"); extgl_Extensions.GL_EXT_rescale_normal = GLQueryExtension(env, ext_set, "GL_EXT_rescale_normal"); extgl_Extensions.GL_EXT_secondary_color = GLQueryExtension(env, ext_set, "GL_EXT_secondary_color"); @@ -625,6 +626,7 @@ extgl_Extensions.GL_NV_float_buffer = GLQueryExtension(env, ext_set, "GL_NV_float_buffer"); extgl_Extensions.GL_NV_fog_distance = GLQueryExtension(env, ext_set, "GL_NV_fog_distance"); extgl_Extensions.GL_NV_fragment_program = GLQueryExtension(env, ext_set, "GL_NV_fragment_program"); + extgl_Extensions.GL_NV_fragment_program_option = GLQueryExtension(env, ext_set, "GL_NV_fragment_program_option"); extgl_Extensions.GL_NV_half_float = GLQueryExtension(env, ext_set, "GL_NV_half_float"); extgl_Extensions.GL_NV_light_max_exponent = GLQueryExtension(env, ext_set, "GL_NV_light_max_exponent"); extgl_Extensions.GL_NV_multisample_filter_hint = GLQueryExtension(env, ext_set, "GL_NV_multisample_filter_hint"); @@ -648,10 +650,12 @@ extgl_Extensions.GL_NV_vertex_program = GLQueryExtension(env, ext_set, "GL_NV_vertex_program"); extgl_Extensions.GL_NV_vertex_program1_1 = GLQueryExtension(env, ext_set, "GL_NV_vertex_program1_1"); extgl_Extensions.GL_NV_vertex_program2 = GLQueryExtension(env, ext_set, "GL_NV_vertex_program2"); + extgl_Extensions.GL_NV_vertex_program2_option = GLQueryExtension(env, ext_set, "GL_NV_vertex_program2_option"); } extern bool extgl_InitOpenGL1_1(JNIEnv *env); -//extern void extgl_InitARBFragmentProgram(JNIEnv *env, jobject ext_set); + +extern void extgl_InitARBBufferObject(JNIEnv *env, jobject ext_set); extern void extgl_InitARBImaging(JNIEnv *env, jobject ext_set); extern void extgl_InitARBMatrixPalette(JNIEnv *env, jobject ext_set); extern void extgl_InitARBMultisample(JNIEnv *env, jobject ext_set); @@ -663,13 +667,13 @@ extern void extgl_InitARBTextureCompression(JNIEnv *env, jobject ext_set); extern void extgl_InitARBTransposeMatrix(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexBlend(JNIEnv *env, jobject ext_set); -extern void extgl_InitARBVertexBufferObject(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexProgram(JNIEnv *env, jobject ext_set); extern void extgl_InitARBVertexShader(JNIEnv *env, jobject ext_set); extern void extgl_InitARBWindowPos(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTBlendFuncSeparate(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTCompiledVertexArray(JNIEnv *env, jobject ext_set); +extern void extgl_InitEXTDepthBoundsTest(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTDrawRangeElements(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTFogCoord(JNIEnv *env, jobject ext_set); extern void extgl_InitEXTMultiDrawArrays(JNIEnv *env, jobject ext_set); @@ -722,7 +726,7 @@ //extgl_InitEXTNurbsTesselator(env, ext_set); /* first load the extensions */ - // extgl_InitARBFragmentProgram(env, ext_set); + extgl_InitARBBufferObject(env, ext_set); extgl_InitARBImaging(env, ext_set); extgl_InitARBMatrixPalette(env, ext_set); extgl_InitARBMultisample(env, ext_set); @@ -734,14 +738,13 @@ extgl_InitARBTextureCompression(env, ext_set); extgl_InitARBTransposeMatrix(env, ext_set); extgl_InitARBVertexBlend(env, ext_set); - extgl_InitARBVertexBufferObject(env, ext_set); extgl_InitARBVertexProgram(env, ext_set); extgl_InitARBVertexShader(env, ext_set); extgl_InitARBWindowPos(env, ext_set); extgl_InitEXTBlendFuncSeparate(env, ext_set); extgl_InitEXTCompiledVertexArray(env, ext_set); - //extgl_InitEXTCullVertex(env, ext_set); + extgl_InitEXTDepthBoundsTest(env, ext_set); extgl_InitEXTDrawRangeElements(env, ext_set); extgl_InitEXTFogCoord(env, ext_set); extgl_InitEXTMultiDrawArrays(env, ext_set); @@ -751,7 +754,6 @@ extgl_InitEXTVertexShader(env, ext_set); extgl_InitEXTVertexWeighting(env, ext_set); - //extgl_InitNVElementArray(env, ext_set); extgl_InitNVEvaluators(env, ext_set); extgl_InitNVFence(env, ext_set); extgl_InitNVFragmentProgram(env, ext_set); Index: extgl.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extgl.h,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- extgl.h 18 Mar 2004 21:58:02 -0000 1.35 +++ extgl.h 29 Mar 2004 16:47:53 -0000 1.36 @@ -2088,11 +2088,14 @@ bool GL_EXT_bgra; bool GL_EXT_blend_func_separate; bool GL_EXT_blend_subtract; + bool GL_EXT_Cg_shader; bool GL_EXT_compiled_vertex_array; + bool GL_EXT_depth_bounds_test; bool GL_EXT_draw_range_elements; bool GL_EXT_fog_coord; bool GL_EXT_multi_draw_arrays; bool GL_EXT_packed_pixels; + bool GL_EXT_pixel_buffer_object; bool GL_EXT_point_parameters; bool GL_EXT_rescale_normal; bool GL_EXT_secondary_color; @@ -2131,6 +2134,7 @@ bool GL_NV_float_buffer; bool GL_NV_fog_distance; bool GL_NV_fragment_program; + bool GL_NV_fragment_program_option; bool GL_NV_half_float; bool GL_NV_light_max_exponent; bool GL_NV_multisample_filter_hint; @@ -2154,6 +2158,7 @@ bool GL_NV_vertex_program; bool GL_NV_vertex_program1_1; bool GL_NV_vertex_program2; + bool GL_NV_vertex_program2_option; }; extern struct ExtensionTypes extgl_Extensions; |
|
From: Ioannis T. <sp...@us...> - 2004-03-29 16:57:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28523 Modified Files: Grass.java VBOIndexTest.java VBOTest.java Log Message: New extensions and static import modifications Index: VBOIndexTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOIndexTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- VBOIndexTest.java 26 Mar 2004 21:57:57 -0000 1.16 +++ VBOIndexTest.java 29 Mar 2004 16:46:24 -0000 1.17 @@ -41,39 +41,37 @@ package org.lwjgl.test.opengl; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - import org.lwjgl.Display; import org.lwjgl.DisplayMode; import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.ARBVertexBufferObject; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + public final class VBOIndexTest { + static { try { - //find first display mode that allows us 640*480*16 + //find first display mode that allows us 640*480*16 int mode = -1; DisplayMode[] modes = Display.getAvailableDisplayModes(); - for (int i = 0; i < modes.length; i++) { - if (modes[i].width == 640 - && modes[i].height == 480 - && modes[i].bpp >= 16) { + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].width == 640 + && modes[i].height == 480 + && modes[i].bpp >= 16 ) { mode = i; break; } } - if (mode != -1) { + if ( mode != -1 ) { //select above found displaymode - System.out.println("Setting display mode to "+modes[mode]); + System.out.println("Setting display mode to " + modes[mode]); Display.setDisplayMode(modes[mode]); System.out.println("Created display."); } @@ -81,22 +79,26 @@ System.err.println("Failed to create display due to " + e); } } - - static { - try { - Window.create("LWJGL Game Example", 16, 0, 0,0, 0); - System.out.println("Created OpenGL."); - } catch (Exception e) { - System.err.println("Failed to create OpenGL due to "+e); - System.exit(1); - } - } - - /** Is the game finished? */ - private static boolean finished; - - /** A rotating square! */ - private static float angle; + + static { + try { + Window.create("LWJGL Game Example", 16, 0, 0, 0, 0); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; private static int buffer_id; private static int indices_buffer_id; private static FloatBuffer vertices; @@ -105,134 +107,146 @@ private static IntBuffer indices; private static ByteBuffer mapped_indices_buffer = null; private static IntBuffer mapped_indices_int_buffer = null; - - public static void main(String[] arguments) { - try { - init(); - while (!finished) { - Window.update(); - - if (Window.isMinimized()) - Thread.sleep(200); - else if (Window.isCloseRequested()) - System.exit(0); - - mainLoop(); - render(); - } - } catch (Throwable t) { - t.printStackTrace(); - } finally { - cleanup(); - } - } - - /** - * All calculations are done in here - */ - private static void mainLoop() { - angle += 1f; - if (angle > 360.0f) - angle = 0.0f; - - if (Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0) - System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); - for (int i = 0; i < Mouse.getButtonCount(); i++) - if (Mouse.isButtonDown(i)) - System.out.println("Button " + i + " down"); - if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) - finished = true; - for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { - Keyboard.next(); - if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) - finished = true; - if (Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState()) - System.out.println("Current time: " + Sys.getTime()); - } - } - - /** - * All rendering is done in here - */ - private static void render() { - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - GL11.glPushMatrix(); - GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); - GL11.glRotatef(angle, 0, 0, 1.0f); + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Window.update(); - ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer); - if (new_mapped_buffer != mapped_buffer) - mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); - mapped_buffer = new_mapped_buffer; + if ( Window.isMinimized() ) + Thread.sleep(200); + else if ( Window.isCloseRequested() ) + System.exit(0); - new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 4*4, mapped_indices_buffer); - if (new_mapped_buffer != mapped_indices_buffer) - mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer(); + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } + } - mapped_float_buffer.rewind(); - vertices.rewind(); - mapped_float_buffer.put(vertices); + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; - mapped_indices_int_buffer.rewind(); - indices.rewind(); - mapped_indices_int_buffer.put(indices); - if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) && - ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB)) { - GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0); - } - GL11.glPopMatrix(); - } - - /** - * Initialize - */ - private static void init() throws Exception { - Sys.setTime(0); - Sys.setProcessPriority(Sys.HIGH_PRIORITY); - System.out.println("Timer resolution: " + Sys.getTimerResolution()); - // Go into orthographic projection mode. - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); - if (!GLContext.GL_ARB_vertex_buffer_object) { - System.out.println("ARB VBO not supported!"); - System.exit(1); + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } } - IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); - ARBVertexBufferObject.glGenBuffersARB(int_buffer); - buffer_id = int_buffer.get(0); - indices_buffer_id = int_buffer.get(1); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id); - vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); - vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); - vertices.rewind(); - indices = ByteBuffer.allocateDirect(4*4).order(ByteOrder.nativeOrder()).asIntBuffer(); - indices.put(0).put(1).put(2).put(3); - indices.rewind(); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, 4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); - } - - /** - * Cleanup - */ - private static void cleanup() { - IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); - int_buffer.put(0, buffer_id); - int_buffer.put(1, indices_buffer_id); - ARBVertexBufferObject.glDeleteBuffersARB(int_buffer); - Window.destroy(); - try { - Display.resetDisplayMode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } + + /** + * All rendering is done in here + */ + private static void render() { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + GL11.glPushMatrix(); + GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); + GL11.glRotatef(angle, 0, 0, 1.0f); + + + ByteBuffer new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 2 * 4 * 4, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + + new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 4 * 4, + mapped_indices_buffer); + if ( new_mapped_buffer != mapped_indices_buffer ) + mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer(); + + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + + mapped_indices_int_buffer.rewind(); + indices.rewind(); + mapped_indices_int_buffer.put(indices); + if ( ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) && + ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB) ) { + GL11.glDrawElements(GL11.GL_QUADS, 4, GL11.GL_UNSIGNED_INT, 0); + } + GL11.glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + Sys.setTime(0); + Sys.setProcessPriority(Sys.HIGH_PRIORITY); + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); + if ( !GLContext.GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + ARBBufferObject.glGenBuffersARB(int_buffer); + buffer_id = int_buffer.get(0); + indices_buffer_id = int_buffer.get(1); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + vertices.rewind(); + indices = ByteBuffer.allocateDirect(4 * 4).order(ByteOrder.nativeOrder()).asIntBuffer(); + indices.put(0).put(1).put(2).put(3); + indices.rewind(); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + 2 * 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, + 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); + GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + int_buffer.put(0, buffer_id); + int_buffer.put(1, indices_buffer_id); + ARBBufferObject.glDeleteBuffersARB(int_buffer); + Window.destroy(); + try { + Display.resetDisplayMode(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} Index: Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Grass.java 29 Mar 2004 07:32:37 -0000 1.32 +++ Grass.java 29 Mar 2004 16:46:24 -0000 1.33 @@ -54,10 +54,7 @@ import org.lwjgl.DisplayMode; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.NVVertexProgram; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; public class Grass { @@ -82,7 +79,7 @@ mode = i; break; } - } + } if (mode == -1) { System.out.println("did not find suitable mode"); @@ -140,7 +137,7 @@ public static void main(String[] args) { System.out.println("Vertex program supported: " + GLContext.GL_NV_vertex_program); IntBuffer int_buf = BufferUtils.createIntBuffer(1); - NVVertexProgram.glGenProgramsNV(int_buf); + NVProgram.glGenProgramsNV(int_buf); if (int_buf.get(0) == 0) throw new RuntimeException("Could not allocate new vertex program id!"); @@ -150,7 +147,7 @@ program_buf.order(ByteOrder.nativeOrder()); program_buf.put(program); program_buf.flip(); - NVVertexProgram.glLoadProgramNV( + NVProgram.glLoadProgramNV( NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle, program_buf); @@ -286,7 +283,7 @@ private static void grsDraw() { GL11.glEnable(NVVertexProgram.GL_VERTEX_PROGRAM_NV); - NVVertexProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle); + NVProgram.glBindProgramNV(NVVertexProgram.GL_VERTEX_PROGRAM_NV, program_handle); NVVertexProgram.glTrackMatrixNV( NVVertexProgram.GL_VERTEX_PROGRAM_NV, 0, Index: VBOTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- VBOTest.java 26 Mar 2004 21:57:57 -0000 1.22 +++ VBOTest.java 29 Mar 2004 16:46:24 -0000 1.23 @@ -41,39 +41,37 @@ package org.lwjgl.test.opengl; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; -import java.nio.FloatBuffer; -import java.nio.IntBuffer; - import org.lwjgl.Display; import org.lwjgl.DisplayMode; import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.ARBVertexBufferObject; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.Window; +import org.lwjgl.opengl.*; import org.lwjgl.opengl.glu.GLU; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + public final class VBOTest { + static { try { - //find first display mode that allows us 640*480*16 + //find first display mode that allows us 640*480*16 int mode = -1; DisplayMode[] modes = Display.getAvailableDisplayModes(); - for (int i = 0; i < modes.length; i++) { - if (modes[i].width == 640 - && modes[i].height == 480 - && modes[i].bpp >= 16) { + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].width == 640 + && modes[i].height == 480 + && modes[i].bpp >= 16 ) { mode = i; break; } } - if (mode != -1) { + if ( mode != -1 ) { //select above found displaymode - System.out.println("Setting display mode to "+modes[mode]); + System.out.println("Setting display mode to " + modes[mode]); Display.setDisplayMode(modes[mode]); System.out.println("Created display."); } @@ -81,133 +79,143 @@ System.err.println("Failed to create display due to " + e); } } - - static { - try { - Window.create("LWJGL Game Example", 16, 0, 0,0, 0); - System.out.println("Created OpenGL."); - } catch (Exception e) { - System.err.println("Failed to create OpenGL due to "+e); - System.exit(1); - } - } - - /** Is the game finished? */ - private static boolean finished; - - /** A rotating square! */ - private static float angle; + + static { + try { + Window.create("LWJGL Game Example", 16, 0, 0, 0, 0); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; private static int buffer_id; private static FloatBuffer vertices; private static ByteBuffer mapped_buffer = null; private static FloatBuffer mapped_float_buffer = null; - - public static void main(String[] arguments) { - try { - init(); - while (!finished) { - Window.update(); - - if (Window.isMinimized()) - Thread.sleep(200); - else if (Window.isCloseRequested()) - System.exit(0); - - mainLoop(); - render(); - } - } catch (Throwable t) { - t.printStackTrace(); - } finally { - cleanup(); - } - } - - /** - * All calculations are done in here - */ - private static void mainLoop() { - angle += 1f; - if (angle > 360.0f) - angle = 0.0f; - - if (Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0) - System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); - for (int i = 0; i < Mouse.getButtonCount(); i++) - if (Mouse.isButtonDown(i)) - System.out.println("Button " + i + " down"); - if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) - finished = true; - for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { - Keyboard.next(); - if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) - finished = true; - if (Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState()) - System.out.println("Current time: " + Sys.getTime()); - } - } - - /** - * All rendering is done in here - */ - private static void render() { - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); - GL11.glPushMatrix(); - GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); - GL11.glRotatef(angle, 0, 0, 1.0f); - ByteBuffer new_mapped_buffer = ARBVertexBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, ARBVertexBufferObject.GL_WRITE_ONLY_ARB, 2*4*4, mapped_buffer); - if (new_mapped_buffer != mapped_buffer) - mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); - mapped_buffer = new_mapped_buffer; - mapped_float_buffer.rewind(); - vertices.rewind(); - mapped_float_buffer.put(vertices); - if (ARBVertexBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB)) - GL11.glDrawArrays(GL11.GL_QUADS, 0, 4); - GL11.glPopMatrix(); - } - - /** - * Initialize - */ - private static void init() throws Exception { - Sys.setTime(0); - Sys.setProcessPriority(Sys.HIGH_PRIORITY); - System.out.println("Timer resolution: " + Sys.getTimerResolution()); - // Go into orthographic projection mode. - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); - GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); - if (!GLContext.GL_ARB_vertex_buffer_object) { - System.out.println("ARB VBO not supported!"); - System.exit(1); + + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Window.update(); + + if ( Window.isMinimized() ) + Thread.sleep(200); + else if ( Window.isCloseRequested() ) + System.exit(0); + + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } } - IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); - ARBVertexBufferObject.glGenBuffersARB(int_buffer); - buffer_id = int_buffer.get(0); - ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); - vertices = ByteBuffer.allocateDirect(2*4*4).order(ByteOrder.nativeOrder()).asFloatBuffer(); - vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); - ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 2*4*4, (ByteBuffer)null, ARBVertexBufferObject.GL_STREAM_DRAW_ARB); - GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); - GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); - } - - /** - * Cleanup - */ - private static void cleanup() { - IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); - int_buffer.put(0, buffer_id); - ARBVertexBufferObject.glDeleteBuffersARB(int_buffer); - Window.destroy(); - try { - Display.resetDisplayMode(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } + + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; + + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } + } + + /** + * All rendering is done in here + */ + private static void render() { + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + GL11.glPushMatrix(); + GL11.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); + GL11.glRotatef(angle, 0, 0, 1.0f); + ByteBuffer new_mapped_buffer = ARBBufferObject.glMapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + ARBBufferObject.GL_WRITE_ONLY_ARB, + 2 * 4 * 4, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + if ( ARBBufferObject.glUnmapBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB) ) + GL11.glDrawArrays(GL11.GL_QUADS, 0, 4); + GL11.glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + Sys.setTime(0); + Sys.setProcessPriority(Sys.HIGH_PRIORITY); + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + GL11.glViewport(0, 0, Display.getWidth(), Display.getHeight()); + if ( !GLContext.GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + ARBBufferObject.glGenBuffersARB(int_buffer); + buffer_id = int_buffer.get(0); + ARBBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + ARBBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, + 2 * 4 * 4, + (ByteBuffer)null, + ARBBufferObject.GL_STREAM_DRAW_ARB); + GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); + GL11.glVertexPointer(2, GL11.GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + int_buffer.put(0, buffer_id); + ARBBufferObject.glDeleteBuffersARB(int_buffer); + Window.destroy(); + try { + Display.resetDisplayMode(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} |