You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
|
2
(9) |
3
|
4
(1) |
5
(12) |
6
(5) |
7
|
8
|
9
|
10
(2) |
11
|
12
|
13
|
14
|
15
(1) |
16
(6) |
17
(5) |
18
(8) |
19
|
20
(12) |
21
|
22
|
23
(1) |
24
(1) |
25
|
26
(19) |
27
(1) |
28
(13) |
29
(8) |
30
|
31
|
|
|
From: Elias N. <eli...@us...> - 2003-07-29 12:39:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv27587/src/java/org/lwjgl/test/opengl Modified Files: VBOTest.java Log Message: Index: VBOTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- VBOTest.java 29 Jul 2003 12:30:04 -0000 1.1 +++ VBOTest.java 29 Jul 2003 12:39:50 -0000 1.2 @@ -160,12 +160,6 @@ mapped_float_buffer.put(vertices); if (GL.glUnmapBufferARB(GL.GL_ARRAY_BUFFER_ARB)) GL.glDrawArrays(GL.GL_QUADS, 0, 4); -/* GL.glBegin(GL.GL_QUADS); - GL.glVertex2i(-50, -50); - GL.glVertex2i(50, -50); - GL.glVertex2i(50, 50); - GL.glVertex2i(-50, 50); - GL.glEnd();*/ GL.glPopMatrix(); } @@ -197,7 +191,7 @@ GL.glBindBufferARB(GL.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); - GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, vertices/*Sys.NULL*/, GL.GL_STREAM_DRAW_ARB); + GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, Sys.NULL, GL.GL_STREAM_DRAW_ARB); ByteBuffer index_buffer = Sys.createIndexBuffer(0); GL.glEnableClientState(GL.GL_VERTEX_ARRAY); GL.glVertexPointer(2, GL.GL_FLOAT, 0, index_buffer); |
From: Elias N. <eli...@us...> - 2003-07-29 12:30:07
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv25475/src/java/org/lwjgl/test/opengl Added Files: VBOTest.java Log Message: Added VBOTest --- NEW FILE: VBOTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/VBOTest.java /* * Copyright (c) 2002 Lightweight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: VBOTest.java,v 1.1 2003/07/29 12:30:04 elias_naur Exp $ * * Simple java test program. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ package org.lwjgl.test.opengl; import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; import java.nio.*; public final class VBOTest { static { try { //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) { mode = i; break; } } if (mode != -1) { //select above found displaymode System.out.println("Setting display mode to "+modes[mode]); Display.setDisplayMode(modes[mode]); System.out.println("Created display."); } } catch (Exception e) { System.err.println("Failed to create display due to " + e); } } public static final GLWindow gl = new GLWindow("LWJGL Game Example", 16, 0, 0,0); static { try { gl.create(); 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) { gl.tick(); if (gl.isMinimized()) Thread.sleep(200); else if (gl.isCloseRequested()) System.exit(0); Keyboard.poll(); mainLoop(); render(); gl.paint(); } } 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; Mouse.poll(); if (Mouse.dx != 0 || Mouse.dy != 0 || Mouse.dwheel != 0) System.out.println("Mouse moved " + Mouse.dx + " " + Mouse.dy + " " + Mouse.dwheel); for (int i = 0; i < Mouse.buttonCount; i++) if (Mouse.isButtonDown(i)) System.out.println("Button " + i + " down"); /* Keyboard.poll(); if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) finished = true;*/ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) finished = true; if (Keyboard.key == Keyboard.KEY_T && Keyboard.state) System.out.println("Current time: " + Sys.getTime()); } } /** * All rendering is done in here */ private static void render() { GL.glClear(GL.GL_COLOR_BUFFER_BIT); GL.glPushMatrix(); GL.glTranslatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); GL.glRotatef(angle, 0, 0, 1.0f); ByteBuffer new_mapped_buffer = GL.glMapBufferARB(GL.GL_ARRAY_BUFFER_ARB, GL.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 (GL.glUnmapBufferARB(GL.GL_ARRAY_BUFFER_ARB)) GL.glDrawArrays(GL.GL_QUADS, 0, 4); /* GL.glBegin(GL.GL_QUADS); GL.glVertex2i(-50, -50); GL.glVertex2i(50, -50); GL.glVertex2i(50, 50); GL.glVertex2i(-50, 50); GL.glEnd();*/ GL.glPopMatrix(); } /** * Initialize */ private static void init() throws Exception { Keyboard.create(); Keyboard.enableBuffer(); Mouse.create(); Sys.setTime(0); Sys.setProcessPriority(Sys.HIGH_PRIORITY); System.out.println("Timer resolution: " + Sys.getTimerResolution()); // Go into orthographic projection mode. GLCaps.determineAvailableExtensions(); GL.glMatrixMode(GL.GL_PROJECTION); GL.glLoadIdentity(); GLU.gluOrtho2D(0, Display.getWidth(), 0, Display.getHeight()); GL.glMatrixMode(GL.GL_MODELVIEW); GL.glLoadIdentity(); GL.glViewport(0, 0, Display.getWidth(), Display.getHeight()); if (!GLCaps.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(); GL.glGenBuffersARB(1, int_buffer); buffer_id = int_buffer.get(0); GL.glBindBufferARB(GL.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); GL.glBufferDataARB(GL.GL_ARRAY_BUFFER_ARB, 2*4*4, vertices/*Sys.NULL*/, GL.GL_STREAM_DRAW_ARB); ByteBuffer index_buffer = Sys.createIndexBuffer(0); GL.glEnableClientState(GL.GL_VERTEX_ARRAY); GL.glVertexPointer(2, GL.GL_FLOAT, 0, index_buffer); GL.glGetIntegerv(GL.GL_MAX_TEXTURE_UNITS_ARB, int_buffer); System.out.println("Number of texture units: " + int_buffer.get(0)); // Fix the refresh rate to the display frequency. // gl.wglSwapIntervalEXT(1); } /** * Cleanup */ private static void cleanup() { IntBuffer int_buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); int_buffer.put(buffer_id); GL.glDeleteBuffersARB(1, int_buffer); Keyboard.destroy(); Mouse.destroy(); gl.destroy(); try { Display.resetDisplayMode(); } catch (Exception e) { e.printStackTrace(); } } } |
From: Elias N. <eli...@us...> - 2003-07-29 12:29:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1:/tmp/cvs-serv25311/src/native Modified Files: configure.in Log Message: Made C NULL return values correspond to a null Buffer Index: configure.in CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- configure.in 17 Jul 2003 09:16:50 -0000 1.17 +++ configure.in 29 Jul 2003 12:29:31 -0000 1.18 @@ -51,8 +51,8 @@ else AC_MSG_RESULT($JAVA_HOME) JAVA_HOME="$JAVA_HOME" - CPPFLAGS="$CPPFLAGS -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" - CFLAGS="$CFLAGS -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" + CPPFLAGS="$CPPFLAGS -D_DEBUG -fno-rtti -fno-exceptions -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" + CFLAGS="$CFLAGS -D_DEBUG -pthread -D_X11 -Wall -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" fi dnl Checks for libraries. |
From: Elias N. <eli...@us...> - 2003-07-29 12:29:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv25311/src/native/common Modified Files: org_lwjgl_opengl_CoreGL11.cpp org_lwjgl_opengl_GL.cpp Log Message: Made C NULL return values correspond to a null Buffer Index: org_lwjgl_opengl_CoreGL11.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_CoreGL11.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_CoreGL11.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_CoreGL11.cpp 26 Jul 2003 09:22:31 -0000 1.1 +++ org_lwjgl_opengl_CoreGL11.cpp 29 Jul 2003 12:29:32 -0000 1.2 @@ -47,6 +47,13 @@ #include "checkGLerror.h" #include "extgl.h" +static inline jobject newBuffer(JNIEnv *env, void *p, int size) { + if (p == NULL) + return NULL; + else + return env->NewDirectByteBuffer(p, size); +} + /* * Class: org_lwjgl_opengl_CoreGL11 * Method: glAccum @@ -999,7 +1006,7 @@ void *pointer; glGetPointerv((GLint) p0, &pointer); CHECK_GL_ERROR - return env->NewDirectByteBuffer(pointer, size); + return newBuffer(env, pointer, size); } /* Index: org_lwjgl_opengl_GL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- org_lwjgl_opengl_GL.cpp 20 Jul 2003 19:27:36 -0000 1.10 +++ org_lwjgl_opengl_GL.cpp 29 Jul 2003 12:29:32 -0000 1.11 @@ -47,6 +47,13 @@ #include "extgl.h" #include "checkGLerror.h" +static inline jobject newBuffer(JNIEnv *env, void *p, int size) { + if (p == NULL) + return NULL; + else + return env->NewDirectByteBuffer(p, size); +} + /* * Class: org_lwjgl_opengl_GL * Method: glActiveStencilFaceEXT @@ -1407,7 +1414,7 @@ void *address; glGetVariantPointervEXT((GLuint) p0, (GLuint) p1, &address); CHECK_GL_ERROR - return env->NewDirectByteBuffer(address, size); + return newBuffer(env, address, size); } /* @@ -1492,7 +1499,7 @@ void *address; glGetVertexAttribPointervARB((GLuint) p0, (GLuint) p1, &address); CHECK_GL_ERROR - return env->NewDirectByteBuffer(address, size); + return newBuffer(env, address, size); } /* @@ -1505,7 +1512,7 @@ void *address; glGetVertexAttribPointervNV((GLuint) p0, (GLuint) p1, &address); CHECK_GL_ERROR - return env->NewDirectByteBuffer(address, size); + return newBuffer(env, address, size); } /* @@ -3476,7 +3483,7 @@ #ifdef _X11 CHECK_EXISTS(glXAllocateMemoryNV) void *mem_address = glXAllocateMemoryNV((GLint) size, (GLfloat) p1, (GLfloat) p2, (GLfloat) p3); - return env->NewDirectByteBuffer(mem_address, size); + return newBuffer(env, mem_address, size); #else CHECK_EXISTS(NULL) return 0; @@ -3506,7 +3513,7 @@ #ifdef _WIN32 CHECK_EXISTS(wglAllocateMemoryNV) void *mem_address = wglAllocateMemoryNV((GLint) size, (GLfloat) p1, (GLfloat) p2, (GLfloat) p3); - return env->NewDirectByteBuffer(mem_address, size); + return newBuffer(env, mem_address, size); #else CHECK_EXISTS(NULL) return 0; @@ -4070,7 +4077,7 @@ if (old_buffer_address == buffer_address) return old_buffer; } - return env->NewDirectByteBuffer(buffer_address, size); + return newBuffer(env, buffer_address, size); } /* @@ -4110,5 +4117,5 @@ void *pointer; glGetBufferPointervARB((GLenum)target, (GLenum)pname, &pointer); CHECK_GL_ERROR - return env->NewDirectByteBuffer(pointer, size); + return newBuffer(env, pointer, size); } |
From: Elias N. <eli...@us...> - 2003-07-29 11:09:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv11343/src/java/org/lwjgl Modified Files: Sys.java Log Message: Renamed Sys.createARBVBOBuffer to Sys.createIndexBuffer Index: Sys.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Sys.java 17 Jul 2003 09:16:50 -0000 1.22 +++ Sys.java 29 Jul 2003 11:09:44 -0000 1.23 @@ -102,7 +102,7 @@ } finally { DEBUG = _debug; initialize(); - NULL = nGetNULLValue(); + NULL = nGetNULLValue(); } } @@ -129,27 +129,29 @@ setTime(0); } - /** - * Gets the native NULL constant value - */ - private static native ByteBuffer nGetNULLValue(); + /** + * Gets the native NULL constant value + */ + private static native ByteBuffer nGetNULLValue(); /** - * Create a buffer representing an index into a ARB_vertex_buffer_object buffer. + * Create a buffer representing an integer index. Use it with functions that in C can take + * both a pointer and an integer argument, like the ARB_vertex_buffer_object extension specifies + * gl*Pointer to do (among others). * * Example: * - * ByteBuffer b = Sys.createARBVBOBuffer(0); + * ByteBuffer b = Sys.createIndexBuffer(0); * gl.glVertexPointer(3, GL.GL_INT, 0, b); * * is equivalent to the C call: * * glVertexPointer(3, GL.GL_INT, 0, 0); * - * @param index The VBO index to represent - * @return a ByteBuffer representing the VBO index + * @param index The index to represent + * @return a ByteBuffer representing the index */ - public static native ByteBuffer createARBVBOBuffer(int index); + public static native ByteBuffer createIndexBuffer(int index); /** * Obtains the number of ticks that the hires timer does in a second. |
From: Elias N. <eli...@us...> - 2003-07-29 11:09:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv11343/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Renamed Sys.createARBVBOBuffer to Sys.createIndexBuffer Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_Sys.cpp 17 Jul 2003 09:16:51 -0000 1.9 +++ org_lwjgl_Sys.cpp 29 Jul 2003 11:09:44 -0000 1.10 @@ -62,13 +62,13 @@ /* * Class: org_lwjgl_Sys - * Method: createARBVBOBuffer + * Method: createIndexBuffer * Signature: (I)Ljava/nio/ByteBuffer; */ -JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer - (JNIEnv *env, jclass clazz, jint address) +JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createIndexBuffer + (JNIEnv *env, jclass clazz, jint index) { - return env->NewDirectByteBuffer((void *)address, 0); + return env->NewDirectByteBuffer((void *)index, 0); } /* |
From: Elias N. <eli...@us...> - 2003-07-29 11:09:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv11343/src/native/linux Modified Files: org_lwjgl_Sys.cpp Log Message: Renamed Sys.createARBVBOBuffer to Sys.createIndexBuffer Index: org_lwjgl_Sys.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- org_lwjgl_Sys.cpp 17 Jul 2003 09:16:51 -0000 1.9 +++ org_lwjgl_Sys.cpp 29 Jul 2003 11:09:44 -0000 1.10 @@ -61,13 +61,13 @@ /* * Class: org_lwjgl_Sys - * Method: createARBVBOBuffer + * Method: createIndexBuffer * Signature: (I)Ljava/nio/ByteBuffer; */ -JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer - (JNIEnv *env, jclass clazz, jint address) +JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createIndexBuffer + (JNIEnv *env, jclass clazz, jint index) { - return env->NewDirectByteBuffer((void *)address, 0); + return env->NewDirectByteBuffer((void *)index, 0); } /* |
From: Elias N. <eli...@us...> - 2003-07-29 11:09:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv11343/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: Renamed Sys.createARBVBOBuffer to Sys.createIndexBuffer Index: org_lwjgl_Sys.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_Sys.h 17 Jul 2003 09:16:50 -0000 1.8 +++ org_lwjgl_Sys.h 29 Jul 2003 11:09:44 -0000 1.9 @@ -31,10 +31,10 @@ /* * Class: org_lwjgl_Sys - * Method: createARBVBOBuffer + * Method: createIndexBuffer * Signature: (I)Ljava/nio/ByteBuffer; */ -JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createARBVBOBuffer +JNIEXPORT jobject JNICALL Java_org_lwjgl_Sys_createIndexBuffer (JNIEnv *, jclass, jint); /* |
From: Elias N. <eli...@us...> - 2003-07-28 10:10:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/native/linux Modified Files: Makefile.am org_lwjgl_opengl_GLWindow.cpp Added Files: org_lwjgl_opengl_GLCaps.cpp Log Message: Moved GL capabilities to GLCaps --- NEW FILE: org_lwjgl_opengl_GLCaps.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_GLCaps.cpp /* * 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. */ /** * $Id: org_lwjgl_opengl_GLCaps.cpp,v 1.1 2003/07/28 10:09:58 elias_naur Exp $ * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_opengl_GLCaps.h" #include "extgl.h" #include "jni.h" /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLEXTExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLEXTExtensionsStringAvaiable (JNIEnv *env, jclass clazz) { return JNI_FALSE; } /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLARBExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLARBExtensionsStringAvaiable (JNIEnv *env, jclass clazz) { return JNI_FALSE; } Index: Makefile.am CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/Makefile.am =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile.am 18 Jul 2003 19:02:48 -0000 1.6 +++ Makefile.am 28 Jul 2003 10:09:58 -0000 1.7 @@ -11,6 +11,7 @@ org_lwjgl_input_Mouse.cpp \ org_lwjgl_input_Cursor.cpp \ org_lwjgl_opengl_GLWindow.cpp \ + org_lwjgl_opengl_GLCaps.cpp \ org_lwjgl_opengl_Pbuffer.cpp \ org_lwjgl_Window.cpp \ extxcursor.cpp Index: org_lwjgl_opengl_GLWindow.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_GLWindow.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_GLWindow.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_GLWindow.cpp 26 Jul 2003 09:39:48 -0000 1.3 +++ org_lwjgl_opengl_GLWindow.cpp 28 Jul 2003 10:09:58 -0000 1.4 @@ -256,19 +256,6 @@ } /* - * Class: org_lwjgl_opengl_GL - * Method: checkWGLExtensionsString - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLWindow_checkWGLExtensionsString(JNIEnv * env, jobject obj) -{ - jclass clazz = env->GetObjectClass(obj); - jfieldID fid_WGL_ARB_extensions_string = env->GetFieldID(clazz, "WGL_ARB_extensions_string", "Z"); - jfieldID fid_WGL_EXT_extensions_string = env->GetFieldID(clazz, "WGL_EXT_extensions_string", "Z"); - env->SetBooleanField(obj, fid_WGL_ARB_extensions_string, JNI_FALSE); - env->SetBooleanField(obj, fid_WGL_EXT_extensions_string, JNI_FALSE); -} - -/* * Class: org_lwjgl_opengl_GLWindow * Method: nDestroy * Signature: ()V |
From: Elias N. <eli...@us...> - 2003-07-28 10:10:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/native/win32 Modified Files: org_lwjgl_opengl_GLWindow.cpp Added Files: org_lwjgl_opengl_GLCaps.cpp Log Message: Moved GL capabilities to GLCaps --- NEW FILE: org_lwjgl_opengl_GLCaps.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_GLCaps.cpp /* * 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. */ /** * $Id: org_lwjgl_opengl_GLCaps.cpp,v 1.1 2003/07/28 10:09:58 elias_naur Exp $ * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ #include <windows.h> #include "org_lwjgl_opengl_GLCaps.h" #include "extgl.h" #include "jni.h" /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLEXTExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLEXTExtensionsStringAvaiable (JNIEnv *env, jclass clazz) { return extgl_Extensions.wgl.EXT_extensions_string; } /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLARBExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLARBExtensionsStringAvaiable (JNIEnv *env, jclass clazz) { return extgl_Extensions.wgl.ARB_extensions_string; } Index: org_lwjgl_opengl_GLWindow.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_GLWindow.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_GLWindow.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_GLWindow.cpp 26 Jul 2003 09:39:48 -0000 1.3 +++ org_lwjgl_opengl_GLWindow.cpp 28 Jul 2003 10:09:58 -0000 1.4 @@ -207,21 +207,6 @@ } /* - * Class: org_lwjgl_opengl_GL - * Method: checkWGLExtensionsString - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLWindow_checkWGLExtensionsString(JNIEnv * env, jobject obj) -{ - jclass clazz = env->GetObjectClass(obj); - jfieldID fid_WGL_ARB_extensions_string = env->GetFieldID(clazz, "WGL_ARB_extensions_string", "Z"); - jfieldID fid_WGL_EXT_extensions_string = env->GetFieldID(clazz, "WGL_EXT_extensions_string", "Z"); - if (wglGetExtensionsStringARB) - env->SetBooleanField(obj, fid_WGL_ARB_extensions_string, JNI_TRUE); - if (wglGetExtensionsStringEXT) - env->SetBooleanField(obj, fid_WGL_EXT_extensions_string, JNI_TRUE); -} - -/* * Class: org_lwjgl_opengl_GLWindow * Method: swapBuffers * Signature: ()V |
From: Elias N. <eli...@us...> - 2003-07-28 10:10:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/native/common Modified Files: org_lwjgl_opengl_GLWindow.h Added Files: org_lwjgl_opengl_GLCaps.h Log Message: Moved GL capabilities to GLCaps --- NEW FILE: org_lwjgl_opengl_GLCaps.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLCaps.h /* DO NOT EDIT THIS FILE - it is machine generated */ #include <jni.h> /* Header for class org_lwjgl_opengl_GLCaps */ #ifndef _Included_org_lwjgl_opengl_GLCaps #define _Included_org_lwjgl_opengl_GLCaps #ifdef __cplusplus extern "C" { #endif /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: GL_ARB_imaging */ /* Inaccessible static: GL_ARB_depth_texture */ /* Inaccessible static: GL_ARB_matrix_palette */ /* Inaccessible static: GL_ARB_multisample */ /* Inaccessible static: GL_ARB_multitexture */ /* Inaccessible static: GL_ARB_point_parameters */ /* Inaccessible static: GL_ARB_shadow */ /* Inaccessible static: GL_ARB_shadow_ambient */ /* Inaccessible static: GL_ARB_texture_compression */ /* Inaccessible static: GL_ARB_texture_env_add */ /* Inaccessible static: GL_ARB_texture_env_dot3 */ /* Inaccessible static: GL_ARB_texture_env_combine */ /* Inaccessible static: GL_ARB_texture_env_crossbar */ /* Inaccessible static: GL_ARB_texture_border_clamp */ /* Inaccessible static: GL_ARB_texture_cube_map */ /* Inaccessible static: GL_ARB_texture_mirrored_repeat */ /* Inaccessible static: GL_ARB_transpose_matrix */ /* Inaccessible static: GL_ARB_vertex_blend */ /* Inaccessible static: GL_ARB_vertex_program */ /* Inaccessible static: GL_ARB_vertex_buffer_object */ /* Inaccessible static: GL_ARB_window_pos */ /* Inaccessible static: GL_EXT_abgr */ /* Inaccessible static: GL_EXT_bgra */ /* Inaccessible static: GL_EXT_blend_color */ /* Inaccessible static: GL_EXT_blend_function_separate */ /* Inaccessible static: GL_EXT_blend_minmax */ /* Inaccessible static: GL_EXT_blend_subtract */ /* Inaccessible static: GL_EXT_compiled_vertex_array */ /* Inaccessible static: GL_EXT_cull_vertex */ /* Inaccessible static: GL_EXT_draw_range_elements */ /* Inaccessible static: GL_EXT_fog_coord */ /* Inaccessible static: GL_EXT_light_max_exponent */ /* Inaccessible static: GL_EXT_multi_draw_arrays */ /* Inaccessible static: GL_EXT_packed_pixels */ /* Inaccessible static: GL_EXT_paletted_texture */ /* Inaccessible static: GL_EXT_point_parameters */ /* Inaccessible static: GL_EXT_rescale_normal */ /* Inaccessible static: GL_EXT_secondary_color */ /* Inaccessible static: GL_EXT_separate_specular_color */ /* Inaccessible static: GL_EXT_shadow_funcs */ /* Inaccessible static: GL_EXT_shared_texture_palette */ /* Inaccessible static: GL_EXT_stencil_two_side */ /* Inaccessible static: GL_EXT_stencil_wrap */ /* Inaccessible static: GL_EXT_texture_compression_s3tc */ /* Inaccessible static: GL_EXT_texture_env_combine */ /* Inaccessible static: GL_EXT_texture_env_dot3 */ /* Inaccessible static: GL_EXT_texture_filter_anisotropic */ /* Inaccessible static: GL_EXT_texture_lod_bias */ /* Inaccessible static: GL_EXT_vertex_array */ /* Inaccessible static: GL_EXT_vertex_shader */ /* Inaccessible static: GL_EXT_vertex_weighting */ /* Inaccessible static: GL_ATI_element_array */ /* Inaccessible static: GL_ATI_envmap_bumpmap */ /* Inaccessible static: GL_ATI_fragment_shader */ /* Inaccessible static: GL_ATI_pn_triangles */ /* Inaccessible static: GL_ATI_texture_mirror_once */ /* Inaccessible static: GL_ATI_vertex_array_object */ /* Inaccessible static: GL_ATI_vertex_streams */ /* Inaccessible static: GL_ATIX_point_sprites */ /* Inaccessible static: GL_ATIX_texture_env_route */ /* Inaccessible static: GL_HP_occlusion_test */ /* Inaccessible static: GL_NV_blend_square */ /* Inaccessible static: GL_NV_copy_depth_to_color */ /* Inaccessible static: GL_NV_depth_clamp */ /* Inaccessible static: GL_NV_evaluators */ /* Inaccessible static: GL_NV_fence */ /* Inaccessible static: GL_NV_fog_distance */ /* Inaccessible static: GL_NV_light_max_exponent */ /* Inaccessible static: GL_NV_occlusion_query */ /* Inaccessible static: GL_NV_packed_depth_stencil */ /* Inaccessible static: GL_NV_point_sprite */ /* Inaccessible static: GL_NV_register_combiners */ /* Inaccessible static: GL_NV_register_combiners2 */ /* Inaccessible static: GL_NV_texgen_reflection */ /* Inaccessible static: GL_NV_texture_env_combine4 */ /* Inaccessible static: GL_NV_texture_rectangle */ /* Inaccessible static: GL_NV_texture_shader */ /* Inaccessible static: GL_NV_texture_shader2 */ /* Inaccessible static: GL_NV_texture_shader3 */ /* Inaccessible static: GL_NV_vertex_array_range */ /* Inaccessible static: GL_NV_vertex_array_range2 */ /* Inaccessible static: GL_NV_vertex_program */ /* Inaccessible static: GL_NV_vertex_program1_1 */ /* Inaccessible static: GL_SGIS_generate_mipmap */ /* Inaccessible static: GL_SGIX_shadow */ /* Inaccessible static: GL_SGIX_depth_texture */ /* Inaccessible static: OpenGL10 */ /* Inaccessible static: OpenGL11 */ /* Inaccessible static: OpenGL12 */ /* Inaccessible static: OpenGL13 */ /* Inaccessible static: OpenGL14 */ /* Inaccessible static: WGL_ARB_buffer_region */ /* Inaccessible static: WGL_ARB_extensions_string */ /* Inaccessible static: WGL_ARB_pbuffer */ /* Inaccessible static: WGL_ARB_pixel_format */ /* Inaccessible static: WGL_ARB_render_texture */ /* Inaccessible static: WGL_EXT_extensions_string */ /* Inaccessible static: WGL_EXT_swap_control */ /* Inaccessible static: class_00024org_00024lwjgl_00024opengl_00024GLCaps */ /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLEXTExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLEXTExtensionsStringAvaiable (JNIEnv *, jclass); /* * Class: org_lwjgl_opengl_GLCaps * Method: isWGLARBExtensionsStringAvaiable * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GLCaps_isWGLARBExtensionsStringAvaiable (JNIEnv *, jclass); #ifdef __cplusplus } #endif #endif Index: org_lwjgl_opengl_GLWindow.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLWindow.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GLWindow.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_opengl_GLWindow.h 26 Jul 2003 09:39:48 -0000 1.2 +++ org_lwjgl_opengl_GLWindow.h 28 Jul 2003 10:09:57 -0000 1.3 @@ -10,15 +10,6 @@ /* Inaccessible static: _00024assertionsDisabled */ /* Inaccessible static: currentWindow */ /* Inaccessible static: class_00024org_00024lwjgl_00024Window */ -/* Inaccessible static: class_00024org_00024lwjgl_00024opengl_00024GL */ -/* - * Class: org_lwjgl_opengl_GLWindow - * Method: checkWGLExtensionsString - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLWindow_checkWGLExtensionsString - (JNIEnv *, jobject); - /* * Class: org_lwjgl_opengl_GLWindow * Method: swapBuffers |
From: Elias N. <eli...@us...> - 2003-07-28 10:10:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/java/org/lwjgl/test/opengl Modified Files: FullScreenWindowedTest.java Grass.java PbufferTest.java Log Message: Moved GL capabilities to GLCaps Index: FullScreenWindowedTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- FullScreenWindowedTest.java 26 Jul 2003 08:32:23 -0000 1.8 +++ FullScreenWindowedTest.java 28 Jul 2003 10:09:57 -0000 1.9 @@ -321,7 +321,8 @@ GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); //sync frame (only works on windows) - if (gl.WGL_EXT_swap_control) { + GLCaps.determineAvailableExtensions(); + if (GLCaps.WGL_EXT_swap_control) { GL.wglSwapIntervalEXT(1); } } Index: Grass.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Grass.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Grass.java 20 Jul 2003 16:01:41 -0000 1.15 +++ Grass.java 28 Jul 2003 10:09:57 -0000 1.16 @@ -131,8 +131,9 @@ public static void main(String[] args) { ByteBuffer byte_buf = ByteBuffer.allocateDirect(4); byte_buf.order(ByteOrder.nativeOrder()); - System.out.println("Vertex program supported: " + gl.GL_NV_vertex_program); - GL.glGenProgramsNV(1, byte_buf.asIntBuffer()); + GLCaps.determineAvailableExtensions(); + System.out.println("Vertex program supported: " + GLCaps.GL_NV_vertex_program); + GL.glGenProgramsNV(1, byte_buf.asIntBuffer()); IntBuffer int_buf = byte_buf.asIntBuffer(); if (int_buf.get(0) == 0) throw new RuntimeException("Could not allocate new vertex program id!"); @@ -144,7 +145,7 @@ program_buf.rewind(); program_buf.put(program); program_buf.rewind(); - GL.glLoadProgramNV( + GL.glLoadProgramNV( GL.GL_VERTEX_PROGRAM_NV, program_handle, program_buf.remaining(), @@ -162,29 +163,24 @@ light_buf_f.rewind(); light_buf_f.put(LightDiffuse); - GL.glLightfv( + GL.glLightfv( GL.GL_LIGHT0, GL.GL_DIFFUSE, light_buf_f); light_buf_f.rewind(); light_buf_f.put(LightPosition); - GL.glLightfv( + GL.glLightfv( GL.GL_LIGHT0, GL.GL_POSITION, light_buf_f); - GL.glEnable(GL.GL_LIGHT0); - - GL.glEnable(GL.GL_LIGHTING); - - GL.glEnable(GL.GL_DEPTH_TEST); - - GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); - GL.glEnable(GL.GL_BLEND); - - GL.glMatrixMode(GL.GL_PROJECTION); - GLU.gluPerspective(40.0, 1.0, 1.0, 50.0); - - GL.glMatrixMode(GL.GL_MODELVIEW); + GL.glEnable(GL.GL_LIGHT0); + GL.glEnable(GL.GL_LIGHTING); + GL.glEnable(GL.GL_DEPTH_TEST); + GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); + GL.glEnable(GL.GL_BLEND); + GL.glMatrixMode(GL.GL_PROJECTION); + GLU.gluPerspective(40.0, 1.0, 1.0, 50.0); + GL.glMatrixMode(GL.GL_MODELVIEW); GLU.gluLookAt(14.0, 10.0, -16.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); @@ -200,7 +196,7 @@ degree *= (0.5 + myrand()); ptrAnimate(degree); - GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); + GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); //ptrDraw(); @@ -246,16 +242,16 @@ fRigid = ((fRigid = myrand()) < 0.2f) ? 0.2f : fRigid; if (myrand() < 0.3) - GL.glBegin(GL.GL_LINE_STRIP); + GL.glBegin(GL.GL_LINE_STRIP); else - GL.glBegin(GL.GL_QUAD_STRIP); + GL.glBegin(GL.GL_QUAD_STRIP); for (cFaces = 0; cFaces < numFaces; cFaces++) { for (cWidth = frndWidth; cWidth >= -frndWidth; cWidth -= (frndWidth * 2.0f)) { - GL.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces); - GL.glVertex3f( + GL.glColor4f(fX, fRigid, fZ, (float) cFaces / (float) numFaces); + GL.glVertex3f( (float) (((cFaces - 2) * 0.1f) * java.lang.Math.cos(fRotate) + (cWidth) * java.lang.Math.sin(fRotate)), @@ -266,7 +262,7 @@ } frndWidth -= fDecWidth; } - GL.glEnd(); + GL.glEnd(); } @@ -275,110 +271,109 @@ fArea = 20.0f; mesh = GL.glGenLists(1); - GL.glNewList(mesh, GL.GL_COMPILE); + GL.glNewList(mesh, GL.GL_COMPILE); for (cI = -fArea / 2; cI < fArea / 2; cI += 0.25f) { for (cJ = -fArea / 2; cJ < fArea / 2; cJ += 0.25f) { genGrass(0.5f, 0.1f, cI, cJ); } } - GL.glEndList(); - + GL.glEndList(); } private static void grsDraw() { - GL.glEnable(GL.GL_VERTEX_PROGRAM_NV); - GL.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, program_handle); - GL.glTrackMatrixNV( + GL.glEnable(GL.GL_VERTEX_PROGRAM_NV); + GL.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, program_handle); + GL.glTrackMatrixNV( GL.GL_VERTEX_PROGRAM_NV, 0, GL.GL_MODELVIEW_PROJECTION_NV, GL.GL_IDENTITY_NV); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 4, 0.0f, 0.0f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 5, 0.0f, 0.0f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 6, 1.763609f, 0.496495f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 7, -0.943599f, 3.203737f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 8, 4.101107f, 0.943413f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 9, -1.218603f, 6.259399f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 10, 7.214299f, 1.352961f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 11, -1.540748f, 10.080958f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 12, 10.880035f, 1.759046f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 13, -1.852705f, 14.468674f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 14, 14.292879f, 1.973329f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 15, -1.973387f, 18.506531f, 0.0f, 0.0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 16, (float) (java.lang.Math.sin(aslod.angle) @@ -388,54 +383,54 @@ * (aslod.value + aslod.ripple)), 0.0f); - GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 17, 1.7f, 5f, 2f, 0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 17, 1.7f, 5f, 2f, 0f); + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 18, -0.0187293f, 0.074261f, 0.2121144f, 1.570729f); - GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 20, 0f, 0.5f, 1f, 0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 20, 0f, 0.5f, 1f, 0f); + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 21, 0.25f, -9f, 0.75f, 0.1591549f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 22, 24.9808f, -24.9808f, -60.14581f, 60.14581f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 23, 85.45379f, -85.45379f, -64.93935f, 64.93935f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 24, 19.73921f, -19.73921f, -1f, 1f); - GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 25, 0f, 4f, 0f, 0f); - GL.glProgramParameter4fNV( + GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 25, 0f, 4f, 0f, 0f); + GL.glProgramParameter4fNV( GL.GL_VERTEX_PROGRAM_NV, 19, 1f, 3.141593f, 0.5f, 1f); - GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 26, 0.7f, 0.4f, 0f, 0f); - GL.glCallList(mesh); - GL.glDisable(GL.GL_VERTEX_PROGRAM_NV); + GL.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 26, 0.7f, 0.4f, 0f, 0f); + GL.glCallList(mesh); + GL.glDisable(GL.GL_VERTEX_PROGRAM_NV); } Index: PbufferTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/PbufferTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/PbufferTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- PbufferTest.java 26 Jul 2003 08:32:23 -0000 1.5 +++ PbufferTest.java 28 Jul 2003 10:09:57 -0000 1.6 @@ -392,7 +392,8 @@ */ private void glInit() { //sync frame (only works on windows) - if (gl.WGL_EXT_swap_control) { + GLCaps.determineAvailableExtensions(); + if (GLCaps.WGL_EXT_swap_control) { GL.wglSwapIntervalEXT(1); } GL.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE); |
From: Elias N. <eli...@us...> - 2003-07-28 10:10:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/java/org/lwjgl/test/input Modified Files: HWCursorTest.java Log Message: Moved GL capabilities to GLCaps Index: HWCursorTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- HWCursorTest.java 26 Jul 2003 08:32:23 -0000 1.7 +++ HWCursorTest.java 28 Jul 2003 10:09:56 -0000 1.8 @@ -343,7 +343,8 @@ GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); //sync frame (only works on windows) - if (gl.WGL_EXT_swap_control) { + GLCaps.determineAvailableExtensions(); + if (GLCaps.WGL_EXT_swap_control) { GL.wglSwapIntervalEXT(1); } } |
From: Elias N. <eli...@us...> - 2003-07-28 10:09:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/java/org/lwjgl/opengl Modified Files: GLWindow.java Added Files: GLCaps.java Log Message: Moved GL capabilities to GLCaps --- NEW FILE: GLCaps.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLCaps.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. */ package org.lwjgl.opengl; import org.lwjgl.Sys; import org.lwjgl.Window; import java.lang.reflect.*; import java.lang.reflect.Field; import java.util.HashMap; import java.util.StringTokenizer; /** * $Id: GLCaps.java,v 1.1 2003/07/28 10:09:56 elias_naur Exp $ * * A static class describing all supported GL capabilities. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ public class GLCaps { /* * Available extensions */ public static boolean GL_ARB_imaging; public static boolean GL_ARB_depth_texture; public static boolean GL_ARB_matrix_palette; public static boolean GL_ARB_multisample; public static boolean GL_ARB_multitexture; public static boolean GL_ARB_point_parameters; public static boolean GL_ARB_shadow; public static boolean GL_ARB_shadow_ambient; public static boolean GL_ARB_texture_compression; public static boolean GL_ARB_texture_env_add; public static boolean GL_ARB_texture_env_dot3; public static boolean GL_ARB_texture_env_combine; public static boolean GL_ARB_texture_env_crossbar; public static boolean GL_ARB_texture_border_clamp; public static boolean GL_ARB_texture_cube_map; public static boolean GL_ARB_texture_mirrored_repeat; public static boolean GL_ARB_transpose_matrix; public static boolean GL_ARB_vertex_blend; public static boolean GL_ARB_vertex_program; public static boolean GL_ARB_vertex_buffer_object; public static boolean GL_ARB_window_pos; public static boolean GL_EXT_abgr; public static boolean GL_EXT_bgra; public static boolean GL_EXT_blend_color; public static boolean GL_EXT_blend_function_separate; public static boolean GL_EXT_blend_minmax; public static boolean GL_EXT_blend_subtract; public static boolean GL_EXT_compiled_vertex_array; public static boolean GL_EXT_cull_vertex; public static boolean GL_EXT_draw_range_elements; public static boolean GL_EXT_fog_coord; public static boolean GL_EXT_light_max_exponent; public static boolean GL_EXT_multi_draw_arrays; public static boolean GL_EXT_packed_pixels; public static boolean GL_EXT_paletted_texture; public static boolean GL_EXT_point_parameters; public static boolean GL_EXT_rescale_normal; public static boolean GL_EXT_secondary_color; public static boolean GL_EXT_separate_specular_color; public static boolean GL_EXT_shadow_funcs; public static boolean GL_EXT_shared_texture_palette; public static boolean GL_EXT_stencil_two_side; public static boolean GL_EXT_stencil_wrap; public static boolean GL_EXT_texture_compression_s3tc; public static boolean GL_EXT_texture_env_combine; public static boolean GL_EXT_texture_env_dot3; public static boolean GL_EXT_texture_filter_anisotropic; public static boolean GL_EXT_texture_lod_bias; public static boolean GL_EXT_vertex_array; public static boolean GL_EXT_vertex_shader; public static boolean GL_EXT_vertex_weighting; public static boolean GL_ATI_element_array; public static boolean GL_ATI_envmap_bumpmap; public static boolean GL_ATI_fragment_shader; public static boolean GL_ATI_pn_triangles; public static boolean GL_ATI_texture_mirror_once; public static boolean GL_ATI_vertex_array_object; public static boolean GL_ATI_vertex_streams; public static boolean GL_ATIX_point_sprites; public static boolean GL_ATIX_texture_env_route; public static boolean GL_HP_occlusion_test; public static boolean GL_NV_blend_square; public static boolean GL_NV_copy_depth_to_color; public static boolean GL_NV_depth_clamp; public static boolean GL_NV_evaluators; public static boolean GL_NV_fence; public static boolean GL_NV_fog_distance; public static boolean GL_NV_light_max_exponent; public static boolean GL_NV_occlusion_query; public static boolean GL_NV_packed_depth_stencil; public static boolean GL_NV_point_sprite; public static boolean GL_NV_register_combiners; public static boolean GL_NV_register_combiners2; public static boolean GL_NV_texgen_reflection; public static boolean GL_NV_texture_env_combine4; public static boolean GL_NV_texture_rectangle; public static boolean GL_NV_texture_shader; public static boolean GL_NV_texture_shader2; public static boolean GL_NV_texture_shader3; public static boolean GL_NV_vertex_array_range; public static boolean GL_NV_vertex_array_range2; public static boolean GL_NV_vertex_program; public static boolean GL_NV_vertex_program1_1; public static boolean GL_SGIS_generate_mipmap; public static boolean GL_SGIX_shadow; public static boolean GL_SGIX_depth_texture; public static boolean OpenGL10; public static boolean OpenGL11; public static boolean OpenGL12; public static boolean OpenGL13; public static boolean OpenGL14; /* * Available WGL extensions */ public static boolean WGL_ARB_buffer_region; public static boolean WGL_ARB_extensions_string; public static boolean WGL_ARB_pbuffer; public static boolean WGL_ARB_pixel_format; public static boolean WGL_ARB_render_texture; public static boolean WGL_EXT_extensions_string; public static boolean WGL_EXT_swap_control; static { System.loadLibrary(Sys.getLibraryName()); } private static void setExtensionFields(String exts, HashMap field_map) { StringTokenizer st = new StringTokenizer(exts); while (st.hasMoreTokens()) { String ext = st.nextToken(); if(org.lwjgl.Sys.DEBUG) { System.out.println(ext); } Field f = (Field)field_map.get(ext); if (f != null) { try { f.setBoolean(GLCaps.class, true); } catch (IllegalAccessException e) { e.printStackTrace(System.err); } } } } /** * Determine which extensions are available. Use this to initialize capability fields. * Can only be called _after_ a GLWindow or Pbuffer has been created. */ public static void determineAvailableExtensions() { // Grab all the public static booleans out of this class Field[] fields = GLCaps.class.getDeclaredFields(); HashMap map = new HashMap(fields.length); for (int i = 0; i < fields.length; i++) { if (Modifier.isStatic(fields[i].getModifiers()) && fields[i].getType() == boolean.class) { map.put(fields[i].getName(), fields[i]); // reset fields try { fields[i].setBoolean(GLCaps.class, false); } catch (IllegalAccessException e) { e.printStackTrace(System.err); } } } determineAvailableWGLExtensions(map); String exts = CoreGL11.glGetString(CoreGL11.GL_EXTENSIONS); if(org.lwjgl.Sys.DEBUG) { System.out.println("Available GL extensions:"); } setExtensionFields(exts, map); // Let's see what openGL version we are too: String version = CoreGL11.glGetString(CoreGL11.GL_VERSION); int i = version.indexOf("1."); if (i > -1) { char c = version.charAt(i + 2); // Each case intentionally falls through! switch (c) { case '4': OpenGL14 = true; case '3': OpenGL13 = true; case '2': OpenGL12 = true; case '1': OpenGL11 = true; case '0': OpenGL10 = true; break ; default: // Unexpected character - ignore } } } private static native boolean isWGLEXTExtensionsStringAvaiable(); private static native boolean isWGLARBExtensionsStringAvaiable(); /** * Determine which WGL extensions are available */ private static void determineAvailableWGLExtensions(HashMap field_map) { // First we must determine if WGL_EXT_extensions_string is available WGL_ARB_extensions_string = isWGLARBExtensionsStringAvaiable(); WGL_EXT_extensions_string = isWGLEXTExtensionsStringAvaiable(); if (!WGL_EXT_extensions_string && !WGL_ARB_extensions_string) return; final String exts; if (WGL_ARB_extensions_string) exts = GL.wglGetExtensionsStringARB(Window.getCurrentWindow().getHandle()); // Remember - this is an HWND not an HDC, which is what's required. The native // code on the other side of wglGetExtensionsStringARB gets the HDC from the HWND // behind the scenes. else exts = GL.wglGetExtensionsStringEXT(); if (exts == null) return; if(org.lwjgl.Sys.DEBUG) { System.out.println("Available WGL extensions:"); } setExtensionFields(exts, field_map); } } Index: GLWindow.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLWindow.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLWindow.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- GLWindow.java 28 Jul 2003 08:20:09 -0000 1.7 +++ GLWindow.java 28 Jul 2003 10:09:56 -0000 1.8 @@ -32,13 +32,9 @@ package org.lwjgl.opengl; -import org.lwjgl.*; import org.lwjgl.Window; - -import java.lang.reflect.*; -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.StringTokenizer; +import org.lwjgl.Sys; +import org.lwjgl.Display; /** * $Id$ @@ -76,231 +72,6 @@ /** Fullscreen */ protected final boolean fullscreen; - /* - * Available extensions - */ - public boolean GL_ARB_imaging; - public boolean GL_ARB_depth_texture; - public boolean GL_ARB_matrix_palette; - public boolean GL_ARB_multisample; - public boolean GL_ARB_multitexture; - public boolean GL_ARB_point_parameters; - public boolean GL_ARB_shadow; - public boolean GL_ARB_shadow_ambient; - public boolean GL_ARB_texture_compression; - public boolean GL_ARB_texture_env_add; - public boolean GL_ARB_texture_env_dot3; - public boolean GL_ARB_texture_env_combine; - public boolean GL_ARB_texture_env_crossbar; - public boolean GL_ARB_texture_border_clamp; - public boolean GL_ARB_texture_cube_map; - public boolean GL_ARB_texture_mirrored_repeat; - public boolean GL_ARB_transpose_matrix; - public boolean GL_ARB_vertex_blend; - public boolean GL_ARB_vertex_program; - public boolean GL_ARB_vertex_buffer_object; - public boolean GL_ARB_window_pos; - public boolean GL_EXT_abgr; - public boolean GL_EXT_bgra; - public boolean GL_EXT_blend_color; - public boolean GL_EXT_blend_function_separate; - public boolean GL_EXT_blend_minmax; - public boolean GL_EXT_blend_subtract; - public boolean GL_EXT_compiled_vertex_array; - public boolean GL_EXT_cull_vertex; - public boolean GL_EXT_draw_range_elements; - public boolean GL_EXT_fog_coord; - public boolean GL_EXT_light_max_exponent; - public boolean GL_EXT_multi_draw_arrays; - public boolean GL_EXT_packed_pixels; - public boolean GL_EXT_paletted_texture; - public boolean GL_EXT_point_parameters; - public boolean GL_EXT_rescale_normal; - public boolean GL_EXT_secondary_color; - public boolean GL_EXT_separate_specular_color; - public boolean GL_EXT_shadow_funcs; - public boolean GL_EXT_shared_texture_palette; - public boolean GL_EXT_stencil_two_side; - public boolean GL_EXT_stencil_wrap; - public boolean GL_EXT_texture_compression_s3tc; - public boolean GL_EXT_texture_env_combine; - public boolean GL_EXT_texture_env_dot3; - public boolean GL_EXT_texture_filter_anisotropic; - public boolean GL_EXT_texture_lod_bias; - public boolean GL_EXT_vertex_array; - public boolean GL_EXT_vertex_shader; - public boolean GL_EXT_vertex_weighting; - public boolean GL_ATI_element_array; - public boolean GL_ATI_envmap_bumpmap; - public boolean GL_ATI_fragment_shader; - public boolean GL_ATI_pn_triangles; - public boolean GL_ATI_texture_mirror_once; - public boolean GL_ATI_vertex_array_object; - public boolean GL_ATI_vertex_streams; - public boolean GL_ATIX_point_sprites; - public boolean GL_ATIX_texture_env_route; - public boolean GL_HP_occlusion_test; - public boolean GL_NV_blend_square; - public boolean GL_NV_copy_depth_to_color; - public boolean GL_NV_depth_clamp; - public boolean GL_NV_evaluators; - public boolean GL_NV_fence; - public boolean GL_NV_fog_distance; - public boolean GL_NV_light_max_exponent; - public boolean GL_NV_occlusion_query; - public boolean GL_NV_packed_depth_stencil; - public boolean GL_NV_point_sprite; - public boolean GL_NV_register_combiners; - public boolean GL_NV_register_combiners2; - public boolean GL_NV_texgen_reflection; - public boolean GL_NV_texture_env_combine4; - public boolean GL_NV_texture_rectangle; - public boolean GL_NV_texture_shader; - public boolean GL_NV_texture_shader2; - public boolean GL_NV_texture_shader3; - public boolean GL_NV_vertex_array_range; - public boolean GL_NV_vertex_array_range2; - public boolean GL_NV_vertex_program; - public boolean GL_NV_vertex_program1_1; - public boolean GL_SGIS_generate_mipmap; - public boolean GL_SGIX_shadow; - public boolean GL_SGIX_depth_texture; - public boolean OpenGL10; - public boolean OpenGL11; - public boolean OpenGL12; - public boolean OpenGL13; - public boolean OpenGL14; - - /* - * Available WGL extensions - */ - public boolean WGL_ARB_buffer_region; - public boolean WGL_ARB_extensions_string; - public boolean WGL_ARB_pbuffer; - public boolean WGL_ARB_pixel_format; - public boolean WGL_ARB_render_texture; - public boolean WGL_EXT_extensions_string; - public boolean WGL_EXT_swap_control; - - /** - * Determine which extensions are available - */ - private void determineAvailableExtensions() { - if (Display.getPlatform() == Display.PLATFORM_WGL) - determineAvailableWGLExtensions(); - - // Grab all the public booleans out of this class - Field[] fields = GLWindow.class.getDeclaredFields(); - HashMap map = new HashMap(fields.length); - for (int i = 0; i < fields.length; i++) { - if (!Modifier.isStatic(fields[i].getModifiers()) - && fields[i].getType() == boolean.class) - map.put(fields[i].getName(), fields[i]); - } - - String exts = CoreGL11.glGetString(CoreGL11.GL_EXTENSIONS); - StringTokenizer st = new StringTokenizer(exts); - while (st.hasMoreTokens()) { - String ext = st.nextToken(); - Field f = (Field) map.get(ext); - if (f != null) { - //System.out.println("Extension : "+ext+" : present"); - try { - f.setBoolean(this, true); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } -// } else { -// System.out.println("Extension : "+ext+" : NOT AVAILABLE"); - } - - } - - // Let's see what openGL version we are too: - String version = CoreGL11.glGetString(CoreGL11.GL_VERSION); - int i = version.indexOf("1."); - if (i > -1) { - char c = version.charAt(i + 2); - // Each case intentionally falls through! - switch (c) { - case '4': - OpenGL14 = true; - case '3': - OpenGL13 = true; - case '2': - OpenGL12 = true; - case '1': - OpenGL11 = true; - case '0': - OpenGL10 = true; - break ; - default: - // Unexpected character - ignore - } - } - } - - /** - * Checks and sets WGL_EXT_extensions_string and WGL_ARB_extensions_string - * if available. - */ - private native void checkWGLExtensionsString(); - - /** - * Determine which WGL extensions are available - */ - private void determineAvailableWGLExtensions() { - - // First we must determine if WGL_EXT_extensions_string is available - checkWGLExtensionsString(); - if (!WGL_EXT_extensions_string && !WGL_ARB_extensions_string) - return; - - // Grab all the public booleans out of this class - Field[] fields = GLWindow.class.getDeclaredFields(); - HashMap map = new HashMap(fields.length); - for (int i = 0; i < fields.length; i++) { - if (!Modifier.isStatic(fields[i].getModifiers()) - && fields[i].getType() == boolean.class) - map.put(fields[i].getName(), fields[i]); - } - - final String exts; - - if (WGL_ARB_extensions_string) - exts = GL.wglGetExtensionsStringARB(getHandle()); - // Remember - this is an HWND not an HDC, which is what's required. The native - // code on the other side of wglGetExtensionsStringARB gets the HDC from the HWND - // behind the scenes. - else - exts = GL.wglGetExtensionsStringEXT(); - - if (exts == null) - return; - - if(org.lwjgl.Sys.DEBUG) { - System.out.println("Available WGL extensions:"); - } - StringTokenizer st = new StringTokenizer(exts); - while (st.hasMoreTokens()) { - String ext = st.nextToken(); - - if(org.lwjgl.Sys.DEBUG) { - System.out.println(ext); - } - - Field f = (Field) map.get(ext); - if (f != null) { - try { - f.setBoolean(this, true); - } catch (IllegalAccessException e) { - e.printStackTrace(System.err); - } - } - - } - } - static { System.loadLibrary(Sys.getLibraryName()); } @@ -359,7 +130,6 @@ protected void doCreate() throws Exception { nCreate(getTitle(), x, y, getWidth(), getHeight(), color, alpha, depth, stencil, fullscreen); - determineAvailableExtensions(); } protected void doPaint() { |
From: Elias N. <eli...@us...> - 2003-07-28 10:09:59
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv9017/src/java/org/lwjgl Modified Files: Window.java Log Message: Moved GL capabilities to GLCaps Index: Window.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Window.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Window.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Window.java 16 Jul 2003 21:02:48 -0000 1.13 +++ Window.java 28 Jul 2003 10:09:56 -0000 1.14 @@ -38,8 +38,8 @@ /** Whether the window is currently minimized */ private boolean minimized; - /** Whether the window has focus */ - private boolean focused = true; + /** Whether the window has focus */ + private boolean focused = true; /** Whether the window has been asked to close by the user or underlying OS */ private boolean closeRequested; @@ -134,16 +134,16 @@ */ private native void nSetTitle(String title); - /** - * @return true if the user or operating system has asked the window to close - */ - public final boolean isCloseRequested() { - assert isCreated(); - - boolean currentValue = closeRequested; - closeRequested = false; - return currentValue; - } + /** + * @return true if the user or operating system has asked the window to close + */ + public final boolean isCloseRequested() { + assert isCreated(); + + boolean currentValue = closeRequested; + closeRequested = false; + return currentValue; + } /** * @return true if the window is minimized or otherwise not visible @@ -153,13 +153,13 @@ return minimized; } - /** - * @return true if window is focused - */ - public final boolean isFocused() { - assert isCreated(); - return focused; - } + /** + * @return true if window is focused + */ + public final boolean isFocused() { + assert isCreated(); + return focused; + } /** * Minimize the game and allow the operating system's default display to become |
From: Caspian Rychlik-P. <ci...@us...> - 2003-07-28 08:27:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv24343/src/java/org/lwjgl/openal Modified Files: BaseAL.java Log Message: Removed Math class Index: BaseAL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/BaseAL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/BaseAL.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- BaseAL.java 2 Jul 2003 22:34:27 -0000 1.15 +++ BaseAL.java 28 Jul 2003 08:20:09 -0000 1.16 @@ -89,7 +89,7 @@ libname = (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) ? "libopenal.so" - : "OpenAL32.dll"; + : "lwjglaudio.dll"; // try to get path from JWS (if possible) String jwsLibname = |
From: Caspian Rychlik-P. <ci...@us...> - 2003-07-28 08:26:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1:/tmp/cvs-serv24343/src/java/org/lwjgl Removed Files: Math.java Log Message: Removed Math class --- Math.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/Math.java |
From: Elias N. <eli...@us...> - 2003-07-28 08:22:06
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv24785/opengl Modified Files: GLConstants.java Log Message: whoops Index: GLConstants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- GLConstants.java 28 Jul 2003 08:21:32 -0000 1.11 +++ GLConstants.java 28 Jul 2003 08:22:03 -0000 1.12 @@ -63,7 +63,6 @@ public interface GLConstants extends - CoreGL14Constants, ARBCubeMap, ARBDepthTexture, ARBMatrixPalette, |
From: Elias N. <eli...@us...> - 2003-07-28 08:21:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv24708/opengl Modified Files: GLConstants.java Log Message: GLConstants now extends CoreGL14Constants Index: GLConstants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- GLConstants.java 28 Jul 2003 08:20:09 -0000 1.10 +++ GLConstants.java 28 Jul 2003 08:21:32 -0000 1.11 @@ -63,6 +63,7 @@ public interface GLConstants extends + CoreGL14Constants, ARBCubeMap, ARBDepthTexture, ARBMatrixPalette, |
From: Caspian Rychlik-P. <ci...@us...> - 2003-07-28 08:20:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv24343/src/java/org/lwjgl/opengl Modified Files: GLConstants.java GLWindow.java Log Message: Removed Math class Index: GLConstants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLConstants.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- GLConstants.java 25 Jul 2003 13:09:33 -0000 1.9 +++ GLConstants.java 28 Jul 2003 08:20:09 -0000 1.10 @@ -143,7 +143,8 @@ WGLMultisample, WGLPBuffer, WGLPixelFormat, - WGLRenderTexture + WGLRenderTexture, + CoreGL14Constants { } Index: GLWindow.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLWindow.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GLWindow.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- GLWindow.java 26 Jul 2003 11:43:26 -0000 1.6 +++ GLWindow.java 28 Jul 2003 08:20:09 -0000 1.7 @@ -52,6 +52,7 @@ * @version $Revision$ */ public class GLWindow extends Window { + /** Has the GL been created yet? */ private boolean created; |
From: Caspian Rychlik-P. <ci...@us...> - 2003-07-28 08:20:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector In directory sc8-pr-cvs1:/tmp/cvs-serv24343/src/java/org/lwjgl/vector Modified Files: Vector3f.java Matrix4f.java Vector2f.java Vector.java Vector4f.java Log Message: Removed Math class Index: Vector3f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector3f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector3f.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Vector3f.java 30 Apr 2003 15:38:13 -0000 1.12 +++ Vector3f.java 28 Jul 2003 08:20:08 -0000 1.13 @@ -34,8 +34,6 @@ import java.io.Serializable; import java.nio.FloatBuffer; -import org.lwjgl.Math; - /** * $Id$ * @@ -238,7 +236,7 @@ dls = -1f; else if (dls > 1.0f) dls = 1.0f; - return Math.acos(dls); + return (float) Math.toDegrees(Math.acos(dls)); } /* (non-Javadoc) Index: Matrix4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Matrix4f.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Matrix4f.java 30 Apr 2003 15:38:12 -0000 1.15 +++ Matrix4f.java 28 Jul 2003 08:20:08 -0000 1.16 @@ -31,8 +31,6 @@ */ package org.lwjgl.vector; -import org.lwjgl.Math; - import java.io.Serializable; import java.nio.FloatBuffer; @@ -494,8 +492,8 @@ * @return this */ public Matrix4f rotate(float angle, Vector3f axis) { - float c = Math.cos(angle); - float s = Math.sin(angle); + float c = (float) Math.cos(angle); + float s = (float) Math.sin(angle); float oneminusc = 1.0f - c; float xy = axis.x*axis.y; float yz = axis.y*axis.z; @@ -551,8 +549,8 @@ dest = new Matrix4f(); else if (dest == this) return rotate(angle, axis); - float c = Math.cos(angle); - float s = Math.sin(angle); + float c = (float) Math.cos(angle); + float s = (float) Math.sin(angle); float oneminusc = 1.0f - c; float xy = axis.x*axis.y; float yz = axis.y*axis.z; Index: Vector2f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector2f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector2f.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Vector2f.java 30 Apr 2003 15:38:13 -0000 1.9 +++ Vector2f.java 28 Jul 2003 08:20:09 -0000 1.10 @@ -34,8 +34,6 @@ import java.io.Serializable; import java.nio.FloatBuffer; -import org.lwjgl.Math; - /** * $Id$ * @@ -151,15 +149,6 @@ } /** - * Get the magnitude of of the vector - * @return the magnitude of the vector - */ - public float magnitude() - { - return Math.sqrt( (x * x) + (y * y) ); - } - - /** * The dot product of two vectors is calculated as * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z * @param left The LHS vector @@ -184,7 +173,7 @@ dls = -1f; else if (dls > 1.0f) dls = 1.0f; - return Math.acos(dls); + return (float) Math.toDegrees(Math.acos(dls)); } /** Index: Vector.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Vector.java 30 Apr 2003 15:38:13 -0000 1.6 +++ Vector.java 28 Jul 2003 08:20:09 -0000 1.7 @@ -34,8 +34,6 @@ import java.io.Serializable; import java.nio.FloatBuffer; -import org.lwjgl.Math; - /** * $Id$ * @@ -57,7 +55,7 @@ * @return the length of the vector */ public final float length() { - return Math.sqrt(lengthSquared()); + return (float) Math.sqrt(lengthSquared()); } Index: Vector4f.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector4f.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/vector/Vector4f.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Vector4f.java 30 Apr 2003 15:38:14 -0000 1.9 +++ Vector4f.java 28 Jul 2003 08:20:09 -0000 1.10 @@ -34,8 +34,6 @@ import java.io.Serializable; import java.nio.FloatBuffer; -import org.lwjgl.Math; - /** * $Id$ * @@ -194,15 +192,6 @@ } /** - * Get the magnitude of of the vector - * @return the magnitude of the vector - */ - public float magnitude() - { - return Math.sqrt( (x * x) + (y * y) + (z * z) + (w * w) ); - } - - /** * The dot product of two vectors is calculated as * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w * @param left The LHS vector @@ -225,7 +214,7 @@ dls = -1f; else if (dls > 1.0f) dls = 1.0f; - return Math.acos(dls); + return (float) Math.toDegrees(Math.acos(dls)); } /* (non-Javadoc) |
From: Caspian Rychlik-P. <ci...@us...> - 2003-07-27 13:12:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv20937/src/native/win32 Modified Files: org_lwjgl_Window.cpp Log Message: Changed some focus handling code. Works well with Alien Flux. Index: org_lwjgl_Window.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Window.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- org_lwjgl_Window.cpp 16 Jul 2003 21:01:34 -0000 1.14 +++ org_lwjgl_Window.cpp 27 Jul 2003 13:12:43 -0000 1.15 @@ -149,18 +149,18 @@ */ void appActivate(bool active) { - if (!active) { - tempResetDisplayMode(); - } +// if (!active) { +// tempResetDisplayMode(); +// } if (active) { SetForegroundWindow(hwnd); ShowWindow(hwnd, SW_RESTORE); } else if (isFullScreen) { ShowWindow(hwnd, SW_MINIMIZE); } - if (active) { - tempRestoreDisplayMode(); - } +// if (active) { +// tempRestoreDisplayMode(); +// } } /* @@ -185,11 +185,11 @@ return 0L; case SC_MINIMIZE: environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "minimized", "Z"), JNI_TRUE); - appActivate(true); + appActivate(false); break; case SC_RESTORE: environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "minimized", "Z"), JNI_FALSE); - appActivate(false); + appActivate(true); break; case SC_CLOSE: environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "closeRequested", "Z"), JNI_TRUE); @@ -204,12 +204,17 @@ switch(LOWORD(wParam)) { case WA_ACTIVE: case WA_CLICKACTIVE: - environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "focused", "Z"), JNI_TRUE); + environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "minimized", "Z"), JNI_FALSE); + isMinimized = false; + break; case WA_INACTIVE: - environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "focused", "Z"), JNI_FALSE); + environment->SetBooleanField(window, environment->GetFieldID(environment->GetObjectClass(window), "minimized", "Z"), JNI_TRUE); + isMinimized = true; + break; } + appActivate(!isMinimized); } break; case WM_QUIT: @@ -223,7 +228,7 @@ } } - // default action + // default action return DefWindowProc(hWnd, msg, wParam, lParam); } @@ -319,8 +324,8 @@ printf("Created window\n"); #endif - ShowWindow(hwnd, SW_SHOWNORMAL); - //ShowWindow(hwnd, SW_SHOW); +// ShowWindow(hwnd, SW_SHOWNORMAL); + ShowWindow(hwnd, SW_SHOW); UpdateWindow(hwnd); SetForegroundWindow(hwnd); SetFocus(hwnd); @@ -410,7 +415,6 @@ if (isMinimized) return; ShowWindow(hwnd, SW_MINIMIZE); - tempResetDisplayMode(); } /* @@ -424,6 +428,5 @@ if (!isMinimized) return; - tempRestoreDisplayMode(); ShowWindow(hwnd, SW_RESTORE); } |
From: Elias N. <eli...@us...> - 2003-07-26 14:15:12
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv20955/src/native/common Modified Files: org_lwjgl_opengl_CoreGL14.h Log Message: Added missing OpenGL 1.4 functions Index: org_lwjgl_opengl_CoreGL14.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_CoreGL14.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_CoreGL14.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_CoreGL14.h 25 Jul 2003 13:09:33 -0000 1.3 +++ org_lwjgl_opengl_CoreGL14.h 25 Jul 2003 14:23:12 -0000 1.4 @@ -9,11 +9,195 @@ #endif /* * Class: org_lwjgl_opengl_CoreGL14 + * Method: glFogCoordf + * Signature: (F)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glFogCoordf + (JNIEnv *, jclass, jfloat); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glFogCoordd + * Signature: (D)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glFogCoordd + (JNIEnv *, jclass, jdouble); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glFogCoordPointer + * Signature: (IILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glFogCoordPointer + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: org_lwjgl_opengl_CoreGL14 * Method: glMultiDrawArrays * Signature: (ILjava/nio/IntBuffer;Ljava/nio/IntBuffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glMultiDrawArrays (JNIEnv *, jclass, jint, jobject, jobject, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glPointParameterf + * Signature: (IF)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glPointParameterf + (JNIEnv *, jclass, jint, jfloat); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glPointParameterfv + * Signature: (ILjava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glPointParameterfv + (JNIEnv *, jclass, jint, jobject); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3b + * Signature: (BBB)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3b + (JNIEnv *, jclass, jbyte, jbyte, jbyte); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3d + * Signature: (DDD)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3d + (JNIEnv *, jclass, jdouble, jdouble, jdouble); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3f + * Signature: (FFF)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3f + (JNIEnv *, jclass, jfloat, jfloat, jfloat); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3i + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3i + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3s + * Signature: (SSS)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3s + (JNIEnv *, jclass, jshort, jshort, jshort); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3ub + * Signature: (BBB)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3ub + (JNIEnv *, jclass, jbyte, jbyte, jbyte); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3ui + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3ui + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColor3us + * Signature: (SSS)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColor3us + (JNIEnv *, jclass, jshort, jshort, jshort); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glSecondaryColorPointer + * Signature: (IIILjava/nio/Buffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glSecondaryColorPointer + (JNIEnv *, jclass, jint, jint, jint, jobject); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glBlendFuncSeparate + * Signature: (IIII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glBlendFuncSeparate + (JNIEnv *, jclass, jint, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos2d + * Signature: (DD)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos2d + (JNIEnv *, jclass, jdouble, jdouble); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos2f + * Signature: (FF)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos2f + (JNIEnv *, jclass, jfloat, jfloat); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos2i + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos2i + (JNIEnv *, jclass, jint, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos2s + * Signature: (SS)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos2s + (JNIEnv *, jclass, jshort, jshort); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos3d + * Signature: (DDD)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos3d + (JNIEnv *, jclass, jdouble, jdouble, jdouble); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos3f + * Signature: (FFF)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos3f + (JNIEnv *, jclass, jfloat, jfloat, jfloat); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos3i + * Signature: (III)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos3i + (JNIEnv *, jclass, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_CoreGL14 + * Method: glWindowPos3s + * Signature: (SSS)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CoreGL14_glWindowPos3s + (JNIEnv *, jclass, jshort, jshort, jshort); #ifdef __cplusplus } |
From: Elias N. <eli...@us...> - 2003-07-26 12:26:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv20955/src/java/org/lwjgl/opengl Modified Files: CoreGL14.java CoreGL14Constants.java Log Message: Added missing OpenGL 1.4 functions Index: CoreGL14.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CoreGL14.java 25 Jul 2003 13:09:33 -0000 1.5 +++ CoreGL14.java 25 Jul 2003 14:23:12 -0000 1.6 @@ -48,8 +48,31 @@ * @version $Revision$ */ public class CoreGL14 extends CoreGL13 implements CoreGL14Constants { + public static native void glFogCoordf (float coord); + public static native void glFogCoordd (double coord); + public static native void glFogCoordPointer (int type, int stride, Buffer data); public static native void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount, int primcount); /* public static native void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount);*/ + public static native void glPointParameterf (int pname, float param); + public static native void glPointParameterfv (int pname, FloatBuffer params); + public static native void glSecondaryColor3b (byte red, byte green, byte blue); + public static native void glSecondaryColor3d (double red, double green, double blue); + public static native void glSecondaryColor3f (float red, float green, float blue); + public static native void glSecondaryColor3i (int red, int green, int blue); + public static native void glSecondaryColor3s (short red, short green, short blue); + public static native void glSecondaryColor3ub (byte red, byte green, byte blue); + public static native void glSecondaryColor3ui (int red, int green, int blue); + public static native void glSecondaryColor3us (short red, short green, short blue); + public static native void glSecondaryColorPointer (int size, int type, int stride, Buffer data); + public static native void glBlendFuncSeparate (int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); + public static native void glWindowPos2d (double x, double y); + public static native void glWindowPos2f (float x, float y); + public static native void glWindowPos2i (int x, int y); + public static native void glWindowPos2s (short x, short y); + public static native void glWindowPos3d (double x, double y, double z); + public static native void glWindowPos3f (float x, float y, float z); + public static native void glWindowPos3i (int x, int y, int z); + public static native void glWindowPos3s (short x, short y, short z); } Index: CoreGL14Constants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14Constants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/CoreGL14Constants.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CoreGL14Constants.java 25 Jul 2003 13:09:33 -0000 1.4 +++ CoreGL14Constants.java 25 Jul 2003 14:23:12 -0000 1.5 @@ -41,4 +41,43 @@ * @version $Revision$ */ public interface CoreGL14Constants extends CoreGL13Constants { + public static final int GL_GENERATE_MIPMAP = 0x8191; + public static final int GL_GENERATE_MIPMAP_HINT = 0x8192; + public static final int GL_DEPTH_COMPONENT16 = 0x81A5; + public static final int GL_DEPTH_COMPONENT24 = 0x81A6; + public static final int GL_DEPTH_COMPONENT32 = 0x81A7; + public static final int GL_TEXTURE_DEPTH_SIZE = 0x884A; + public static final int GL_DEPTH_TEXTURE_MODE = 0x884B; + public static final int GL_TEXTURE_COMPARE_MODE = 0x884C; + public static final int GL_TEXTURE_COMPARE_FUNC = 0x884D; + public static final int GL_COMPARE_R_TO_TEXTURE = 0x884E; + public static final int GL_FOG_COORDINATE_SOURCE = 0x8450; + public static final int GL_FOG_COORDINATE = 0x8451; + public static final int GL_FRAGMENT_DEPTH = 0x8452; + public static final int GL_CURRENT_FOG_COORDINATE = 0x8453; + public static final int GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454; + public static final int GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455; + public static final int GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456; + public static final int GL_FOG_COORDINATE_ARRAY = 0x8457; + public static final int GL_POINT_SIZE_MIN = 0x8126; + public static final int GL_POINT_SIZE_MAX = 0x8127; + public static final int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; + public static final int GL_POINT_DISTANCE_ATTENUATION = 0x8129; + public static final int GL_COLOR_SUM = 0x8458; + public static final int GL_CURRENT_SECONDARY_COLOR = 0x8459; + public static final int GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A; + public static final int GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B; + public static final int GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C; + public static final int GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D; + public static final int GL_SECONDARY_COLOR_ARRAY = 0x845E; + public static final int GL_BLEND_DST_RGB = 0x80C8; + public static final int GL_BLEND_SRC_RGB = 0x80C9; + public static final int GL_BLEND_DST_ALPHA = 0x80CA; + public static final int GL_BLEND_SRC_ALPHA = 0x80CB; + public static final int GL_INCR_WRAP = 0x8507; + public static final int GL_DECR_WRAP = 0x8508; + public static final int GL_TEXTURE_FILTER_CONTROL = 0x8500; + public static final int GL_TEXTURE_LOD_BIAS = 0x8501; + public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; + public static final int GL_GL_MIRRORED_REPEAT = 0x8370; } |
From: Elias N. <eli...@us...> - 2003-07-26 12:26:26
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ext In directory sc8-pr-cvs1:/tmp/cvs-serv8296/src/java/org/lwjgl/opengl/ext Modified Files: EXTBgra.java Added Files: EXTPalettedTexture.java Log Message: Separated CoreGL into CoreGL11, CoreGL12. CoreGL13, CoreGL14 (including CoreGLConstants) --- NEW FILE: EXTPalettedTexture.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ext/EXTPalettedTexture.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. */ package org.lwjgl.opengl.ext; /** * EXT_bgra_constants * * @author cas */ public interface EXTPalettedTexture { public static final int GL_COLOR_TABLE_FORMAT_EXT = 0x80D8; public static final int GL_COLOR_TABLE_WIDTH_EXT = 0x80D9; public static final int GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA; public static final int GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB; public static final int GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC; public static final int GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD; public static final int GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE; public static final int GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF; public static final int GL_COLOR_INDEX1_EXT = 0x80E2; public static final int GL_COLOR_INDEX2_EXT = 0x80E3; public static final int GL_COLOR_INDEX4_EXT = 0x80E4; public static final int GL_COLOR_INDEX8_EXT = 0x80E5; public static final int GL_COLOR_INDEX12_EXT = 0x80E6; public static final int GL_COLOR_INDEX16_EXT = 0x80E7; } Index: EXTBgra.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ext/EXTBgra.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ext/EXTBgra.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- EXTBgra.java 24 Jun 2003 12:24:54 -0000 1.5 +++ EXTBgra.java 25 Jul 2003 13:09:33 -0000 1.6 @@ -38,8 +38,6 @@ * @author cas */ public interface EXTBgra { - /* - public static final int GL_ BGR_EXT = 0x80E0; - public static final int GL_ BGRA_EXT = 0x80E1; - */ + public static final int GL_BGR_EXT = 0x80E0; + public static final int GL_BGRA_EXT = 0x80E1; } |