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
|
From: Luke H. <lh...@us...> - 2002-11-25 06:36:54
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson16/data In directory sc8-pr-cvs1:/tmp/cvs-serv9576/lesson16/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson16/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:36:31
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson12/data In directory sc8-pr-cvs1:/tmp/cvs-serv9283/lesson12/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson12/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:35:55
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson11/data In directory sc8-pr-cvs1:/tmp/cvs-serv8971/lesson11/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson11/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:35:24
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10/data In directory sc8-pr-cvs1:/tmp/cvs-serv8805/lesson10/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:34:56
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson09/data In directory sc8-pr-cvs1:/tmp/cvs-serv8640/lesson09/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson09/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:34:11
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson08/data In directory sc8-pr-cvs1:/tmp/cvs-serv8451/lesson08/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson08/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:33:10
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson07/data In directory sc8-pr-cvs1:/tmp/cvs-serv8126/lesson07/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson07/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:29:34
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06 In directory sc8-pr-cvs1:/tmp/cvs-serv5852 Removed Files: Texture.class Log Message: --- Texture.class DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Texture.class |
From: Luke H. <lh...@us...> - 2002-11-25 06:28:43
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06 In directory sc8-pr-cvs1:/tmp/cvs-serv5234 Removed Files: Lesson6.class Log Message: Arg... thought my changes to cvsignore where working =) --- Lesson6.class DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Lesson6.class |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06 In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson06 Added Files: Lesson6.class Lesson6.java Texture.class Texture.java Log Message: initial commit --- NEW FILE: Lesson6.class --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Lesson6.class Êþº¾ @F ?¹ ! #$ % ( 2 3 4 5 6 78 9: 7; 7<= @AB fullscreen textureBuf Exceptions [LTexture; SourceFile texImage2D matrixMode shadeModel clearColor clearDepth translatef texCoord2f N-Ç K --- NEW FILE: Lesson6.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Lesson6.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import java.nio.*; import java.io.*; import java.awt.image.BufferedImage; import javax.imageio.*; import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Lesson6.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * Texture Mapping * * Credit goes to Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Lesson6 { private GL gl; private GLU glu; private boolean done = false; private boolean fullscreen = true; private float xrot; private float yrot; private float zrot; IntBuffer textureBuf = createIntBuffer(1); /** Creates a new instance of Lesson */ public Lesson6() { } /* A javafied version of AUX_RGBImageRec *LoadBMP(char*); */ private Texture loadImage(String filename) throws Exception { Texture texture = null; BufferedImage tmpImg = null; /* normally I would use StringUtils.isValid(String) from the jakarta commons lib, but thats beyond the scope of this lesson */ if ((filename != null) && (filename.trim() != "")) { try { InputStream is = getClass().getResourceAsStream(filename); tmpImg = (BufferedImage) ImageIO.read(is); if (tmpImg == null) { throw new Exception("Error: Got null from ImageIO.read()"); } texture = new Texture(tmpImg); } catch ( Exception e ) { throw new Exception("Problem loading bitmap", e); } } else { throw new Exception("Error: file name is not valid!"); } return texture; } /* Load Bitmaps And Convert To Textures */ private void loadGLTextures() throws Exception { /* Create Storage Space For The Texture */ Texture[] textureImage = new Texture[1]; /* Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit */ try { textureImage[0] = loadImage("data/nehe.png"); if (textureImage[0] == null) { throw new Exception("Error: got null from loadBmp()!"); } /* Create The Texture */ gl.genTextures(1, Sys.getDirectBufferAddress(textureBuf)); /* Typical Texture Generation Using Data From The Bitmap */ gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(0)); /* Generate The Texture */ gl.texImage2D(GL.TEXTURE_2D, 0, 3, textureImage[0].getWidth(), textureImage[0].getHeight(), 0, GL.RGB, GL.UNSIGNED_BYTE, textureImage[0].getPtr()); /* Linear Filtering */ gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MIN_FILTER, GL.LINEAR); gl.texParameteri(GL.TEXTURE_2D, GL.TEXTURE_MAG_FILTER, GL.LINEAR); } catch (Exception e) { throw new Exception("Problem loading textures", e); } } private void resizeGLScene(int width, int height) { /* Reset The Current Viewport */ gl.viewport(0, 0, width, height); /* Select The Projection Matrix */ gl.matrixMode(GL.PROJECTION); /* Reset The Projection Matrix */ gl.loadIdentity(); /* Calculate The Aspect Ratio Of The Window */ glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f); /* Select The Modelview Matrix */ gl.matrixMode(GL.MODELVIEW); /* Reset The Modelview Matrix */ gl.loadIdentity(); } private void initGL() throws Exception { /* Jump To Texture Loading Routine */ try { loadGLTextures(); /* Enable Texture Mapping ( NEW ) */ gl.enable(GL.TEXTURE_2D); /* Enables Smooth Shading */ gl.shadeModel(GL.SMOOTH); /* Black Background */ gl.clearColor(0.0f, 0.0f, 0.0f, 0.5f); /* Depth Buffer Setup */ gl.clearDepth(1.0f); /* Enables Depth Testing */ gl.enable(GL.DEPTH_TEST); /* The Type Of Depth Test To Do */ gl.depthFunc(GL.LEQUAL); /* Really Nice Perspective Calculations */ gl.hint(GL.PERSPECTIVE_CORRECTION_HINT, GL.NICEST); } catch (Exception e) { throw new Exception("Problem initialising GL", e); } } private boolean drawGLScene() { /* Clear The Screen And The Depth Buffer */ gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Into The Screen 5 Units */ gl.translatef(0.0f,0.0f,-5.0f); /* Rotate On The X Axis */ gl.rotatef(xrot,1.0f,0.0f,0.0f); /* Rotate On The Y Axis */ gl.rotatef(yrot,0.0f,1.0f,0.0f); /* Rotate On The Z Axis */ gl.rotatef(zrot,0.0f,0.0f,1.0f); /* Select our Texture */ gl.bindTexture(GL.TEXTURE_2D, textureBuf.get(0)); /* build our textured cube */ gl.begin(GL.QUADS); /* Front Face */ /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f); /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f); /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f); /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f); /* Back Face */ /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f); /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f); /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f); /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f); /* Top Face */ /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f); /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f); /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f); /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f); /* Bottom Face */ /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f); /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f); /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f); /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f); /* Right face */ /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, -1.0f); /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, -1.0f); /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f( 1.0f, 1.0f, 1.0f); /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f( 1.0f, -1.0f, 1.0f); /* Left Face */ /* Bottom Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, -1.0f); /* Bottom Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 0.0f); gl.vertex3f(-1.0f, -1.0f, 1.0f); /* Top Right Of The Texture and Quad */ gl.texCoord2f(1.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, 1.0f); /* Top Left Of The Texture and Quad */ gl.texCoord2f(0.0f, 1.0f); gl.vertex3f(-1.0f, 1.0f, -1.0f); gl.end(); /* X Axis Rotation */ xrot+=0.3f; /* Y Axis Rotation */ yrot+=0.2f; /* Z Axis Rotation */ zrot+=0.4f; return true; } public void killGLWindow() { Keyboard.destroy(); gl.destroy(); Display.destroy(); } public void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { Display.create(new DisplayMode(width, height, bits, 60), fullscreenflag); gl = new GL(bits, 0, bits, 8); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising Lesson", e); } } public void start() throws Exception { try { createGLWindow(640, 480, 16, fullscreen); while (!done) { loop(); } killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } private void loop() { drawGLScene(); gl.swapBuffers(); /* Keys that have a toggle effect */ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) { done = true; } } } private IntBuffer createIntBuffer(int size) { ByteBuffer temp = ByteBuffer.allocateDirect(4 * size); temp.order(ByteOrder.nativeOrder()); return temp.asIntBuffer(); } public static void main(String[] arguments) { int err = 0; Lesson6 lesson = new Lesson6(); try { lesson.start(); } catch (Exception e) { err = 1; e.printStackTrace(); } System.exit(err); } } --- NEW FILE: Texture.class --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Texture.class Êþº¾ SourceFile Y,· --- NEW FILE: Texture.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/Texture.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import java.nio.*; import java.awt.image.*; import java.awt.geom.*; import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Texture.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * Just a small container class for holding texture data * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Texture { private ByteBuffer data; private int height; private int width; /** Creates a new instance of Texture */ public Texture(BufferedImage tmpImg) { width = tmpImg.getWidth(); height = tmpImg.getWidth(); /* flip the image, so it displays right * There might be a way to do this differently... */ AffineTransform tx = AffineTransform.getScaleInstance(1, -1); tx.translate(0, -tmpImg.getHeight(null)); AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR); tmpImg = op.filter(tmpImg, null); data = ByteBuffer.allocateDirect(4 * width * height); data.order(ByteOrder.nativeOrder()); data.clear(); byte[] byteData = (byte[])tmpImg.getRaster().getDataElements(0, 0, width, height, null); data.put(byteData); data.flip(); } public int getData() { return data.get(0); } public ByteBuffer getBuffer() { return data; } public int getPtr() { return Sys.getDirectBufferAddress(data); } public int getHeight() { return height; } public int getWidth() { return width; } } |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06/data In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson06/data Added Files: nehe.png Log Message: initial commit --- NEW FILE: nehe.png --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson06/data/nehe.png PNG FÁH ÜFÚuzþr 03ð+2°òQj¥]A9A+àKaøL²¿þ|c¸¿áÇ{äËÂÇÀ! àÍÀÌÊ8j~ÞdPú÷dÎÝõ?ßbËKà è$PSQ@sþÿcxuª 9 OAr ( aÓÖÕ ` ¨2qÆÄ @ 7` +½ýþâ(ÃîwlúT¢ij@ õ Ø"bæ¡Ü< báqlá³ ÔTÀÖâQÅ+0Uª`{Ä20¨E2ølå Pm&ÓzxP²Àmpµ¼ùxºøØ³(L #Î~Ð|Ìpp^ÈðéÃ[KAgÔaÛÀ<ó÷´A&Äï¯ &¨1ïdXmÊðó#u?¨µÖáL-õ÷ÊÕfÀèÀ å¿°D,Çú¹èÇ;°c òò³#Ð: ^"º`bÆÎ¦ ȱXß_L»:ÔMzMPáåiV#dÍ.:Gu (Ó{rî\ ݤ'Ê¡µ<ºÎà çÎ*PëµÜ`aøñ ÔVà°)6Ô½í@sØxièÎôñP@ |ð£ã^M0wîþ|:ß÷ãP>fàÛmuý¡ã3«P] Úû1 ö]´HOÆÕ d,Þ_gxz æàæâ ¿?°ÿðò¤î5ä<¬ ! ½/NAÏïÙËÊ ò2ÐÒXWýÏðx?ÿ￿/\$w½,Uß_A d 6¤Ýýò~1üýÆð`3¨MûûÃ È Ô cD)þInÿÀ ØÏÑJ·ÈBô%ÀF¢¨Þ»:Ë-) Ùô±H)KÝÅ¿_qæX`+j``ìpú÷ ;~â[7Æ#°ÂWÄ}s1=üÇW@f ~ h û¿¼½¤´âͽB[ðCdYøí%¨ÂÄ^qC*Ц[V, sá°pýOÕ ¬¦RÀ¦ÿÛ¤µ»! ôbéÜÕÇÚË ²3 j7z°É«J.@ðáýÛú8»Îؼð6çXk'6üÛM(9Ñ {öÆz96$!Rww2hØà7xò/ú h *ì¼-Ò,ý]-"çºõhÀ®Ýfåa`Ó ÄA\@ðö*h$ H&êßÑ;0éû/öÑ3zúØüû¼| s4#tY.9ÍoðMÝìaÍTÐNTÝ ©5Á+X~BWÆÒºQÁ4øFÀ² 4YƯ^é#~-¾½áÛS¢=ÇLÛ^Z-s/à-ç%Ðv / 1ÃàÈDAyOÓøUî`;|næ3{ë¨úá}©¿?ÈM#àÁÛZtøAå¾#ñÝA`íôõÃM Ã-_@O÷Hn¯Óµá÷|¡ªC@AÌ4ðûh¾½ÝDx{öeÞ´Ì< ³gö&lwpT møõÔX'~i1ÑÿéõwÇaé)2»t¿°×|ò >È®î) ÌZ|{´ªò ò ðëS#ñÎ@Xñ¥Üa":·0²àHýÿÿUK7 ïy Zùú5»Zà;4«Bð{M^ânç0·¤|~ÀÀÀFz`¢BßõÿØd<sRÀD,¬¸$ÉíÏwȯ1@g ý!xÊ,Ôü??@±~¾¥þÛ«À]:Î ~%Ðɪd 4Îbõ7 nUDz )UXÀ>®Ø $ÌȪgåõF>Þ"Ã¥Jï$&müo^E4hÛØ×zu´ëp< gÙÀBñõÝ2¢4¥@sÀä6ÿ£Yظ"/ð©zºÂÚ þ̽U¯¨¿ p8ëÎ I+Ð)Þ ·00Ðl+Ãk óS?Ýuh½% À®áW¤dahdz %ýë#ó @%Ñv. pÙÏW Ãú´ÓA']þzºv¦àó}Ï EüÊ [øÕAM½;«@-h PL q"°© ºBpË! SA×jàÀ\ùÉ¿¨º¿ tS áîMðÛÞëú!µÍ¿dö}ÑÁõó(ÊÐn*@%ÑK§ª rϰPÝyñá=º¨Ý@ñúxøf`Ïä?xîÀ²Z /üÁu#øügÈqþÀR X Z¼ f@®C ú`3xE 4vê>~à`øpÔ,æS ´ ´è5;(01ÂÀ ,r~3¼9ð;\!0èffÙxA§}~ ,Ð(!sÂÛ+ - ËcÁ`hEçoè©>äi¬b`lEfµýv¸x[#ÙWû0ï»qb¸v{°e ²nÈl Õ(Ð3b,~MqÜZÔ¹Èð\di}ͯ#ZeÀøM µ4ÀìÍ- >¼J÷É_ÿÀu hmÏOPûù1¸Ô˧^>?tgsÀÇO2ù:¸\f6ïÌÿxäAÐõ3ìÍÓñTK¨ûðT1p Núú£ 0?pIê/Ym)fÇpÒ+0ÿüÿja~zÊpw xQh Ð1ÀP ,}¹ÍÏ= J¼ÚØûòT*Ñó®H¢@ céÄÇ ÚÌÆ*¼A·1á«F@Åí7Pò½½q9)0¹³ò&àÙ@ EP%ÛHct½Òg{@iqï3¨:ÌÀÊ ç¼/ÄÈeÀìl×Ý^1H·GêN Ñd6x°N¸µ|J)?hâ²!çÐç?ÐÍÃm ¦6reLÐÀJïÖRÐi\rîõÿÕ$v ûz8î_97R¿¼'á»÷@={lîd 4 ~v!P Ö&f²Ê~!P\p2°ò1°p20± Ú?ÿÿ ¥~hsÒ4e \kíÑ<@j=l÷|ôáBV.cP°bøÄjJú ÀFì°Í BGáì2DêWÔÈýûç?$õZ;)H!ÄÈâÿÿB lðûP±ZE"Ïdäõç Jî£É`uÏA´8 ©H2<À²î99¹xÙ9ØØ 3ÿÀZ¬'Rãóô2P4Î!ç 4 åWåaü3¼áOO¦þjæ+·Âÿ4B= B¸Ãtù Ãjzr§õ¿;çàÙXpB@Pª]+ d§BÊ`Wæ¢-pIàÚ¯ÜÑlQÊ]ºõÏPÂS ½° 0jí8 AÔÞ¯£( :J ' xÎé¥ÝÚôæÞs¾{Îwþþm ÊÏu¬ïadÕY¼5bdT½nÅPþ>|ÁÁO$>Fq¹ÐLz&û²(üóªÉ¯¡¤té¹a'¬FSþÍïκ×âþ#ëø@,Ķ6A2+3Üj¾*Àö"38 ol¸H$±[?}øýóõoP]t0Ç n¼¿¾s½ûý9júßeÐ5`ÙÿîÕ¯++¯¢Ì {ÁÀ§ ¬ y@8 êíÔyêAgÃ~-¸AÙ Zuðò[\l |Éðõ9Ã×߸¯~}úØ6ðïÃx LdBl¢âlâRì2_w¢;^ÓÅñàqNF`LãA« îø+ÅØ ÅÙDIùéýolÌ Äì¼ Dì°úl ,ñVü/cç`h¹¶òTX1³Cô Ù Ç1þ<rõçOð8ÉwhèÇ;ÖÏÀ\ª>H¢!HÕ¨ì a|:q OjEÙ~íÃYçÅñL VFf.na.¸m}j ¾ûÏptÇ«3\:ê¢)ÍJ æ)05¬{¥Öcæc9ó;°Í ÷¯KhH̳Âä[Kø ¬!å:ÃÉ(X£-îx&V&LÇ»éBâËÊUôÀÙ6èØÃÁ@tPíaï#±Ò~³¹fYY,]E¯>ÂéèóèGpñÄÄZËGTÚ¨õ(í}GÄ(@ ©þùóï·/|ûóõóãÚb`emÙ»ÔFú!ýª@ÏOß ì 1Ô.%???0 °~}Û/ GÇwÁ&øÁåïOèL< VðP:0ÏÔoú 8g Ì´(QËl7êyùXÙ 8 MúþMESv¤W©±áíÀ@©<ÆÎH$ܼ,ÜÀ¸/sXuñ8þãÛ_ >\ù~X( ²æÁl Dàâ}ÀòX{£B>ÐÅxOòð± + öv;úuüóÅÿÁãÔÀ*Ád>DlûÜGAHu}>xËXíðò³7b ï]ûrþþÔ-%ú^K Âè¼Ã¡UÏeý^ Í{jQçU§ ¤YyúØ ¤F®@`aJðdÉì_àï?à ,Ð5°püý`cà°ûû<Ì-,òuÿâhKXÇʼ}ùÙî:X¿²¿ØÒvØ9YØÀ£ïàÊá?Ä !¿@¸½ôû¿ZÞÐÎÚ53J ØvÙÌY^ÿÚ^ºì@Éé+ËÏ; À¶ 8e3`Ö¨ÍP¯ ÜDëCLþj CFÃ@éï¸Kóë¼7Òûsð)\AC7ÿÿwÛÿýHjÿNUbbv 5'hÄ$d9ádxô/ÖiF´n >Uïç/qsÆ2 õ xÞ½à1bBöXþgúÃðÇH J r3!)Õ»L Ý Ë >9 CãßÓyùXÙÅ Ïïÿúû lMáløï"'á ô j0ÔóxuÃÝ¥Û£¡¡l¼%v4èúN^V`BüÎôÒf7{þÃ0?ð¾ñ¬í]ðÐLÜÂÆ~ýøWbeDNÓë. ©b9ìûWÃrè~»Ì,Þÿ¡C%jùe·ê¡»¿Îsÿj½NÔ ñ¸¹Æ6 ÈëeÓ·ÞþµB#-¾eAÞZåÛL%¿@sFLð¸9ya¶ aKÓ¦ ?8w6'!»ÿxVXvZ;õZe¢ì:ê¬âºË@ôåãoVØNë¾Çö]$áp¼5ã]W¢8þ÷÷¿Ðóóèûоdè è´÷oÝ´;¬9ýr/`ï ²²î.ÇväËÖj&³© J¨]ÕÝá {_ÌmCìH䲿üõó/¤F.zÁóÖÐ/øØ3ø(8´mÆ+$0¢®öÀ:âÄÈrÀRd)êÐmZ¼ðGÞ¿þÉ^ &(Â:ºòôÉÆ#?¿ÿÚÅÃÏ:Ê:ølWb´ÕþCÖØ¥â cY½se âÐ ÷¯óèW ögðÏë_bÒ (;Ñ,ØÚD,×h=t<h2Y áëSØÀ'l\1s0|caàçDÍÛÿ@[&Àõ°6cCØøúy&¼#ç6K yÜÍ/~ñìÇ?E=-µÅ°eÐü[Ijë¯l¤~äQP2µnÖ~·q ¨µðóïÏ(]ÆàÃþFÊeêpÂúöÄEê+C&bþ í_þÊì.G÷úî"+þøî×ûW?M{øÎ´^Çg\/)í{Ï:AdãØï÷´ÛL°Y§<>Ï1¼øÎðéÃïH3©HýèuIßAõÀï/¾ÿ÷ãÃá0@ =u`xÞÝv÷Fµ-Jê·_Z :Cî)èþÂo/ èÝWC/ã×xëøµXD(Ͻûòzx&°T¶, )Zó?AsM`ðöÖWPKW¶7§_#&!ë ×Õþ *5Pvs²Êwèq`Èý]°áL,(m·/÷ Z_l±[-¬Ò³÷¨èðÂ*h>¦ã V @¢_Ç á)xîb/èÈ=^EÁÄ¿`³?Áð/#è8&` ´7åë©ËWª0ÖÏð91Ø0¼ù jëK:` Ì11±:fdx)Éà¼1%¬2Iq¼Ã÷ ¼,L¿¿Ïà] ¹d A'Ú8XǨÕÝ´ Tr²ÖþÉßðÜúDöø5@ +>øu @g0¢äún ÂPÇ%ð×B{+à}¬¬¼àY¼x0jÜfþÄS¤zð^ÂÌ·üßß ®å.(j~ÎOÎKÙ|ö|O¦AÕkÙl»7¢ÿNH s%k¯$\fb ÖÜFNäÇäéà;ù£³Ý§¼OÛ3Ô³ÀGâ|öÀá~ù->ÞîiíáòØ¢Keí£ô¤úwÖòl¡XV&J(âP: Nf0OÕoxß|Ú 2x-,áò%úpE(é%ødlfü<B-MBëñÿ9ßÝ íìva(#(ÄÇ2¾°eÈÐsº2zÃ!dc]ÛÑö[h |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson05 In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson05 Added Files: Lesson5.java Log Message: initial commit --- NEW FILE: Lesson5.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson05/Lesson5.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Lesson5.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * 3D Shapes * * Credit goes to Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Lesson5 { private GL gl; private GLU glu; private boolean done = false; private boolean fullscreen = true; /* Angle For The Triangle */ float rtri; /* Angle For The Quad */ float rquad; /** Creates a new instance of Lesson */ public Lesson5() { } private void resizeGLScene(int width, int height) { /* Reset The Current Viewport */ gl.viewport(0, 0, width, height); /* Select The Projection Matrix */ gl.matrixMode(GL.PROJECTION); /* Reset The Projection Matrix */ gl.loadIdentity(); /* Calculate The Aspect Ratio Of The Window */ glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f); /* Select The Modelview Matrix */ gl.matrixMode(GL.MODELVIEW); /* Reset The Modelview Matrix */ gl.loadIdentity(); } private boolean initGL() { /* Enables Smooth Shading */ gl.shadeModel(GL.SMOOTH); /* Black Background */ gl.clearColor(0.0f, 0.0f, 0.0f, 0.0f); /* Depth Buffer Setup */ gl.clearDepth(1.0f); /* Enables Depth Testing */ gl.enable(GL.DEPTH_TEST); /* The Type Of Depth Test To Do */ gl.depthFunc(GL.LEQUAL); /* Really Nice Perspective Calculations */ gl.hint(GL.PERSPECTIVE_CORRECTION_HINT, GL.NICEST); return true; } private boolean drawGLScene() { /* Clear The Screen And The Depth Buffer */ gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Left 1.5 Units And Into The Screen 6.0 */ gl.translatef(-1.5f,0.0f,-6.0f); /* Rotate The Triangle On The Y axis */ gl.rotatef(rtri,0.0f,1.0f,0.0f); /* Draw A Colored Pyramid */ gl.begin(GL.TRIANGLES); /* Front Face */ /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f(-1.0f,-1.0f, 1.0f); /* Bottom Right - blue */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f( 1.0f,-1.0f, 1.0f); /* Right Face */ /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f( 1.0f,-1.0f, 1.0f); /* Bottom Right - blue */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f(1.0f,-1.0f, -1.0f); /* Back Face */ /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f( 1.0f,-1.0f, -1.0f); /* Bottom Right - blue */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f(-1.0f,-1.0f, -1.0f); /* Left Face */ /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f(-1.0f,-1.0f,-1.0f); /* Bottom Right - blue */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f(-1.0f,-1.0f, 1.0f); gl.end(); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Right 3 Units */ gl.translatef(1.5f,0.0f,-7.0f); /* Rotate The Quad On The X axis */ gl.rotatef(rquad,1.0f,1.0f,1.0f); /* Draw Colored Cube */ gl.begin(GL.QUADS); /* top Face - green */ gl.color3f(0.0f,1.0f,0.0f); /* Top Left */ gl.vertex3f( 1.0f, 1.0f, -1.0f); /* Top Right */ gl.vertex3f( -1.0f, 1.0f, -1.0f); /* Bottom Right */ gl.vertex3f( -1.0f, 1.0f, 1.0f); /* Bottom Left */ gl.vertex3f( 1.0f, 1.0f, 1.0f); /* bottom Face - orange */ gl.color3f(1.0f,0.5f,0.0f); /* Top Left */ gl.vertex3f( 1.0f,-1.0f, 1.0f); /* Top Right */ gl.vertex3f(-1.0f,-1.0f, 1.0f); /* Bottom Right */ gl.vertex3f(-1.0f,-1.0f,-1.0f); /* Bottom Left */ gl.vertex3f( 1.0f,-1.0f,-1.0f); /* front Face - red */ gl.color3f(1.0f,0.0f,0.0f); /* Top Left */ gl.vertex3f( 1.0f, 1.0f, 1.0f); /* Top Right */ gl.vertex3f(-1.0f, 1.0f, 1.0f); /* Bottom Right */ gl.vertex3f(-1.0f,-1.0f, 1.0f); /* Bottom Left */ gl.vertex3f( 1.0f,-1.0f, 1.0f); /* back Face - yellow */ gl.color3f(1.0f,1.0f,0.0f); /* Top Left */ gl.vertex3f( 1.0f,-1.0f,-1.0f); /* Top Right */ gl.vertex3f(-1.0f,-1.0f,-1.0f); /* Bottom Right */ gl.vertex3f(-1.0f, 1.0f,-1.0f); /* Bottom Left */ gl.vertex3f( 1.0f, 1.0f,-1.0f); /* left Face - blue */ gl.color3f(0.0f,0.0f,1.0f); /* Top Left */ gl.vertex3f(-1.0f, 1.0f, 1.0f); /* Top Right */ gl.vertex3f(-1.0f, 1.0f,-1.0f); /* Bottom Right */ gl.vertex3f(-1.0f,-1.0f,-1.0f); /* Bottom Left */ gl.vertex3f(-1.0f,-1.0f, 1.0f); /* right Face - violet */ gl.color3f(1.0f,0.0f,1.0f); /* Top Left */ gl.vertex3f( 1.0f, 1.0f,-1.0f); /* Top Right */ gl.vertex3f( 1.0f, 1.0f, 1.0f); /* Bottom Right */ gl.vertex3f( 1.0f,-1.0f, 1.0f); /* Bottom Left */ gl.vertex3f( 1.0f,-1.0f,-1.0f); gl.end(); /* Increase The Rotation Variable For The Triangle */ rtri+=0.2f; // (new) /* Decrease The Rotation Variable For The Quad */ rquad-=0.15f; // (new) return true; } public void killGLWindow() { Keyboard.destroy(); gl.destroy(); Display.destroy(); } public void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { Display.create(new DisplayMode(width, height, bits, 60), fullscreenflag); gl = new GL(bits, 0, bits, 8); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising Lesson", e); } } public void start() throws Exception { try { createGLWindow(640, 480, 16, fullscreen); while (!done) { loop(); } killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } private void loop() { drawGLScene(); gl.swapBuffers(); /* Keys that have a toggle effect */ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) { done = true; } } } public static void main(String[] arguments) { int err = 0; Lesson5 lesson = new Lesson5(); try { lesson.start(); } catch (Exception e) { err = 1; e.printStackTrace(); } System.exit(err); } } |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson03 In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson03 Added Files: Lesson3.java Log Message: initial commit --- NEW FILE: Lesson3.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson03/Lesson3.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Lesson3.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * Adding Color * * Credit goes to Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Lesson3 { private GL gl; private GLU glu; private boolean done = false; private boolean fullscreen = true; /** Creates a new instance of Lesson */ public Lesson3() { } private void resizeGLScene(int width, int height) { /* Reset The Current Viewport */ gl.viewport(0, 0, width, height); /* Select The Projection Matrix */ gl.matrixMode(GL.PROJECTION); /* Reset The Projection Matrix */ gl.loadIdentity(); /* Calculate The Aspect Ratio Of The Window */ glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f); /* Select The Modelview Matrix */ gl.matrixMode(GL.MODELVIEW); /* Reset The Modelview Matrix */ gl.loadIdentity(); } private boolean initGL() { /* Enables Smooth Shading */ gl.shadeModel(GL.SMOOTH); /* Black Background */ gl.clearColor(0.0f, 0.0f, 0.0f, 0.0f); /* Depth Buffer Setup */ gl.clearDepth(1.0f); /* Enables Depth Testing */ gl.enable(GL.DEPTH_TEST); /* The Type Of Depth Test To Do */ gl.depthFunc(GL.LEQUAL); /* Really Nice Perspective Calculations */ gl.hint(GL.PERSPECTIVE_CORRECTION_HINT, GL.NICEST); return true; } private boolean drawGLScene() { /* Clear The Screen And The Depth Buffer */ gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Left 1.5 Units And Into The Screen 6.0 */ gl.translatef(-1.5f,0.0f,-6.0f); /* Draw A Colored Triangle */ gl.begin(GL.TRIANGLES); /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Right - blue */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f( 1.0f,-1.0f, 0.0f); gl.end(); /* Move Right 3 Units */ gl.translatef(3.0f,0.0f,0.0f); /* Draw A Blue Quad*/ gl.color3f(0.5f,0.5f,1.0f); gl.begin(GL.QUADS); /* Top Left */ gl.vertex3f(-1.0f, 1.0f, 0.0f); /* Top Right */ gl.vertex3f( 1.0f, 1.0f, 0.0f); /* Bottom Right */ gl.vertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Left */ gl.vertex3f(-1.0f,-1.0f, 0.0f); gl.end(); return true; } public void killGLWindow() { Keyboard.destroy(); gl.destroy(); Display.destroy(); } public void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { Display.create(new DisplayMode(width, height, bits, 60), fullscreenflag); gl = new GL(bits, 0, bits, 8); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising Lesson", e); } } public void start() throws Exception { try { createGLWindow(640, 480, 16, fullscreen); while (!done) { loop(); } killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } private void loop() { drawGLScene(); gl.swapBuffers(); /* Keys that have a toggle effect */ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) { done = true; } } } public static void main(String[] arguments) { int err = 0; Lesson3 lesson = new Lesson3(); try { lesson.start(); } catch (Exception e) { err = 1; e.printStackTrace(); } System.exit(err); } } |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson04 In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson04 Added Files: Lesson4.java Log Message: initial commit --- NEW FILE: Lesson4.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson04/Lesson4.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Lesson4.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * Rotation * * Credit goes to Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Lesson4 { private GL gl; private GLU glu; private boolean done = false; private boolean fullscreen = true; /* Angle For The Triangle */ float rtri; // (new) /* Angle For The Quad */ float rquad; // (new) /** Creates a new instance of Lesson */ public Lesson4(){ } private void resizeGLScene(int width, int height) { /* Reset The Current Viewport */ gl.viewport(0, 0, width, height); /* Select The Projection Matrix */ gl.matrixMode(GL.PROJECTION); /* Reset The Projection Matrix */ gl.loadIdentity(); /* Calculate The Aspect Ratio Of The Window */ glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f); /* Select The Modelview Matrix */ gl.matrixMode(GL.MODELVIEW); /* Reset The Modelview Matrix */ gl.loadIdentity(); } private boolean initGL() { /* Enables Smooth Shading */ gl.shadeModel(GL.SMOOTH); /* Black Background */ gl.clearColor(0.0f, 0.0f, 0.0f, 0.0f); /* Depth Buffer Setup */ gl.clearDepth(1.0f); /* Enables Depth Testing */ gl.enable(GL.DEPTH_TEST); /* The Type Of Depth Test To Do */ gl.depthFunc(GL.LEQUAL); /* Really Nice Perspective Calculations */ gl.hint(GL.PERSPECTIVE_CORRECTION_HINT, GL.NICEST); return true; } private boolean drawGLScene() { /* Clear The Screen And The Depth Buffer */ gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Left 1.5 Units And Into The Screen 6.0 */ gl.translatef(-1.5f,0.0f,-6.0f); /* Rotate The Triangle On The Y axis */ gl.rotatef(rtri,0.0f,1.0f,0.0f); // (new) /* Draw A Colored Triangle */ gl.begin(GL.TRIANGLES); /* Top - red */ gl.color3f(1.0f,0.0f,0.0f); gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left - green */ gl.color3f(0.0f,1.0f,0.0f); gl.vertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Right - blue */ gl.color3f(0.0f,0.0f,1.0f); gl.vertex3f( 1.0f,-1.0f, 0.0f); gl.end(); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Right 3 Units */ gl.translatef(1.5f,0.0f,-6.0f); /* Rotate The Quad On The X axis */ gl.rotatef(rquad,1.0f,0.0f,0.0f); // (new) /* Draw A Blue Quad*/ gl.color3f(0.5f,0.5f,1.0f); gl.begin(GL.QUADS); /* Top Left */ gl.vertex3f(-1.0f, 1.0f, 0.0f); /* Top Right */ gl.vertex3f( 1.0f, 1.0f, 0.0f); /* Bottom Right */ gl.vertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Left */ gl.vertex3f(-1.0f,-1.0f, 0.0f); gl.end(); /* Increase The Rotation Variable For The Triangle */ rtri+=0.2f; // (new) /* Decrease The Rotation Variable For The Quad */ rquad-=0.15f; // (new) return true; } public void killGLWindow() { Keyboard.destroy(); gl.destroy(); Display.destroy(); } public void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { Display.create(new DisplayMode(width, height, bits, 60), fullscreenflag); gl = new GL(bits, 0, bits, 8); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising Lesson", e); } } public void start() throws Exception { try { createGLWindow(640, 480, 16, fullscreen); while (!done) { loop(); } killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } private void loop() { drawGLScene(); gl.swapBuffers(); /* Keys that have a toggle effect */ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) { done = true; } } } public static void main(String[] arguments) { int err = 0; Lesson4 lesson = new Lesson4(); try { lesson.start(); } catch (Exception e) { err = 1; e.printStackTrace(); } System.exit(err); } } |
From: Luke H. <lh...@us...> - 2002-11-25 06:24:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson02 In directory sc8-pr-cvs1:/tmp/cvs-serv2578/nehe/lesson02 Added Files: Lesson2.java Log Message: initial commit --- NEW FILE: Lesson2.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/examples/nehe/lesson02/Lesson2.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * 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. */ import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; /** * $Id: Lesson2.java,v 1.1 2002/11/25 06:24:09 lholden Exp $ * * Your First Polygon * * Credit goes to Jeff Molofee (NeHe) whos tutorial this is based on * * @author Luke Holden * @version $Revision: 1.1 $ */ public class Lesson2 { private GL gl; private GLU glu; private boolean done = false; private boolean fullscreen = true; /** Creates a new instance of Lesson */ public Lesson2(){ } private void resizeGLScene(int width, int height) { /* Reset The Current Viewport */ gl.viewport(0, 0, width, height); /* Select The Projection Matrix */ gl.matrixMode(GL.PROJECTION); /* Reset The Projection Matrix */ gl.loadIdentity(); /* Calculate The Aspect Ratio Of The Window */ glu.perspective(45.0f, ((float) Display.getWidth()) / ((float) Display.getHeight()), 0.1f, 100.0f); /* Select The Modelview Matrix */ gl.matrixMode(GL.MODELVIEW); /* Reset The Modelview Matrix */ gl.loadIdentity(); } private boolean initGL() { /* Enables Smooth Shading */ gl.shadeModel(GL.SMOOTH); /* Black Background */ gl.clearColor(0.0f, 0.0f, 0.0f, 0.0f); /* Depth Buffer Setup */ gl.clearDepth(1.0f); /* Enables Depth Testing */ gl.enable(GL.DEPTH_TEST); /* The Type Of Depth Test To Do */ gl.depthFunc(GL.LEQUAL); /* Really Nice Perspective Calculations */ gl.hint(GL.PERSPECTIVE_CORRECTION_HINT, GL.NICEST); return true; } private boolean drawGLScene() { /* Clear The Screen And The Depth Buffer */ gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); /* Reset The Current Modelview Matrix */ gl.loadIdentity(); /* Move Left 1.5 Units And Into The Screen 6.0 */ gl.translatef(-1.5f,0.0f,-6.0f); /* Drawing Using Triangles */ gl.begin(GL.TRIANGLES); /* Top */ gl.vertex3f( 0.0f, 1.0f, 0.0f); /* Bottom Left */ gl.vertex3f(-1.0f,-1.0f, 0.0f); /* Bottom Right */ gl.vertex3f( 1.0f,-1.0f, 0.0f); gl.end(); /* Move Right 3 Units */ gl.translatef(3.0f,0.0f,0.0f); /* Draw A Quad */ gl.begin(GL.QUADS); /* Top Left */ gl.vertex3f(-1.0f, 1.0f, 0.0f); /* Top Right */ gl.vertex3f( 1.0f, 1.0f, 0.0f); /* Bottom Right */ gl.vertex3f( 1.0f,-1.0f, 0.0f); /* Bottom Left */ gl.vertex3f(-1.0f,-1.0f, 0.0f); gl.end(); return true; } public void killGLWindow() { Keyboard.destroy(); gl.destroy(); Display.destroy(); } public void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { Display.create(new DisplayMode(width, height, bits, 60), fullscreenflag); gl = new GL(bits, 0, bits, 8); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising Lesson", e); } } public void start() throws Exception { try { createGLWindow(640, 480, 16, fullscreen); while (!done) { loop(); } killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } private void loop() { drawGLScene(); gl.swapBuffers(); /* Keys that have a toggle effect */ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) { done = true; } } } public static void main(String[] arguments) { int err = 0; Lesson2 lesson = new Lesson2(); try { lesson.start(); } catch (Exception e) { err = 1; e.printStackTrace(); } System.exit(err); } } |
From: Luke H. <lh...@us...> - 2002-11-25 06:22:43
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06/data In directory sc8-pr-cvs1:/tmp/cvs-serv2062/data Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06/data added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson12 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson12 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson12 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson16 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson16 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson16 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson17 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson17 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson17 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson06 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson06 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson09 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson09 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson09 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson08 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson08 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson08 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson04 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson04 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson04 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:13
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson10 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson10 added to the repository |
From: Luke H. <lh...@us...> - 2002-11-25 06:15:12
|
Update of /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson05 In directory sc8-pr-cvs1:/tmp/cvs-serv30048/lesson05 Log Message: Directory /cvsroot/java-game-lib/LWJGL/examples/nehe/lesson05 added to the repository |