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
(1) |
2
(14) |
3
(4) |
4
|
5
(3) |
6
(1) |
|
7
(9) |
8
(2) |
9
(4) |
10
|
11
(16) |
12
(21) |
13
(14) |
|
14
(12) |
15
(5) |
16
(6) |
17
|
18
(4) |
19
(4) |
20
(3) |
|
21
(2) |
22
(12) |
23
|
24
|
25
(8) |
26
|
27
(25) |
|
28
|
29
(2) |
30
(1) |
|
|
|
|
|
From: Brian M. <ma...@us...> - 2004-11-27 15:52:29
|
Update of /cvsroot/java-game-lib/LWJGL/www/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25899/images Removed Files: javanet_button_90.gif openal_logo.png opengl_logo.png Log Message: removing old files --- opengl_logo.png DELETED --- --- openal_logo.png DELETED --- --- javanet_button_90.gif DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-11-27 15:52:28
|
Update of /cvsroot/java-game-lib/LWJGL/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25899 Removed Files: about.php changelog.php contact.php credits.php default.css demos.php documentation.php download.php faq.php forum.php index.php installation.php license.php links.php projects.php Log Message: removing old files --- projects.php DELETED --- --- changelog.php DELETED --- --- index.php DELETED --- --- links.php DELETED --- --- credits.php DELETED --- --- forum.php DELETED --- --- faq.php DELETED --- --- documentation.php DELETED --- --- contact.php DELETED --- --- demos.php DELETED --- --- about.php DELETED --- --- installation.php DELETED --- --- license.php DELETED --- --- download.php DELETED --- --- default.css DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-11-27 10:17:27
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30469 Modified Files: org_lwjgl_input_Mouse.cpp Log Message: only generate events if mouse is actually alive Index: org_lwjgl_input_Mouse.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_input_Mouse.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- org_lwjgl_input_Mouse.cpp 12 Nov 2004 15:32:20 -0000 1.67 +++ org_lwjgl_input_Mouse.cpp 27 Nov 2004 10:17:15 -0000 1.68 @@ -161,27 +161,33 @@ } void handleMouseScrolled(int event_dwheel) { - accum_dwheel += event_dwheel; - putMouseEvent(-1, 0, event_dwheel); + if(mCreate_success) { + accum_dwheel += event_dwheel; + putMouseEvent(-1, 0, event_dwheel); + } } void handleMouseMoved(int x, int y) { - y = transformY(y); - int dx = x - last_x; - int dy = y - last_y; - accum_dx += dx; - accum_dy += dy; - last_x = x; - last_y = y; - if (mouse_grabbed) { - putMouseEventWithCoords(-1, 0, dx, dy, 0); - } else { - putMouseEventWithCoords(-1, 0, x, y, 0); - } + if(mCreate_success) { + y = transformY(y); + int dx = x - last_x; + int dy = y - last_y; + accum_dx += dx; + accum_dy += dy; + last_x = x; + last_y = y; + if (mouse_grabbed) { + putMouseEventWithCoords(-1, 0, dx, dy, 0); + } else { + putMouseEventWithCoords(-1, 0, x, y, 0); + } + } } void handleMouseButton(int button, int state) { - putMouseEvent(button, state, 0); + if(mCreate_success) { + putMouseEvent(button, state, 0); + } } static void copyDXEvents(int num_di_events, DIDEVICEOBJECTDATA *di_buffer) { @@ -354,6 +360,7 @@ lpdi->Release(); lpdi = NULL; } + mCreate_success = false; } /** * Enumerates the capabilities of the Mouse attached to the system |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:36:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14178 Modified Files: org_lwjgl_opengl_GL11.c org_lwjgl_opengl_GL12.c Log Message: glTexImageXD now accept null buffers |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:31:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13189 Modified Files: Display.java DisplayImplementation.java DisplayMode.java EventQueue.java KeyboardEventQueue.java LinuxDisplay.java MacOSXDisplay.java MacOSXFrame.java MacOSXGLCanvas.java MouseEventQueue.java Win32Display.java Log Message: Code cleanup Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Win32Display.java 22 Nov 2004 21:22:29 -0000 1.5 +++ Win32Display.java 25 Nov 2004 22:31:38 -0000 1.6 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -46,7 +46,7 @@ import org.lwjgl.LWJGLException; final class Win32Display implements DisplayImplementation { - private final static int CURSOR_HANDLE_SIZE = 8; + private static final int CURSOR_HANDLE_SIZE = 8; public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; public native void destroyWindow(); @@ -70,6 +70,7 @@ public native void setVSyncEnabled(boolean sync); public native void reshape(int x, int y, int width, int height); public native DisplayMode[] getAvailableDisplayModes(); + /* Mouse */ public native boolean hasWheel(); public native int getButtonCount(); @@ -83,6 +84,7 @@ public native void setNativeCursor(Object handle) throws LWJGLException; public native int getMinCursorSize(); public native int getMaxCursorSize(); + /* Keyboard */ public native void createKeyboard() throws LWJGLException; public native void destroyKeyboard(); Index: DisplayMode.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/DisplayMode.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- DisplayMode.java 9 Aug 2004 11:55:47 -0000 1.3 +++ DisplayMode.java 25 Nov 2004 22:31:38 -0000 1.4 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -37,7 +37,7 @@ * This class encapsulates the properties for a given display mode. * This class is not instantiable, and is aquired from the <code>Display. * getAvailableDisplayModes()</code> method. - * + * * @author cix_foo <ci...@us...> * @version $Revision$ */ @@ -62,7 +62,7 @@ public DisplayMode(int width, int height) { this(width, height, 0, 0, false); } - + DisplayMode(int width, int height, int bpp, int freq) { this(width, height, bpp, freq, true); } @@ -98,7 +98,7 @@ /** * Tests for <code>DisplayMode</code> equality - * + * * @see java.lang.Object#equals(Object) */ public boolean equals(Object obj) { @@ -115,7 +115,7 @@ /** * Retrieves the hashcode for this object - * + * * @see java.lang.Object#hashCode() */ public int hashCode() { @@ -124,11 +124,11 @@ /** * Retrieves a String representation of this <code>DisplayMode</code> - * + * * @see java.lang.Object#toString() */ public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuffer sb = new StringBuffer(32); sb.append(width); sb.append(" x "); sb.append(height); Index: MacOSXFrame.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXFrame.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MacOSXFrame.java 20 Nov 2004 16:46:43 -0000 1.4 +++ MacOSXFrame.java 25 Nov 2004 22:31:38 -0000 1.5 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -52,6 +52,7 @@ import org.lwjgl.LWJGLException; final class MacOSXFrame extends Frame implements WindowListener, ComponentListener { + private final MacOSXGLCanvas canvas; private boolean close_requested; @@ -61,24 +62,24 @@ private boolean active; private boolean visible; private boolean minimized; - - public MacOSXFrame(DisplayMode mode, java.awt.DisplayMode requested_mode, boolean fullscreen, int x, int y) throws LWJGLException { + + MacOSXFrame(DisplayMode mode, java.awt.DisplayMode requested_mode, boolean fullscreen, int x, int y) throws LWJGLException { setResizable(false); addWindowListener(this); addComponentListener(this); canvas = new MacOSXGLCanvas(); add(canvas, BorderLayout.CENTER); setUndecorated(fullscreen); - if (fullscreen) { + if ( fullscreen ) { getDevice().setFullScreenWindow(this); getDevice().setDisplayMode(requested_mode); java.awt.DisplayMode real_mode = getDevice().getDisplayMode(); /** For some strange reason, the display mode is sometimes silently capped even though the mode is reported as supported */ - if (requested_mode.getWidth() != real_mode.getWidth() || requested_mode.getHeight() != real_mode.getHeight()) { + if ( requested_mode.getWidth() != real_mode.getWidth() || requested_mode.getHeight() != real_mode.getHeight() ) { getDevice().setFullScreenWindow(null); syncDispose(); throw new LWJGLException("AWT capped mode: requested mode = " + requested_mode.getWidth() + "x" + requested_mode.getHeight() + - " but got " + real_mode.getWidth() + " " + real_mode.getHeight()); + " but got " + real_mode.getWidth() + " " + real_mode.getHeight()); } } pack(); @@ -94,11 +95,11 @@ } public Rectangle syncGetBounds() { - synchronized (this) { + synchronized ( this ) { return bounds; } } - + public void componentShown(ComponentEvent e) { } @@ -106,7 +107,7 @@ } private void updateBounds() { - synchronized (this) { + synchronized ( this ) { bounds = getBounds(); } } @@ -119,20 +120,20 @@ updateBounds(); } - public final static GraphicsDevice getDevice() { + public static GraphicsDevice getDevice() { GraphicsEnvironment g_env = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice device = g_env.getDefaultScreenDevice(); return device; } public void windowIconified(WindowEvent e) { - synchronized (this) { + synchronized ( this ) { minimized = true; } } public void windowDeiconified(WindowEvent e) { - synchronized (this) { + synchronized ( this ) { minimized = false; } } @@ -144,19 +145,19 @@ } public void windowClosing(WindowEvent e) { - synchronized (this) { + synchronized ( this ) { close_requested = true; } } - + public void windowDeactivated(WindowEvent e) { - synchronized (this) { + synchronized ( this ) { active = false; } } public void windowActivated(WindowEvent e) { - synchronized (this) { + synchronized ( this ) { should_update = true; active = true; } @@ -165,16 +166,17 @@ public void syncDispose() { invokeAWT(new Runnable() { public void run() { - if (isDisplayable()) + if ( isDisplayable() ) dispose(); } }); } private class TitleSetter implements Runnable { + private final String title; - public TitleSetter(String title) { + TitleSetter(String title) { this.title = title; } @@ -182,14 +184,14 @@ setTitle(title); } } - + public void syncSetTitle(String title) { invokeAWT(new TitleSetter(title)); } - + public boolean syncIsCloseRequested() { boolean result; - synchronized (this) { + synchronized ( this ) { result = close_requested; close_requested = false; } @@ -197,24 +199,24 @@ } public boolean syncIsVisible() { - synchronized (this) { + synchronized ( this ) { return !minimized; } } - + public boolean syncIsActive() { - synchronized (this) { + synchronized ( this ) { return active; } } - + public MacOSXGLCanvas getCanvas() { return canvas; } public boolean syncShouldUpdateContext() { boolean result; - synchronized (this) { + synchronized ( this ) { result = canvas.syncShouldUpdateContext() || should_update; should_update = false; } @@ -222,12 +224,13 @@ } private class Reshaper implements Runnable { + private final int x; private final int y; private final int width; private final int height; - public Reshaper(int x, int y, int width, int height) { + Reshaper(int x, int y, int width, int height) { this.x = x; this.y = y; this.width = width; @@ -255,9 +258,10 @@ } private class CursorSetter implements Runnable { + private final java.awt.Cursor awt_cursor; - public CursorSetter(java.awt.Cursor awt_cursor) { + CursorSetter(java.awt.Cursor awt_cursor) { this.awt_cursor = awt_cursor; } Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- MacOSXDisplay.java 22 Nov 2004 21:40:13 -0000 1.14 +++ MacOSXDisplay.java 25 Nov 2004 22:31:38 -0000 1.15 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -51,7 +51,6 @@ import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -59,7 +58,7 @@ import org.lwjgl.input.Keyboard; final class MacOSXDisplay implements DisplayImplementation { - private final static int GAMMA_LENGTH = 256; + private static final int GAMMA_LENGTH = 256; private MacOSXFrame frame; private MouseEventQueue mouse_queue; @@ -68,11 +67,11 @@ /* States */ private boolean close_requested; - - public MacOSXDisplay() { + + MacOSXDisplay() { new MacOSXApplicationListener(); } - + public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException { hideUI(fullscreen); close_requested = false; @@ -100,7 +99,7 @@ } hideUI(false); } - + public int getGammaRampLength() { return GAMMA_LENGTH; } @@ -110,11 +109,11 @@ public String getAdapter() { return null; } - + public String getVersion() { return null; } - + private boolean equals(java.awt.DisplayMode awt_mode, DisplayMode mode) { return awt_mode.getWidth() == mode.getWidth() && awt_mode.getHeight() == mode.getHeight() && awt_mode.getBitDepth() == mode.getBitsPerPixel() && awt_mode.getRefreshRate() == mode.getFrequency(); @@ -129,7 +128,7 @@ } throw new LWJGLException(mode + " is not supported"); } - + public void resetDisplayMode() { if (MacOSXFrame.getDevice().getFullScreenWindow() != null) MacOSXFrame.getDevice().setFullScreenWindow(null); @@ -138,7 +137,7 @@ } private native void restoreGamma(); - + private DisplayMode createLWJGLDisplayMode(java.awt.DisplayMode awt_mode) { int bit_depth; int refresh_rate; @@ -154,11 +153,11 @@ refresh_rate = 0; return new DisplayMode(awt_mode.getWidth(), awt_mode.getHeight(), bit_depth, refresh_rate); } - + public DisplayMode init() { return createLWJGLDisplayMode(MacOSXFrame.getDevice().getDisplayMode()); } - + public DisplayMode[] getAvailableDisplayModes() { java.awt.DisplayMode[] awt_modes = MacOSXFrame.getDevice().getDisplayModes(); List modes = new ArrayList(); @@ -169,11 +168,11 @@ modes.toArray(mode_list); return mode_list; } - + public void setTitle(String title) { frame.syncSetTitle(title); } - + public boolean isCloseRequested() { boolean result; synchronized (this) { @@ -186,11 +185,11 @@ public boolean isVisible() { return frame.syncIsVisible(); } - + public boolean isActive() { return frame.syncIsActive(); } - + public boolean isDirty() { return frame.getCanvas().syncIsDirty(); } @@ -213,7 +212,7 @@ warpCursor(); } } - + private void warpCursor() { if (mouse_queue != null && mouse_queue.isGrabbed()) { Rectangle bounds = frame.syncGetBounds(); @@ -248,7 +247,7 @@ public int getButtonCount() { return MouseEventQueue.NUM_BUTTONS; } - + public void createMouse() { MacOSXGLCanvas canvas = frame.getCanvas(); this.mouse_queue = new MouseEventQueue(canvas.getWidth(), canvas.getHeight()); @@ -264,14 +263,14 @@ canvas.removeMouseMotionListener(mouse_queue); this.mouse_queue = null; } - + public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons_buffer) { mouse_queue.poll(coord_buffer, buttons_buffer); } - + public void enableMouseBuffer() throws LWJGLException { } - + public int readMouse(IntBuffer buffer, int buffer_position) { assert buffer_position == buffer.position(); return mouse_queue.copyEvents(buffer); @@ -300,13 +299,13 @@ Componennt, it is reset to the default pointer cursor when the window is de- activated and the re-activated. The Cursor can not be reset to the custom cursor, with another setCursor. - 2. When the cursor is moving in the top pixel row (y = 0 in AWT coordinates) in fullscreen + 2. When the cursor is moving in the top pixel row (y = 0 in AWT coordinates) in fullscreen mode, no mouse moved events are reported, even though mouse pressed/released and dragged events are reported */ return 0; } - + public void setNativeCursor(Object handle) throws LWJGLException { Cursor awt_cursor = (Cursor)handle; frame.syncSetCursor(awt_cursor); @@ -328,7 +327,7 @@ this.keyboard_queue = new KeyboardEventQueue(); canvas.addKeyListener(keyboard_queue); } - + public void destroyKeyboard() { /* * This line is commented out to work around AWT bug 4867453: @@ -338,11 +337,11 @@ this.keyboard_queue = null; } - + public void pollKeyboard(ByteBuffer keyDownBuffer) { keyboard_queue.poll(keyDownBuffer); } - + public int readKeyboard(IntBuffer buffer, int buffer_position) { assert buffer_position == buffer.position(); return keyboard_queue.copyEvents(buffer); @@ -350,7 +349,7 @@ public void enableTranslation() throws LWJGLException { } - + public void enableKeyboardBuffer() throws LWJGLException { } @@ -387,7 +386,7 @@ return false; } } - + /** * This class captures com.apple.eawt.ApplicationEvents through reflection * to enable compilation on other platforms than Mac OS X Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- Display.java 22 Nov 2004 21:12:51 -0000 1.32 +++ Display.java 25 Nov 2004 22:31:38 -0000 1.33 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -34,12 +34,12 @@ /** * This is the abstract class for a Display in LWJGL. LWJGL displays have some * peculiar characteristics: - * + * * - the display may be closeable by the user or operating system, and may be minimized * by the user or operating system * - only one display may ever be open at once * - the operating system may or may not be able to do fullscreen or windowed displays. - * + * * @author foo */ @@ -57,11 +57,11 @@ public final class Display { /** The display implementor */ - private final static DisplayImplementation display_impl; + private static final DisplayImplementation display_impl; /** The initial display mode */ - private final static DisplayMode initial_mode; - + private static final DisplayMode initial_mode; + /** The current display mode, if created */ private static DisplayMode current_mode; @@ -85,10 +85,10 @@ /** VSync */ private static boolean vsync; - + /** A unique context object, so we can track different contexts between creates() and destroys() */ private static Display context; - + static { Sys.initialize(); display_impl = createDisplayImplementation(); @@ -100,7 +100,7 @@ }); } - private final static DisplayImplementation createDisplayImplementation() { + private static DisplayImplementation createDisplayImplementation() { String class_name; String os_name = System.getProperty("os.name"); if (os_name.startsWith("Linux")) { @@ -284,12 +284,14 @@ } timeThen = timeNow; } - + + private static long timeLate; + /** * Alternative sync method which works better on triple-buffered GL displays. + * * @param fps The desired frame rate, in frames per second */ - private static long timeLate; public static void sync2(int fps) { long gapTo = Sys.getTimerResolution() / fps + timeThen; timeNow = Sys.getTime(); @@ -321,7 +323,7 @@ return (fullscreen) ? 0 : y; }*/ - + /** * @return the title of the window */ @@ -417,7 +419,7 @@ * every frame regardless, you can ignore this flag altogether. If you are * trying to be kind to other processes you can check this flag and only * redraw when it returns true. The flag is cleared when update() or isDirty() is called. - * + * * @return true if the window has been damaged by external changes * and needs to repaint itself */ @@ -436,7 +438,7 @@ public static void processMessages() { if (!isCreated()) throw new IllegalStateException("Cannot update uncreated window"); - + display_impl.update(); } @@ -448,13 +450,13 @@ public static void update() { if (!isCreated()) throw new IllegalStateException("Cannot update uncreated window"); - + // We paint only when the window is visible or dirty if (isVisible() || isDirty()) { Util.checkGLError(); display_impl.swapBuffers(); } - + processMessages(); // Poll the input devices while we're here @@ -480,7 +482,7 @@ display_impl.makeCurrent(); GLContext.useContext(context); } - + /** * Create the OpenGL context. If isFullscreen() is true or if windowed * context are not supported on the platform, the display mode will be switched to the mode returned by @@ -602,7 +604,7 @@ if (!isCreated()) { return; } - + destroyWindow(); display_impl.destroyContext(); GLContext.unloadOpenGLLibrary(); @@ -623,7 +625,7 @@ display_impl.resetDisplayMode(); current_mode = initial_mode; } - + /** * @return the unique Display context (or null, if the Display has not been created) */ @@ -654,7 +656,7 @@ * The window is clamped to remain entirely on the screen. If you attempt * to position the window such that it would extend off the screen, the window * is simply placed as close to the edge as possible. - * @param x, y The new window location + * @param x , y The new window location */ public static void setLocation(int x, int y) { if (fullscreen) { @@ -670,9 +672,9 @@ // cache position Display.x = x; - Display.y = y; + Display.y = y; } - + /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", * "Radeon9700". If the adapter cannot be determined, this function returns null. Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- LinuxDisplay.java 22 Nov 2004 21:22:29 -0000 1.5 +++ LinuxDisplay.java 25 Nov 2004 22:31:38 -0000 1.6 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -47,7 +47,7 @@ import org.lwjgl.LWJGLException; final class LinuxDisplay implements DisplayImplementation { - private final static int CURSOR_HANDLE_SIZE = 8; + private static final int CURSOR_HANDLE_SIZE = 8; public native void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; public native void destroyWindow(); @@ -110,7 +110,7 @@ String[] browsers = {"mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"}; - for (int i = 0; i < browsers.length; i ++) { + for (int i = 0; i < browsers.length; i ++) { try { Runtime.getRuntime().exec(new String[] { browsers[i], url }); return true; @@ -119,7 +119,7 @@ e.printStackTrace(System.err); } } - + // Seems to have failed return false; } Index: MouseEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MouseEventQueue.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- MouseEventQueue.java 22 Nov 2004 19:32:40 -0000 1.5 +++ MouseEventQueue.java 25 Nov 2004 22:31:38 -0000 1.6 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -49,9 +49,10 @@ import org.lwjgl.BufferUtils; final class MouseEventQueue extends EventQueue implements MouseListener, MouseMotionListener, MouseWheelListener { - private final static int WHEEL_SCALE = 120; - public final static int NUM_BUTTONS = 3; - private final static int EVENT_SIZE = 5; + + private static final int WHEEL_SCALE = 120; + public static final int NUM_BUTTONS = 3; + private static final int EVENT_SIZE = 5; private final int width; private final int height; @@ -75,7 +76,7 @@ /** Buttons array */ private final byte[] buttons = new byte[NUM_BUTTONS]; - public MouseEventQueue(int width, int height) { + MouseEventQueue(int width, int height) { super(EVENT_SIZE); this.width = width; this.height = height; @@ -103,7 +104,7 @@ } private boolean putMouseEvent(int button, int state, int dz) { - if (grabbed) + if ( grabbed ) return putMouseEventWithCoords(button, state, 0, 0, dz); else return putMouseEventWithCoords(button, state, last_x, last_y, dz); @@ -119,7 +120,7 @@ } public synchronized void poll(IntBuffer coord_buffer, ByteBuffer buttons_buffer) { - if (grabbed) { + if ( grabbed ) { coord_buffer.put(0, accum_dx); coord_buffer.put(1, accum_dy); } else { @@ -135,7 +136,7 @@ private synchronized void setCursorPos(int x, int y) { y = transformY(y); - if (grabbed) + if ( grabbed ) return; int dx = x - last_x; int dy = y - last_y; @@ -148,16 +149,16 @@ public void mouseClicked(MouseEvent e) { } - + public void mouseEntered(MouseEvent e) { } - + public void mouseExited(MouseEvent e) { } - + private void handleButton(MouseEvent e) { byte button; - switch (e.getButton()) { + switch ( e.getButton() ) { case MouseEvent.BUTTON1: button = (byte)0; break; @@ -171,7 +172,7 @@ throw new IllegalArgumentException("Not a valid button: " + e.getButton()); } byte state; - switch (e.getID()) { + switch ( e.getID() ) { case MouseEvent.MOUSE_PRESSED: state = 1; break; @@ -192,13 +193,13 @@ buttons[button] = state; putMouseEvent(button, state, 0); } - + public void mouseReleased(MouseEvent e) { handleButton(e); } - + private void handleMotion(MouseEvent e) { - if (grabbed) { + if ( grabbed ) { updateDeltas(); } else { setCursorPos(e.getX(), e.getY()); @@ -208,24 +209,24 @@ public void mouseDragged(MouseEvent e) { handleMotion(e); } - - public void mouseMoved(MouseEvent e) { + + public void mouseMoved(MouseEvent e) { handleMotion(e); } - + private synchronized void handleWheel(int amount) { accum_dz += amount; putMouseEvent(-1, 0, amount); } - + private void updateDeltas() { - if (!grabbed) + if ( !grabbed ) return; - synchronized (this) { + synchronized ( this ) { ((MacOSXDisplay)Display.getImplementation()).getMouseDeltas(delta_buffer); int dx = delta_buffer.get(0); int dy = -delta_buffer.get(1); - if (dx != 0 || dy != 0) { + if ( dx != 0 || dy != 0 ) { putMouseEventWithCoords(-1, 0, dx, dy, 0); accum_dx += dx; accum_dy += dy; @@ -233,8 +234,8 @@ } } - public void mouseWheelMoved(MouseWheelEvent e) { - int wheel_amount = -e.getWheelRotation()*WHEEL_SCALE; + public void mouseWheelMoved(MouseWheelEvent e) { + int wheel_amount = -e.getWheelRotation() * WHEEL_SCALE; handleWheel(wheel_amount); } } Index: KeyboardEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- KeyboardEventQueue.java 22 Nov 2004 12:52:57 -0000 1.4 +++ KeyboardEventQueue.java 25 Nov 2004 22:31:38 -0000 1.5 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -44,14 +44,15 @@ import org.lwjgl.input.Keyboard; final class KeyboardEventQueue extends EventQueue implements KeyListener { - private final static int[] KEY_MAP = new int[0xffff]; - private final static int EVENT_SIZE = 3; + + private static final int[] KEY_MAP = new int[0xffff]; + private static final int EVENT_SIZE = 3; private final byte[] key_states = new byte[Keyboard.KEYBOARD_SIZE]; - + /** Event scratch array */ private final int[] event = new int[EVENT_SIZE]; - + static { KEY_MAP[KeyEvent.VK_0] = Keyboard.KEY_0; KEY_MAP[KeyEvent.VK_1] = Keyboard.KEY_1; @@ -255,13 +256,13 @@ key_down_buffer.put(key_states); key_down_buffer.position(old_position); } - + private synchronized void handleKey(int key_code, byte state, char character) { int key_code_mapped = KEY_MAP[key_code]; - if (character == KeyEvent.CHAR_UNDEFINED) + if ( character == KeyEvent.CHAR_UNDEFINED ) character = Keyboard.CHAR_NONE; /* Ignore repeating presses */ - if (key_states[key_code_mapped] == state) + if ( key_states[key_code_mapped] == state ) return; key_states[key_code_mapped] = state; int key_int_char = ((int)character) & 0xffff; Index: DisplayImplementation.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- DisplayImplementation.java 22 Nov 2004 21:22:29 -0000 1.4 +++ DisplayImplementation.java 25 Nov 2004 22:31:38 -0000 1.5 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -44,16 +44,18 @@ import org.lwjgl.LWJGLException; public interface DisplayImplementation { - public void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; - public void destroyWindow(); - public void switchDisplayMode(DisplayMode mode) throws LWJGLException; + void createWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException; + + void destroyWindow(); + + void switchDisplayMode(DisplayMode mode) throws LWJGLException; /** * Reset the display mode to whatever it was when LWJGL was initialized. * Fails silently. */ - public void resetDisplayMode(); + void resetDisplayMode(); /** * Return the length of the gamma ramp arrays. Returns 0 if gamma settings are @@ -61,182 +63,178 @@ * * @return the length of each gamma ramp array, or 0 if gamma settings are unsupported. */ - public int getGammaRampLength(); + int getGammaRampLength(); /** * Native method to set the gamma ramp. */ - public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; + void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; /** * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", * "Radeon9700". If the adapter cannot be determined, this function returns null. * @return a String */ - public String getAdapter(); + String getAdapter(); /** * Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, * this function returns null. * @return a String */ - public String getVersion(); + String getVersion(); /** * Initialize and return the current display mode. */ - public DisplayMode init(); + DisplayMode init(); /** * Native implementation of setTitle(). This will read the window's title member * and stash it in the native title of the window. */ - public void setTitle(String title); + void setTitle(String title); - public boolean isCloseRequested(); + boolean isCloseRequested(); - public boolean isVisible(); - public boolean isActive(); + boolean isVisible(); + boolean isActive(); - public boolean isDirty(); + boolean isDirty(); /** * Swap double buffers. */ - public void swapBuffers(); + void swapBuffers(); /** * Make the window the current rendering context for GL calls. */ - public void makeCurrent() throws LWJGLException; + void makeCurrent() throws LWJGLException; /** * Create the native OpenGL context. * @throws LWJGLException */ - public void createContext(PixelFormat pixel_format) throws LWJGLException; + void createContext(PixelFormat pixel_format) throws LWJGLException; - public void destroyContext(); + void destroyContext(); /** * Updates the windows internal state. This must be called at least once per video frame * to handle window close requests, moves, paints, etc. */ - public void update(); + void update(); - public void setVSyncEnabled(boolean sync); + void setVSyncEnabled(boolean sync); - public void reshape(int x, int y, int width, int height); + void reshape(int x, int y, int width, int height); /** * Native method for getting displaymodes */ - public DisplayMode[] getAvailableDisplayModes(); + DisplayMode[] getAvailableDisplayModes(); /* * Mouse methods */ /** Native query of wheel support */ - public boolean hasWheel(); + boolean hasWheel(); /** Native query of button count */ - public int getButtonCount(); - + int getButtonCount(); + /** * Native method to create the mouse. - * - * @return true if the mouse was created */ - public void createMouse(); + void createMouse(); /** * Native method the destroy the mouse */ - public void destroyMouse(); + void destroyMouse(); /** * Native method to poll the mouse */ - public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); + void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); /** * Native method to enable the buffer - * @return the event buffer, - * or null if no buffer can be allocated */ - public void enableMouseBuffer() throws LWJGLException; + void enableMouseBuffer() throws LWJGLException; /** * Native method to read the keyboard buffer + * * @return the total number of events read. */ - public int readMouse(IntBuffer buffer, int buffer_position); + int readMouse(IntBuffer buffer, int buffer_position); - public void grabMouse(boolean grab); + + void grabMouse(boolean grab); /** * Native function to determine native cursor support */ - public int getNativeCursorCaps(); + int getNativeCursorCaps(); /** Native method to set the native cursor */ - public void setNativeCursor(Object handle) throws LWJGLException; + void setNativeCursor(Object handle) throws LWJGLException; /** Native method returning the minimum cursor size */ - public int getMinCursorSize(); + int getMinCursorSize(); /** Native method returning the maximum cursor size */ - public int getMaxCursorSize(); + int getMaxCursorSize(); /* * Keyboard methods */ - + /** * Native method to create the keyboard */ - public void createKeyboard() throws LWJGLException; + void createKeyboard() throws LWJGLException; /** * Native method to destroy the keyboard */ - public void destroyKeyboard(); + void destroyKeyboard(); /** * Native method to poll the keyboard. - * - * @param keyDownBufferAddress the address of a 256-byte buffer to place + * + * @param keyDownBuffer the address of a 256-byte buffer to place * key states in. */ - public void pollKeyboard(ByteBuffer keyDownBuffer); - + void pollKeyboard(ByteBuffer keyDownBuffer); + /** * Native method to read the keyboard buffer * @return the total number of events read. */ - public int readKeyboard(IntBuffer buffer, int buffer_position); - + int readKeyboard(IntBuffer buffer, int buffer_position); + /** * Native method to enable the translation buffer */ - public void enableTranslation() throws LWJGLException; - + void enableTranslation() throws LWJGLException; + /** * Native method to enable the buffer - * @return the event buffer, - * or null if no buffer can be allocated */ - public void enableKeyboardBuffer() throws LWJGLException; - - public int isStateKeySet(int key); - + void enableKeyboardBuffer() throws LWJGLException; + + int isStateKeySet(int key); + /** Native cursor handles */ - public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException; + Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException; - public void destroyCursor(Object cursor_handle); + void destroyCursor(Object cursor_handle); /* Pbuffer caps */ - public int getPbufferCaps(); + int getPbufferCaps(); - public boolean openURL(String url); + boolean openURL(String url); } Index: MacOSXGLCanvas.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXGLCanvas.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- MacOSXGLCanvas.java 20 Nov 2004 16:46:43 -0000 1.3 +++ MacOSXGLCanvas.java 25 Nov 2004 22:31:38 -0000 1.4 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -44,6 +44,7 @@ import java.awt.event.ComponentListener; final class MacOSXGLCanvas extends Canvas implements ComponentListener { + private int width; private int height; private boolean context_update; @@ -55,9 +56,9 @@ } public void paint(Graphics g) { - synchronized (this) { + synchronized ( this ) { dirty = true; - if (!canvas_created) { + if ( !canvas_created ) { setFocusTraversalKeysEnabled(false); /* Input methods are not enabled in fullscreen anyway, so disable always */ enableInputMethods(false); @@ -72,16 +73,16 @@ public boolean syncIsDirty() { boolean result; - synchronized (this) { + synchronized ( this ) { result = dirty; dirty = false; } return result; } - + public void waitForCanvasCreated() { - synchronized (this) { - while (!canvas_created) { + synchronized ( this ) { + while ( !canvas_created ) { try { wait(); } catch (InterruptedException e) { @@ -90,18 +91,18 @@ } } } - + public boolean syncShouldUpdateContext() { boolean should_update; - synchronized (this) { + synchronized ( this ) { should_update = context_update; context_update = false; } return should_update; } - + private synchronized void setUpdate() { - synchronized (this) { + synchronized ( this ) { width = getWidth(); height = getHeight(); context_update = true; @@ -109,17 +110,17 @@ } public int syncGetWidth() { - synchronized (this) { + synchronized ( this ) { return width; } } - + public int syncGetHeight() { - synchronized (this) { + synchronized ( this ) { return height; } } - + public void componentShown(ComponentEvent e) { } @@ -148,7 +149,7 @@ super.setSize(d); setUpdate(); } - + public void setSize(int width, int height) { super.setSize(width, height); setUpdate(); Index: EventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EventQueue.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- EventQueue.java 11 Nov 2004 16:04:28 -0000 1.1 +++ EventQueue.java 25 Nov 2004 22:31:38 -0000 1.2 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -41,15 +41,18 @@ import java.nio.IntBuffer; abstract class EventQueue { - private final static int QUEUE_SIZE = 200; + + private static final int QUEUE_SIZE = 200; + private final int event_size; + private final IntBuffer queue; - public EventQueue(int event_size) { + protected EventQueue(int event_size) { this.event_size = event_size; this.queue = ByteBuffer.allocateDirect(QUEUE_SIZE*event_size).asIntBuffer(); } - + protected sy... [truncated message content] |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11030 Modified Files: ARBBufferObject.java ARBDepthTexture.java ARBFragmentProgram.java ARBImaging.java ARBMatrixPalette.java ARBMultisample.java ARBMultitexture.java ARBOcclusionQuery.java ARBPointParameters.java ARBProgram.java ARBShaderObjects.java ARBShadingLanguage100.java ARBShadow.java ARBShadowAmbient.java ARBTextureBorderClamp.java ARBTextureCompression.java ARBTextureCubeMap.java ARBTextureEnvCombine.java ARBTextureEnvDot3.java ARBTextureMirroredRepeat.java ARBTransposeMatrix.java ARBVertexBlend.java ARBVertexBufferObject.java ARBVertexProgram.java ARBVertexShader.java ARBWindowPos.java ATIElementArray.java ATIEnvmapBumpmap.java ATIFragmentShader.java ATIPnTriangles.java ATISeparateStencil.java ATITextureFloat.java ATITextureMirrorOnce.java ATIVertexArrayObject.java ATIVertexAttribArrayObject.java ATIVertexStreams.java EXTAbgr.java EXTBgra.java EXTBlendEquationSeparate.java EXTBlendFuncSeparate.java EXTBlendSubtract.java EXTCompiledVertexArray.java EXTDepthBoundsTest.java EXTDrawRangeElements.java EXTFogCoord.java EXTMultiDrawArrays.java EXTPackedPixels.java EXTPixelBufferObject.java EXTPointParameters.java EXTRescaleNormal.java EXTSecondaryColor.java EXTSeparateSpecularColor.java EXTSharedTexturePalette.java EXTStencilTwoSide.java EXTStencilWrap.java EXTTextureCompressionS3TC.java EXTTextureEnvCombine.java EXTTextureEnvDot3.java EXTTextureFilterAnisotropic.java EXTTextureLODBias.java EXTTextureMirrorClamp.java EXTTextureRectangle.java EXTVertexShader.java EXTVertexWeighting.java GL13.java GL14.java GLBufferChecks.java GLUConstants.java NVCopyDepthToColor.java NVDepthClamp.java NVEvaluators.java NVFence.java NVFloatBuffer.java NVFogDistance.java NVFragmentProgram.java NVFragmentProgram2.java NVHalfFloat.java NVLightMaxExponent.java NVMultisampleFilterHint.java NVOcclusionQuery.java NVPackedDepthStencil.java NVPixelDataRange.java NVPointSprite.java NVPrimitiveRestart.java NVProgram.java NVRegisterCombiners.java NVRegisterCombiners2.java NVTexgenReflection.java NVTextureCompressionVTC.java NVTextureEnvCombine4.java NVTextureExpandNormal.java NVTextureRectangle.java NVTextureShader.java NVTextureShader2.java NVTextureShader3.java NVVertexArrayRange.java NVVertexArrayRange2.java NVVertexProgram.java NVVertexProgram2Option.java NVVertexProgram3.java OpenGLException.java RenderTexture.java StateStack.java Util.java VBOTracker.java Log Message: Code cleanup Index: EXTTextureMirrorClamp.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureMirrorClamp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- EXTTextureMirrorClamp.java 31 Jul 2004 09:34:09 -0000 1.3 +++ EXTTextureMirrorClamp.java 25 Nov 2004 22:20:44 -0000 1.4 @@ -1,37 +1,38 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.opengl; public final class EXTTextureMirrorClamp { + /* * Accepted by the <param> parameter of TexParameteri and TexParameterf, * and by the <params> parameter of TexParameteriv and TexParameterfv, Index: EXTDrawRangeElements.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTDrawRangeElements.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EXTDrawRangeElements.java 31 Jul 2004 09:34:09 -0000 1.10 +++ EXTDrawRangeElements.java 25 Nov 2004 22:20:44 -0000 1.11 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -40,8 +40,9 @@ import org.lwjgl.BufferChecks; public final class EXTDrawRangeElements { - public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; - public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; + + public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; + public static final int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; private EXTDrawRangeElements() { } @@ -53,21 +54,25 @@ GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_BYTE, pIndices, pIndices.position()); } + public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) { BufferChecks.checkDirect(pIndices); GLBufferChecks.ensureElementVBOdisabled(); - nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position()<<1); + nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_SHORT, pIndices, pIndices.position() << 1); } + public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) { BufferChecks.checkDirect(pIndices); GLBufferChecks.ensureElementVBOdisabled(); - nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position()<<2); + nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_INT, pIndices, pIndices.position() << 2); } + private static native void nglDrawRangeElementsEXT(int mode, int start, int end, int count, int type, Buffer pIndices, int pIndices_offset); public static void glDrawRangeElementsEXT(int mode, int start, int end, int count, int type, int buffer_offset) { GLBufferChecks.ensureElementVBOenabled(); nglDrawRangeElementsEXTVBO(mode, start, end, count, type, buffer_offset); } + private static native void nglDrawRangeElementsEXTVBO(int mode, int start, int end, int count, int type, int buffer_offset); } Index: EXTVertexShader.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTVertexShader.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- EXTVertexShader.java 31 Jul 2004 09:34:09 -0000 1.10 +++ EXTVertexShader.java 25 Nov 2004 22:20:44 -0000 1.11 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -41,116 +41,117 @@ import org.lwjgl.BufferChecks; public final class EXTVertexShader { - public static final int GL_VERTEX_SHADER_EXT = 0x8780; - public static final int GL_VERTEX_SHADER_BINDING_EXT = 0x8781; - public static final int GL_OP_INDEX_EXT = 0x8782; - public static final int GL_OP_NEGATE_EXT = 0x8783; - public static final int GL_OP_DOT3_EXT = 0x8784; - public static final int GL_OP_DOT4_EXT = 0x8785; - public static final int GL_OP_MUL_EXT = 0x8786; - public static final int GL_OP_ADD_EXT = 0x8787; - public static final int GL_OP_MADD_EXT = 0x8788; - public static final int GL_OP_FRAC_EXT = 0x8789; - public static final int GL_OP_MAX_EXT = 0x878A; - public static final int GL_OP_MIN_EXT = 0x878B; - public static final int GL_OP_SET_GE_EXT = 0x878C; - public static final int GL_OP_SET_LT_EXT = 0x878D; - public static final int GL_OP_CLAMP_EXT = 0x878E; - public static final int GL_OP_FLOOR_EXT = 0x878F; - public static final int GL_OP_ROUND_EXT = 0x8790; - public static final int GL_OP_EXP_BASE_2_EXT = 0x8791; - public static final int GL_OP_LOG_BASE_2_EXT = 0x8792; - public static final int GL_OP_POWER_EXT = 0x8793; - public static final int GL_OP_RECIP_EXT = 0x8794; - public static final int GL_OP_RECIP_SQRT_EXT = 0x8795; - public static final int GL_OP_SUB_EXT = 0x8796; - public static final int GL_OP_CROSS_PRODUCT_EXT = 0x8797; - public static final int GL_OP_MULTIPLY_MATRIX_EXT = 0x8798; - public static final int GL_OP_MOV_EXT = 0x8799; - public static final int GL_OUTPUT_VERTEX_EXT = 0x879A; - public static final int GL_OUTPUT_COLOR0_EXT = 0x879B; - public static final int GL_OUTPUT_COLOR1_EXT = 0x879C; - public static final int GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D; - public static final int GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E; - public static final int GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F; - public static final int GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0; - public static final int GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1; - public static final int GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2; - public static final int GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3; - public static final int GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4; - public static final int GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5; - public static final int GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6; - public static final int GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7; - public static final int GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8; - public static final int GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9; - public static final int GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA; - public static final int GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB; - public static final int GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC; - public static final int GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD; - public static final int GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE; - public static final int GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF; - public static final int GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0; - public static final int GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1; - public static final int GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2; - public static final int GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3; - public static final int GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4; - public static final int GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5; - public static final int GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6; - public static final int GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7; - public static final int GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8; - public static final int GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9; - public static final int GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA; - public static final int GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB; - public static final int GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC; - public static final int GL_OUTPUT_FOG_EXT = 0x87BD; - public static final int GL_SCALAR_EXT = 0x87BE; - public static final int GL_VECTOR_EXT = 0x87BF; - public static final int GL_MATRIX_EXT = 0x87C0; - public static final int GL_VARIANT_EXT = 0x87C1; - public static final int GL_INVARIANT_EXT = 0x87C2; - public static final int GL_LOCAL_CONSTANT_EXT = 0x87C3; - public static final int GL_LOCAL_EXT = 0x87C4; - public static final int GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5; - public static final int GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6; - public static final int GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7; - public static final int GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8; - public static final int GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9; - public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA; - public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB; - public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CC; - public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CD; - public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE; - public static final int GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF; - public static final int GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0; - public static final int GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1; - public static final int GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2; - public static final int GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3; - public static final int GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4; - public static final int GL_X_EXT = 0x87D5; - public static final int GL_Y_EXT = 0x87D6; - public static final int GL_Z_EXT = 0x87D7; - public static final int GL_W_EXT = 0x87D8; - public static final int GL_NEGATIVE_X_EXT = 0x87D9; - public static final int GL_NEGATIVE_Y_EXT = 0x87DA; - public static final int GL_NEGATIVE_Z_EXT = 0x87DB; - public static final int GL_NEGATIVE_W_EXT = 0x87DC; - public static final int GL_ZERO_EXT = 0x87DD; - public static final int GL_ONE_EXT = 0x87DE; - public static final int GL_NEGATIVE_ONE_EXT = 0x87DF; - public static final int GL_NORMALIZED_RANGE_EXT = 0x87E0; - public static final int GL_FULL_RANGE_EXT = 0x87E1; - public static final int GL_CURRENT_VERTEX_EXT = 0x87E2; - public static final int GL_MVP_MATRIX_EXT = 0x87E3; - public static final int GL_VARIANT_VALUE_EXT = 0x87E4; - public static final int GL_VARIANT_DATATYPE_EXT = 0x87E5; - public static final int GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6; - public static final int GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7; - public static final int GL_VARIANT_ARRAY_EXT = 0x87E8; - public static final int GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9; - public static final int GL_INVARIANT_VALUE_EXT = 0x87EA; - public static final int GL_INVARIANT_DATATYPE_EXT = 0x87EB; - public static final int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC; - public static final int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; + + public static final int GL_VERTEX_SHADER_EXT = 0x8780; + public static final int GL_VERTEX_SHADER_BINDING_EXT = 0x8781; + public static final int GL_OP_INDEX_EXT = 0x8782; + public static final int GL_OP_NEGATE_EXT = 0x8783; + public static final int GL_OP_DOT3_EXT = 0x8784; + public static final int GL_OP_DOT4_EXT = 0x8785; + public static final int GL_OP_MUL_EXT = 0x8786; + public static final int GL_OP_ADD_EXT = 0x8787; + public static final int GL_OP_MADD_EXT = 0x8788; + public static final int GL_OP_FRAC_EXT = 0x8789; + public static final int GL_OP_MAX_EXT = 0x878A; + public static final int GL_OP_MIN_EXT = 0x878B; + public static final int GL_OP_SET_GE_EXT = 0x878C; + public static final int GL_OP_SET_LT_EXT = 0x878D; + public static final int GL_OP_CLAMP_EXT = 0x878E; + public static final int GL_OP_FLOOR_EXT = 0x878F; + public static final int GL_OP_ROUND_EXT = 0x8790; + public static final int GL_OP_EXP_BASE_2_EXT = 0x8791; + public static final int GL_OP_LOG_BASE_2_EXT = 0x8792; + public static final int GL_OP_POWER_EXT = 0x8793; + public static final int GL_OP_RECIP_EXT = 0x8794; + public static final int GL_OP_RECIP_SQRT_EXT = 0x8795; + public static final int GL_OP_SUB_EXT = 0x8796; + public static final int GL_OP_CROSS_PRODUCT_EXT = 0x8797; + public static final int GL_OP_MULTIPLY_MATRIX_EXT = 0x8798; + public static final int GL_OP_MOV_EXT = 0x8799; + public static final int GL_OUTPUT_VERTEX_EXT = 0x879A; + public static final int GL_OUTPUT_COLOR0_EXT = 0x879B; + public static final int GL_OUTPUT_COLOR1_EXT = 0x879C; + public static final int GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D; + public static final int GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E; + public static final int GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F; + public static final int GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0; + public static final int GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1; + public static final int GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2; + public static final int GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3; + public static final int GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4; + public static final int GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5; + public static final int GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6; + public static final int GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7; + public static final int GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8; + public static final int GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9; + public static final int GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA; + public static final int GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB; + public static final int GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC; + public static final int GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD; + public static final int GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE; + public static final int GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF; + public static final int GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0; + public static final int GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1; + public static final int GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2; + public static final int GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3; + public static final int GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4; + public static final int GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5; + public static final int GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6; + public static final int GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7; + public static final int GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8; + public static final int GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9; + public static final int GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA; + public static final int GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB; + public static final int GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC; + public static final int GL_OUTPUT_FOG_EXT = 0x87BD; + public static final int GL_SCALAR_EXT = 0x87BE; + public static final int GL_VECTOR_EXT = 0x87BF; + public static final int GL_MATRIX_EXT = 0x87C0; + public static final int GL_VARIANT_EXT = 0x87C1; + public static final int GL_INVARIANT_EXT = 0x87C2; + public static final int GL_LOCAL_CONSTANT_EXT = 0x87C3; + public static final int GL_LOCAL_EXT = 0x87C4; + public static final int GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5; + public static final int GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6; + public static final int GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7; + public static final int GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8; + public static final int GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9; + public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA; + public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB; + public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CC; + public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CD; + public static final int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE; + public static final int GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF; + public static final int GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0; + public static final int GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1; + public static final int GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2; + public static final int GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3; + public static final int GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4; + public static final int GL_X_EXT = 0x87D5; + public static final int GL_Y_EXT = 0x87D6; + public static final int GL_Z_EXT = 0x87D7; + public static final int GL_W_EXT = 0x87D8; + public static final int GL_NEGATIVE_X_EXT = 0x87D9; + public static final int GL_NEGATIVE_Y_EXT = 0x87DA; + public static final int GL_NEGATIVE_Z_EXT = 0x87DB; + public static final int GL_NEGATIVE_W_EXT = 0x87DC; + public static final int GL_ZERO_EXT = 0x87DD; + public static final int GL_ONE_EXT = 0x87DE; + public static final int GL_NEGATIVE_ONE_EXT = 0x87DF; + public static final int GL_NORMALIZED_RANGE_EXT = 0x87E0; + public static final int GL_FULL_RANGE_EXT = 0x87E1; + public static final int GL_CURRENT_VERTEX_EXT = 0x87E2; + public static final int GL_MVP_MATRIX_EXT = 0x87E3; + public static final int GL_VARIANT_VALUE_EXT = 0x87E4; + public static final int GL_VARIANT_DATATYPE_EXT = 0x87E5; + public static final int GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6; + public static final int GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7; + public static final int GL_VARIANT_ARRAY_EXT = 0x87E8; + public static final int GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9; + public static final int GL_INVARIANT_VALUE_EXT = 0x87EA; + public static final int GL_INVARIANT_DATATYPE_EXT = 0x87EB; + public static final int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC; + public static final int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; private EXTVertexShader() { } @@ -158,6 +159,7 @@ static native void initNativeStubs() throws LWJGLException; public static native void glBeginVertexShaderEXT(); + public static native void glEndVertexShaderEXT(); public static native void glBindVertexShaderEXT(int id); @@ -170,140 +172,144 @@ public static native void glShaderOp2EXT(int op, int res, int arg1, int arg2); - public static native void glShaderOp3EXT( - int op, - int res, - int arg1, - int arg2, - int arg3); + public static native void glShaderOp3EXT(int op, int res, int arg1, int arg2, int arg3); - public static native void glSwizzleEXT( - int res, - int in, - int outX, - int outY, - int outZ, - int outW); + public static native void glSwizzleEXT(int res, int in, int outX, int outY, int outZ, int outW); + + public static native void glWriteMaskEXT(int res, int in, int outX, int outY, int outZ, int outW); - public static native void glWriteMaskEXT( - int res, - int in, - int outX, - int outY, - int outZ, - int outW); public static native void glInsertComponentEXT(int res, int src, int num); public static native void glExtractComponentEXT(int res, int src, int num); - public static native int glGenSymbolsEXT( - int dataType, - int storageType, - int range, - int components); + public static native int glGenSymbolsEXT(int dataType, int storageType, int range, int components); + public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr); nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position()); } + public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position()<<1); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); } + public static void glSetInvariantEXT(int id, FloatBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position()<<2); + nglSetInvariantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); } + public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position()<<2); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2); } + private static native void nglSetInvariantEXT(int id, int type, Buffer pAddr, int pAddr_offset); public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr); nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, pAddr, pAddr.position()); } + public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position()<<1); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, pAddr, pAddr.position() << 1); } + public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position()<<2); + nglSetLocalConstantEXT(id, GL11.GL_FLOAT, pAddr, pAddr.position() << 2); } + public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) { BufferChecks.checkBuffer(pAddr); - nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position()<<2); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, pAddr, pAddr.position() << 2); } + private static native void nglSetLocalConstantEXT(int id, int type, Buffer pAddr, int pAddr_offset); public static void glVariantEXT(int id, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr); nglVariantbvEXT(id, pAddr, pAddr.position()); } + private static native void nglVariantbvEXT(int id, ByteBuffer pAddr, int pAddr_offset); public static void glVariantEXT(int id, ShortBuffer psAddr) { BufferChecks.checkBuffer(psAddr); nglVariantsvEXT(id, psAddr, psAddr.position()); } + private static native void nglVariantsvEXT(int id, ShortBuffer psAddr, int psAddr_offset); public static void glVariantEXT(int id, FloatBuffer pfAddr) { BufferChecks.checkBuffer(pfAddr); nglVariantfvEXT(id, pfAddr, pfAddr.position()); } + private static native void nglVariantfvEXT(int id, FloatBuffer pfAddr, int pfAddr_offset); public static void glVariantEXT(int id, IntBuffer piAddr) { BufferChecks.checkBuffer(piAddr); nglVariantivEXT(id, piAddr, piAddr.position()); } + private static native void nglVariantivEXT(int id, IntBuffer piAddr, int piAddr_offset); public static void glVariantuEXT(int id, ByteBuffer pAddr) { BufferChecks.checkBuffer(pAddr); nglVariantubvEXT(id, pAddr, pAddr.position()); } + private static native void nglVariantubvEXT(int id, ByteBuffer pAddr, int pAddr_offset); public static void glVariantuEXT(int id, ShortBuffer psAddr) { BufferChecks.checkBuffer(psAddr); nglVariantusvEXT(id, psAddr, psAddr.position()); } + private static native void nglVariantusvEXT(int id, ShortBuffer psAddr, int psAddr_offset); public static void glVariantuEXT(int id, IntBuffer piAddr) { BufferChecks.checkBuffer(piAddr); nglVariantuivEXT(id, piAddr, piAddr.position()); } + private static native void nglVariantuivEXT(int id, IntBuffer piAddr, int piAddr_offset); + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) { BufferChecks.checkDirect(pAddr); GLBufferChecks.ensureArrayVBOdisabled(); nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, pAddr, pAddr.position()); } + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) { BufferChecks.checkDirect(pAddr); GLBufferChecks.ensureArrayVBOdisabled(); - nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position()<<1); + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, pAddr, pAddr.position() << 1); } + public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) { BufferChecks.checkDirect(pAddr); GLBufferChecks.ensureArrayVBOdisabled(); - nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position()<<2); + nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, pAddr, pAddr.position() << 2); } + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) { BufferChecks.checkDirect(pAddr); GLBufferChecks.ensureArrayVBOdisabled(); - nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position()<<2); + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, pAddr, pAddr.position() << 2); } + private static native void nglVariantPointerEXT(int id, int type, int stride, Buffer pAddr, int pAddr_offset); + public static void glVariantPointerEXT(int id, int type, int stride, int buffer_offset) { GLBufferChecks.ensureArrayVBOenabled(); nglVariantPointerEXTVBO(id, type, stride, buffer_offset); } + private static native void nglVariantPointerEXTVBO(int id, int type, int stride, int buffer_offset); + public static native void glEnableVariantClientStateEXT(int id); public static native void glDisableVariantClientStateEXT(int id); @@ -317,59 +323,71 @@ public static native int glBindTextureUnitParameterEXT(int unit, int value); public static native int glBindParameterEXT(int value); + public static native boolean glIsVariantEnabledEXT(int id, int cap); public static void glGetVariantBooleanEXT(int id, int value, ByteBuffer pbData) { BufferChecks.checkDirect(pbData); nglGetVariantBooleanvEXT(id, value, pbData, pbData.position()); } + private static native void nglGetVariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset); + public static void glGetVariantIntegerEXT(int id, int value, IntBuffer piData) { BufferChecks.checkDirect(piData); nglGetVariantIntegervEXT(id, value, piData, piData.position()); } + private static native void nglGetVariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset); public static void glGetVariantFloatEXT(int id, int value, FloatBuffer pfData) { BufferChecks.checkDirect(pfData); nglGetVariantFloatvEXT(id, value, pfData, pfData.position()); } + private static native void nglGetVariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset); public static native ByteBuffer glGetVariantPointerEXT(int id, int value, int size); + public static void glGetInvariantBooleanEXT(int id, int value, ByteBuffer pbData) { BufferChecks.checkDirect(pbData); nglGetInvariantBooleanvEXT(id, value, pbData, pbData.position()); } + private static native void nglGetInvariantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset); public static void glGetInvariantIntegerEXT(int id, int value, IntBuffer piData) { BufferChecks.checkDirect(piData); nglGetInvariantIntegervEXT(id, value, piData, piData.position()); } + private static native void nglGetInvariantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset); public static void glGetInvariantFloatEXT(int id, int value, FloatBuffer pfData) { BufferChecks.checkDirect(pfData); nglGetInvariantFloatvEXT(id, value, pfData, pfData.position()); } + private static native void nglGetInvariantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset); public static void glGetLocalConstantBooleanEXT(int id, int value, ByteBuffer pbData) { BufferChecks.checkDirect(pbData); nglGetLocalConstantBooleanvEXT(id, value, pbData, pbData.position()); } + private static native void nglGetLocalConstantBooleanvEXT(int id, int value, ByteBuffer pbData, int pbData_offset); public static void glGetLocalConstantIntegerEXT(int id, int value, IntBuffer piData) { BufferChecks.checkDirect(piData); nglGetLocalConstantIntegervEXT(id, value, piData, piData.position()); } + private static native void nglGetLocalConstantIntegervEXT(int id, int value, IntBuffer piData, int piData_offset); public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pfData) { BufferChecks.checkDirect(pfData); nglGetLocalConstantFloatvEXT(id, value, pfData, pfData.position()); } + private static native void nglGetLocalConstantFloatvEXT(int id, int value, FloatBuffer pfData, int pfData_offset); } Index: ATIEnvmapBumpmap.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ATIEnvmapBumpmap.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ATIEnvmapBumpmap.java 31 Jul 2004 09:34:09 -0000 1.8 +++ ATIEnvmapBumpmap.java 25 Nov 2004 22:20:43 -0000 1.9 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -38,14 +38,15 @@ import org.lwjgl.BufferChecks; public final class ATIEnvmapBumpmap { - public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775; - public static final int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776; - public static final int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777; - public static final int GL_BUMP_TEX_UNITS_ATI = 0x8778; - public static final int GL_DUDV_ATI = 0x8779; - public static final int GL_DU8DV8_ATI = 0x877A; - public static final int GL_BUMP_ENVMAP_ATI = 0x877B; - public static final int GL_BUMP_TARGET_ATI = 0x877C; + + public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775; + public static final int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776; + public static final int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777; + public static final int GL_BUMP_TEX_UNITS_ATI = 0x8778; + public static final int GL_DUDV_ATI = 0x8779; + public static final int GL_DU8DV8_ATI = 0x877A; + public static final int GL_BUMP_ENVMAP_ATI = 0x877B; + public static final int GL_BUMP_TARGET_ATI = 0x877C; private ATIEnvmapBumpmap() { } @@ -56,23 +57,27 @@ BufferChecks.checkBuffer(pfParam); nglTexBumpParameterfvATI(pname, pfParam, pfParam.position()); } + private static native void nglTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset); public static void glTexBumpParameterATI(int pname, IntBuffer piParam) { BufferChecks.checkBuffer(piParam); nglTexBumpParameterivATI(pname, piParam, piParam.position()); } + private static native void nglTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset); public static void glGetTexBumpParameterATI(int pname, FloatBuffer pfParam) { BufferChecks.checkBuffer(pfParam); nglGetTexBumpParameterfvATI(pname, pfParam, pfParam.position()); } + private static native void nglGetTexBumpParameterfvATI(int pname, FloatBuffer pfParam, int pfParam_offset); public static void glGetTexBumpParameterATI(int pname, IntBuffer piParam) { BufferChecks.checkBuffer(piParam); nglGetTexBumpParameterivATI(pname, piParam, piParam.position()); } + private static native void nglGetTexBumpParameterivATI(int pname, IntBuffer piParam, int piParam_offset); } Index: ARBShaderObjects.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/ARBShaderObjects.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- ARBShaderObjects.java 29 Oct 2004 19:43:16 -0000 1.12 +++ ARBShaderObjects.java 25 Nov 2004 22:20:43 -0000 1.13 @@ -40,6 +40,7 @@ import org.lwjgl.BufferChecks; public final class ARBShaderObjects { + /* * Accepted by the <pname> argument of GetHandleARB: */ @@ -256,8 +257,7 @@ nglUniformMatrix2fvARB(location, matrices.remaining() >> 2, transpose, matrices, matrices.position()); } - private static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose, - FloatBuffer matrices, int matricesOffset); + private static native void nglUniformMatrix2fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset); // --------------------------- // --------------------------- @@ -266,8 +266,7 @@ nglUniformMatrix3fvARB(location, matrices.remaining() / (3 * 3), transpose, matrices, matrices.position()); } - private static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose, - FloatBuffer matrices, int matricesOffset); + private static native void nglUniformMatrix3fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset); // --------------------------- // --------------------------- @@ -276,8 +275,7 @@ nglUniformMatrix4fvARB(location, matrices.remaining() >> 4, transpose, matrices, matrices.position()); } - private static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose, - FloatBuffer matrices, int matricesOffset); + private static native void nglUniformMatrix4fvARB(int location, int count, boolean transpose, FloatBuffer matrices, int matricesOffset); // --------------------------- // --------------------------- @@ -309,9 +307,7 @@ } } - private static native void nglGetInfoLogARB(int obj, int maxLength, - IntBuffer length, int lengthOffset, - ByteBuffer infoLog, int infoLogOffset); + private static native void nglGetInfoLogARB(int obj, int maxLength, IntBuffer length, int lengthOffset, ByteBuffer infoLog, int infoLogOffset); // --------------------------- // --------------------------- @@ -326,14 +322,12 @@ } } - private static native void nglGetAttachedObjectsARB(int containerObj, int maxCount, - IntBuffer count, int countOffset, IntBuffer obj, int objOffset); + private static native void nglGetAttachedObjectsARB(int containerObj, int maxCount, IntBuffer count, int countOffset, IntBuffer obj, int objOffset); // --------------------------- // --------------------------- /** - * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a - * <b>null-terminated</b> string. + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a <b>null-terminated</b> string. * * @param programObj * @param name @@ -349,8 +343,7 @@ // --------------------------- // --------------------------- - public static void glGetActiveUniformARB(int programObj, int index, - IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + public static void glGetActiveUniformARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { if ( size.remaining() == 0 ) throw new BufferOverflowException(); @@ -358,22 +351,16 @@ throw new BufferOverflowException(); if ( length == null ) - nglGetActiveUniformARB(programObj, index, name.remaining(), null, -1, - size, size.position(), type, type.position(), name, name.position()); + nglGetActiveUniformARB(programObj, index, name.remaining(), null, -1, size, size.position(), type, type.position(), name, name.position()); else { if ( length.remaining() == 0 ) throw new BufferOverflowException(); - nglGetActiveUniformARB(programObj, index, name.remaining(), length, length.position(), - size, size.position(), type, type.position(), name, name.position()); + nglGetActiveUniformARB(programObj, index, name.remaining(), length, length.position(), size, size.position(), type, type.position(), name, name.position()); } } - private static native void nglGetActiveUniformARB(int programObj, int index, int maxLength, - IntBuffer length, int lengthOffset, - IntBuffer size, int sizeOffset, - IntBuffer type, int typeOffset, - ByteBuffer name, int nameOffset); + private static native void nglGetActiveUniformARB(int programObj, int index, int maxLength, IntBuffer length, int lengthOffset, IntBuffer size, int sizeOffset, IntBuffer type, int typeOffset, ByteBuffer name, int nameOffset); // --------------------------- // --------------------------- @@ -401,8 +388,7 @@ } } - private static native void nglGetShaderSourceARB(int obj, int maxLength, - IntBuffer length, int lengthOffset, ByteBuffer source, int sourceOffset); + private static native void nglGetShaderSourceARB(int obj, int maxLength, IntBuffer length, int lengthOffset, ByteBuffer source, int sourceOffset); // --------------------------- } Index: EXTTextureFilterAnisotropic.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- EXTTextureFilterAnisotropic.java 31 Jul 2004 09:34:09 -0000 1.4 +++ EXTTextureFilterAnisotropic.java 25 Nov 2004 22:20:44 -0000 1.5 @@ -1,39 +1,40 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.opengl; public final class EXTTextureFilterAnisotropic { - public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; - public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + + public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; + public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; private EXTTextureFilterAnisotropic() { } Index: NVTextureEnvCombine4.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVTextureEnvCombine4.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NVTextureEnvCombine4.java 31 Jul 2004 09:34:09 -0000 1.4 +++ NVTextureEnvCombine4.java 25 Nov 2004 22:20:44 -0000 1.5 @@ -1,42 +1,43 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.opengl; public final class NVTextureEnvCombine4 { - public static final int GL_COMBINE4_NV = 0x8503; - public static final int GL_SOURCE3_RGB_NV = 0x8583; - public static final int GL_SOURCE3_ALPHA_NV = 0x858B; - public static final int GL_OPERAND3_RGB_NV = 0x8593; - public static final int GL_OPERAND3_ALPHA_NV = 0x859B; + + public static final int GL_COMBINE4_NV = 0x8503; + public static final int GL_SOURCE3_RGB_NV = 0x8583; + public static final int GL_SOURCE3_ALPHA_NV = 0x858B; + public static final int GL_OPERAND3_RGB_NV = 0x8593; + public static final int GL_OPERAND3_ALPHA_NV = 0x859B; private NVTextureEnvCombine4() { } Index: NVFence.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/NVFence.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- NVFence.java 31 Jul 2004 09:34:09 -0000 1.9 +++ NVFence.java 25 Nov 2004 22:20:44 -0000 1.10 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY... [truncated message content] |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:19:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10521 Modified Files: GL11.java GL12.java Log Message: glTexImageXD now accept null buffers Index: GL11.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL11.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- GL11.java 9 Nov 2004 21:29:17 -0000 1.21 +++ GL11.java 25 Nov 2004 22:18:29 -0000 1.22 @@ -739,7 +739,7 @@ BufferChecks.checkDirect(lists); nglCallLists(lists.remaining(), GL_UNSIGNED_SHORT, lists, lists.position() << 1); } - public static void glCallLists(int n, IntBuffer lists) { + public static void glCallLists(IntBuffer lists) { BufferChecks.checkDirect(lists); nglCallLists(lists.remaining(), GL_UNSIGNED_INT, lists, lists.position() << 2); } @@ -1274,33 +1274,66 @@ public static native void glVertex4f(float x, float y, float z, float w); public static native void glVertex4i(int x, int y, int z, int w); public static native void glTranslatef(float x, float y, float z); - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position()); + + // --------------------------- + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border)); + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() : 0); } - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 1); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 1); + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0); } - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 2); + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } - public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 2); - nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage1DStorage(format, type, width, border) >> 2); + nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } - private static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels, int pixels_offset); + private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + + // --------------------------- + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() : 0); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 1); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 2); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage2DStorage(format, type, width, height, border) >> 2); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); + } + private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + + // --------------------------- public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position()); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 1); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 1); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1) >> 2); nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); } public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) { @@ -1308,6 +1341,28 @@ nglTexSubImage1D(target, level, xoffset, width, format, type, pixels, pixels.position() << 2); } private static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + + // --------------------------- + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position()); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 1); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1) >> 2); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels.position() << 2); + } + private static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + public static native void glTexParameterf(int target, int pname, float param); public static native void glTexParameteri(int target, int pname, int param); public static void glTexParameter(int target, int pname, FloatBuffer param) { @@ -1320,40 +1375,7 @@ nglTexParameteriv(target, pname, param, param.position()); } private static native void nglTexParameteriv(int target, int pname, IntBuffer param, int param_position); - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)); - nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position()); - } - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>1); - nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 1); - } - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); - nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 2); - } - public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, 1)>>2); - nglTexImage2D(target, level, internalformat, width, height, border, format, type, pixels, pixels.position() << 2); - } - private static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels, int pixels_offset); - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)); - nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position()); - } - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>1); - nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 1); - } - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); - nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 2); - } - public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, 1, 1)>>2); - nglTexImage1D(target, level, internalformat, width, border, format, type, pixels, pixels.position() << 2); - } - private static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, Buffer pixels, int pixels_offset); + public static native void glTexGenf(int coord, int pname, float param); public static void glTexGen(int coord, int pname, FloatBuffer params) { BufferChecks.checkBuffer(params); Index: GL12.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/GL12.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- GL12.java 20 Aug 2004 06:22:53 -0000 1.15 +++ GL12.java 25 Nov 2004 22:18:29 -0000 1.16 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -42,54 +42,55 @@ /** * $Id$ - * + * <p/> * The core OpenGL1.2.1 API, with the imaging subset. - * + * * @author cix_foo <ci...@us...> * @version $Revision$ */ public final class GL12 { + /* Error codes */ - public static final int GL_TABLE_TOO_LARGE = 0x8031; + public static final int GL_TABLE_TOO_LARGE = 0x8031; /* Enums */ - public static final int GL_PACK_SKIP_IMAGES = 0x806B; - public static final int GL_PACK_IMAGE_HEIGHT = 0x806C; - public static final int GL_UNPACK_SKIP_IMAGES = 0x806D; - public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E; - public static final int GL_TEXTURE_3D = 0x806F; - public static final int GL_PROXY_TEXTURE_3D = 0x8070; - public static final int GL_TEXTURE_DEPTH = 0x8071; - public static final int GL_TEXTURE_WRAP_R = 0x8072; - public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073; - public static final int GL_BGR = 0x80E0; - public static final int GL_BGRA = 0x80E1; - public static final int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; - public static final int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; - public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; - public static final int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; - public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; - public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; - public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; - public static final int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; - public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; - public static final int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; - public static final int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; - public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; - public static final int GL_RESCALE_NORMAL = 0x803A; - public static final int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; - public static final int GL_SINGLE_COLOR = 0x81F9; - public static final int GL_SEPARATE_SPECULAR_COLOR = 0x81FA; - public static final int GL_CLAMP_TO_EDGE = 0x812F; - public static final int GL_TEXTURE_MIN_LOD = 0x813A; - public static final int GL_TEXTURE_MAX_LOD = 0x813B; - public static final int GL_TEXTURE_BASE_LEVEL = 0x813C; - public static final int GL_TEXTURE_MAX_LEVEL = 0x813D; - public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8; - public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9; - public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; - public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; + public static final int GL_PACK_SKIP_IMAGES = 0x806B; + public static final int GL_PACK_IMAGE_HEIGHT = 0x806C; + public static final int GL_UNPACK_SKIP_IMAGES = 0x806D; + public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E; + public static final int GL_TEXTURE_3D = 0x806F; + public static final int GL_PROXY_TEXTURE_3D = 0x8070; + public static final int GL_TEXTURE_DEPTH = 0x8071; + public static final int GL_TEXTURE_WRAP_R = 0x8072; + public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073; + public static final int GL_BGR = 0x80E0; + public static final int GL_BGRA = 0x80E1; + public static final int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; + public static final int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; + public static final int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + public static final int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; + public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; + public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; + public static final int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + public static final int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; + public static final int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; + public static final int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; + public static final int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; + public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + public static final int GL_RESCALE_NORMAL = 0x803A; + public static final int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; + public static final int GL_SINGLE_COLOR = 0x81F9; + public static final int GL_SEPARATE_SPECULAR_COLOR = 0x81FA; + public static final int GL_CLAMP_TO_EDGE = 0x812F; + public static final int GL_TEXTURE_MIN_LOD = 0x813A; + public static final int GL_TEXTURE_MAX_LOD = 0x813B; + public static final int GL_TEXTURE_BASE_LEVEL = 0x813C; + public static final int GL_TEXTURE_MAX_LEVEL = 0x813D; + public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8; + public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9; + public static final int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; + public static final int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; private GL12() { } @@ -101,56 +102,80 @@ GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, indices, indices.position()); } + public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) { BufferChecks.checkDirect(indices); GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, indices, indices.position() << 1); } + public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) { BufferChecks.checkDirect(indices); GLBufferChecks.ensureElementVBOdisabled(); nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, indices, indices.position() << 2); } + private static native void nglDrawRangeElements(int mode, int start, int end, int count, int type, Buffer indices, int indices_offset); + public static void glDrawRangeElements(int mode, int start, int end, int count, int type, int buffer_offset) { GLBufferChecks.ensureElementVBOenabled(); nglDrawRangeElementsVBO(mode, start, end, count, type, buffer_offset); } + private static native void nglDrawRangeElementsVBO(int mode, int start, int end, int count, int type, int buffer_offset); + + // --------------------------- public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); - nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position()); + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(format, type, width, height, depth, border)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() : 0); } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); - nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 1); + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(format, type, width, height, depth, border) >> 1); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 1 : 0); } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); - nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2); + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(format, type, width, height, depth, border) >> 2); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); - nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels.position() << 2); + if ( pixels != null ) + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateTexImage3DStorage(format, type, width, height, depth, border) >> 2); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels, pixels != null ? pixels.position() << 2 : 0); } + private static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + + // --------------------------- public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position()); } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>1); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth) >> 1); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 1); } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth) >> 2); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2); } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { - BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth)>>2); + BufferChecks.checkBuffer(pixels, GLBufferChecks.calculateImageStorage(format, type, width, height, depth) >> 2); nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels.position() << 2); } + private static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, Buffer pixels, int pixels_offset); + // --------------------------- + public static native void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); } |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:17:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10264 Modified Files: GL.java GLImpl.java IGL.java Log Message: Code cleanup Index: GLImpl.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/GLImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GLImpl.java 15 Sep 2004 16:07:42 -0000 1.5 +++ GLImpl.java 25 Nov 2004 22:17:33 -0000 1.6 @@ -468,11 +468,10 @@ } /** - * @param n * @param lists */ - public void glCallLists(int n, IntBuffer lists) { - GL.glCallLists(n, lists); + public void glCallLists(IntBuffer lists) { + GL.glCallLists(lists); } /** Index: GL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/GL.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- GL.java 9 Sep 2004 23:50:11 -0000 1.5 +++ GL.java 25 Nov 2004 22:17:33 -0000 1.6 @@ -45,9 +45,7 @@ */ public class GL { - /** - * C'tor - */ + /** C'tor */ public GL() { } @@ -67,16 +65,12 @@ [...2414 lines suppressed...] * @return */ public static int glGetAttribLocation(int program, ByteBuffer name) { return GL20.glGetAttribLocation(program, name); } - /** - * @param buffers - */ + /** @param buffers */ public static void glDrawBuffers(IntBuffer buffers) { GL20.glDrawBuffers(buffers); } @@ -7208,4 +6336,4 @@ GL20.glStencilOpSeparate(face, sfail, dpfail, dppass); } -} +} \ No newline at end of file Index: IGL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/util/IGL.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- IGL.java 9 Sep 2004 23:50:11 -0000 1.4 +++ IGL.java 25 Nov 2004 22:17:33 -0000 1.5 @@ -99,10 +99,9 @@ void glCallLists(ByteBuffer lists); /** - * @param n * @param lists */ - void glCallLists(int n, IntBuffer lists); + void glCallLists(IntBuffer lists); /** * @param lists |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:17:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10092 Modified Files: Keyboard.java Mouse.java Log Message: Code cleanup Index: Keyboard.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Keyboard.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- Keyboard.java 11 Nov 2004 16:03:12 -0000 1.54 +++ Keyboard.java 25 Nov 2004 22:16:46 -0000 1.55 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -50,21 +50,21 @@ * keys, or read all the keyboard presses / releases since the last read. * Buffering must be explicitly enabled; the size of the buffer is determined * by the native implementation at its discretion. - * + * * @author cix_foo <ci...@us...> * @author elias_naur <eli...@us...> * @author Brian Matzon <br...@ma...> * @version $Revision$ */ public class Keyboard { - /** + /** * The special character meaning that no * character was translated for the event. */ public static final char CHAR_NONE = '\0'; - /** - * The special keycode meaning that only the + /** + * The special keycode meaning that only the * translated character is valid. */ public static final int KEY_NONE = 0x00; @@ -197,17 +197,18 @@ public static final int STATE_OFF = 1; public static final int STATE_UNKNOWN = 2; - public final static int KEYBOARD_SIZE = 256; + public static final int KEYBOARD_SIZE = 256; /** Buffer size in events */ - private final static int BUFFER_SIZE = 50; + private static final int BUFFER_SIZE = 50; /** Event size in elements */ - private final static int EVENT_SIZE = 3; + private static final int EVENT_SIZE = 3; /** Key names */ private static final String[] keyName = new String[255]; private static final Map keyMap = new HashMap(253); - private static int counter = 0; + private static int counter; + static { // Use reflection to find out key names Field[] field = Keyboard.class.getFields(); @@ -218,7 +219,7 @@ && Modifier.isFinal(field[i].getModifiers()) && field[i].getType().equals(int.class) && field[i].getName().startsWith("KEY_")) { - + int key = field[i].getInt(null); String name = field[i].getName().substring(4); keyName[key] = name; @@ -229,18 +230,18 @@ } } catch (Exception e) { } - + } - + /** The number of keys supported */ private static final int keyCount = counter; /** Has the keyboard been created? */ private static boolean created; - + /** The keys status from the last poll */ private static final ByteBuffer keyDownBuffer = BufferUtils.createByteBuffer(KEYBOARD_SIZE); - + /** * The key events from the last read: a sequence of pairs of key number, * followed by state. If translation is enabled, the state is followed by @@ -253,22 +254,22 @@ /** The current keyboard character being examined */ private static char eventCharacter; - + /** The current keyboard event key being examined */ private static int eventKey; - + /** The current state of the key being examined in the event queue */ private static boolean eventState; - + /** One time initialization */ private static boolean initialized; - + /** * Keyboard cannot be constructed. */ private Keyboard() { } - + /** * Static initialization */ @@ -278,11 +279,11 @@ Sys.initialize(); initialized = true; } - + /** * "Create" the keyboard. The display must first have been created. The * reason for this is so the keyboard has a window to "focus" in. - * + * * @throws LWJGLException if the keyboard could not be created for any reason */ public static void create() throws LWJGLException { @@ -295,7 +296,7 @@ Display.getImplementation().createKeyboard(); created = true; } - + /** * @return true if the keyboard has been created */ @@ -312,23 +313,23 @@ created = false; Display.getImplementation().destroyKeyboard(); } - + /** * Polls the keyboard for its current state. Access the polled values using the * <code>isKeyDown</code> method. * By using this method, it is possible to "miss" keyboard keys if you don't - * poll fast enough. To receive all events, enable buffering by calling + * poll fast enough. To receive all events, enable buffering by calling * <code>enableBuffer</code>. - * + * * This method also reads all keyboard events since last read if keyboard buffering is enabled. * To use these values, you have to call <code>next</code> for each event you - * want to read. You can query which key caused the event by using + * want to read. You can query which key caused the event by using * <code>getEventKey</code>. To get the state of that key, for that event, use * <code>getEventKeyState</code> - finally use <code>getEventCharacter</code> to get the * character for that event. * - * @see org.lwjgl.input.Keyboard#isKeyDown(int key) - * @see org.lwjgl.input.Keyboard#isStateKeySet(int key) + * @see org.lwjgl.input.Keyboard#isKeyDown(int key) + * @see org.lwjgl.input.Keyboard#isStateKeySet(int key) * @see org.lwjgl.input.Keyboard#next() * @see org.lwjgl.input.Keyboard#enableBuffer() * @see org.lwjgl.input.Keyboard#getEventKey() @@ -342,14 +343,14 @@ if (readBuffer != null) read(); } - + private static void read() { readBuffer.compact(); int numEvents = Display.getImplementation().readKeyboard(readBuffer, readBuffer.position()); readBuffer.position(readBuffer.position() + numEvents*EVENT_SIZE); readBuffer.flip(); } - + /** * Enable keyboard translation. Must be called after the keyboard is created, * and keyboard buffering must be enabled. @@ -362,7 +363,7 @@ Display.getImplementation().enableTranslation(); translationEnabled = true; } - + /** * Enable keyboard buffering. Must be called after the keyboard is created. */ @@ -373,7 +374,7 @@ readBuffer.limit(0); Display.getImplementation().enableKeyboardBuffer(); } - + /** * Checks to see if a key is down. * @param key Keycode to check @@ -384,14 +385,14 @@ throw new IllegalStateException("Keyboard must be created before you can query key state"); return keyDownBuffer.get(key) != 0; } - + /** * @return true if buffering is enabled */ public static boolean isBuffered() { return readBuffer != null; } - + /** * @return true if translation is enabled */ @@ -401,7 +402,7 @@ /** * Checks whether one of the state keys are "active" - * + * * @param key State key to test (KEY_CAPITAL | KEY_NUMLOCK | KEY_SYSRQ) * @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown */ @@ -419,7 +420,7 @@ public static String getKeyName(int key) { return keyName[key]; } - + /** * Get's a key's index. If the key is unrecognised then KEY_NONE is returned. * @param keyName The key name @@ -431,7 +432,7 @@ else return ret.intValue(); } - + /** * Gets the number of keyboard events waiting after doing a buffer enabled poll(). * @return the number of keyboard events @@ -441,13 +442,13 @@ throw new IllegalStateException("Keyboard must be created before you can read events"); return readBuffer.remaining()/EVENT_SIZE; } - + /** - * Gets the next keyboard event. You can query which key caused the event by using + * Gets the next keyboard event. You can query which key caused the event by using * <code>getEventKey</code>. To get the state of that key, for that event, use * <code>getEventKeyState</code> - finally use <code>getEventCharacter</code> to get the * character for that event. - * + * * @see org.lwjgl.input.Keyboard#getEventKey() * @see org.lwjgl.input.Keyboard#getEventKeyState() * @see org.lwjgl.input.Keyboard#getEventCharacter() @@ -458,7 +459,7 @@ throw new IllegalStateException("Keyboard must be created before you can read events"); if (readBuffer == null) throw new IllegalStateException("Event buffering must be enabled before you can read events"); - + if (readBuffer.hasRemaining()) { eventKey = readBuffer.get() & 0xFF; eventState = readBuffer.get() != 0; @@ -494,7 +495,7 @@ /** * Gets the state of the tkey that generated the * current event - * + * * @return True if key was down, or false if released */ public static boolean getEventKeyState() { Index: Mouse.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/Mouse.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- Mouse.java 12 Nov 2004 15:01:26 -0000 1.69 +++ Mouse.java 25 Nov 2004 22:16:46 -0000 1.70 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -46,12 +46,12 @@ * <br> * A raw Mouse interface. This can be used to poll the current state of the * mouse buttons, and determine the mouse movement delta since the last poll. - * + * * n buttons supported, n being a native limit. A scrolly wheel is also * supported, if one such is available. Movement is reported as delta from * last position or as an absolute position. If the window has been created * the absolute position will be clamped to 0 - Display (width | height) - * + * * @author cix_foo <ci...@us...> * @author elias_naur <eli...@us...> * @author Brian Matzon <br...@ma...> @@ -60,17 +60,17 @@ public class Mouse { /** 1 bit transparency for native cursor */ - public final static int CURSOR_ONE_BIT_TRANSPARENCY = 1; + public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; /** 8 bit alhpa native cursor */ - public final static int CURSOR_8_BIT_ALPHA = 2; + public static final int CURSOR_8_BIT_ALPHA = 2; /** animation native cursor */ - public final static int CURSOR_ANIMATION = 4; + public static final int CURSOR_ANIMATION = 4; /** Mouse constraint */ private static int width, height; - + /** Has the mouse been created? */ private static boolean created; @@ -99,7 +99,7 @@ private static int buttonCount = -1; /** Does this mouse support a scroll wheel */ - private static boolean hasWheel = false; + private static boolean hasWheel; /** The current native cursor, if any */ private static Cursor currentCursor; @@ -114,14 +114,14 @@ private static boolean initialized; /** The mouse button events from the last read */ - private static IntBuffer readBuffer = null; + private static IntBuffer readBuffer; /** The current mouse event button being examined */ private static int eventButton; /** The current state of the button being examined in the event queue */ private static boolean eventState; - + /** The current delta of the mouse in the event queue */ private static int event_dx; private static int event_dy; @@ -131,9 +131,9 @@ private static int event_y; /** Buffer size in events */ - private final static int BUFFER_SIZE = 50; + private static final int BUFFER_SIZE = 50; /** Event size in elements */ - private final static int EVENT_SIZE = 5; + private static final int EVENT_SIZE = 5; private static boolean isGrabbed; @@ -157,7 +157,7 @@ * The CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy, * the CURSOR_8_BIT_ALPHA indicates support for 8 bit alpha and CURSOR_ANIMATION indicates * support for cursor animations. - * + * * @return A bit mask with native cursor capabilities. */ public static int getNativeCursorCaps() { @@ -242,12 +242,12 @@ if (readBuffer != null) readBuffer.clear(); } - + /** * "Create" the mouse. The display must first have been created. * Initially, the mouse is not grabbed and the delta values are reported * with respect to the center of the display. - * + * * @throws LWJGLException if the mouse could not be created for any reason */ public static void create() throws LWJGLException { @@ -299,24 +299,24 @@ * Polls the mouse for its current state. Access the polled values using the * get<value> methods. * By using this method, it is possible to "miss" mouse click events if you don't - * poll fast enough. To receive all button events, enable buffering by calling + * poll fast enough. To receive all button events, enable buffering by calling * <code>enableBuffer</code>. - * + * * If buffering is enabled, this method also reads all button events since last read. * To use these values, you have to call <code>next</code> for each event you - * want to read. You can query which button caused the event by using + * want to read. You can query which button caused the event by using * <code>getEventButton</code>. To get the state of that button, for that event, use * <code>getEventButtonState</code>. - * + * * @see org.lwjgl.input.Mouse#next() * @see org.lwjgl.input.Mouse#getEventButton() * @see org.lwjgl.input.Mouse#getEventButtonState() - * @see org.lwjgl.input.Mouse#isButtonDown(int button) - * @see org.lwjgl.input.Mouse#getX() - * @see org.lwjgl.input.Mouse#getY() - * @see org.lwjgl.input.Mouse#getDX() - * @see org.lwjgl.input.Mouse#getDY() - * @see org.lwjgl.input.Mouse#getDWheel() + * @see org.lwjgl.input.Mouse#isButtonDown(int button) + * @see org.lwjgl.input.Mouse#getX() + * @see org.lwjgl.input.Mouse#getY() + * @see org.lwjgl.input.Mouse#getDX() + * @see org.lwjgl.input.Mouse#getDY() + * @see org.lwjgl.input.Mouse#getDWheel() * @see org.lwjgl.input.Mouse#enableBuffer() */ public static void poll() { @@ -354,7 +354,7 @@ /** * See if a particular mouse button is down. - * + * * @param button The index of the button you wish to test (0..getButtonCount-1) * @return true if the specified button is down */ @@ -401,7 +401,7 @@ } /** - * Gets the next mouse event. You can query which button caused the event by using + * Gets the next mouse event. You can query which button caused the event by using * <code>getEventButton()</code> (if any). To get the state of that key, for that event, use * <code>getEventButtonState</code>. To get the current mouse delta values use <code>getEventDX()</code>, * <code>getEventDY()</code> and <code>getEventDZ()</code>. @@ -494,7 +494,7 @@ /** * Retrieves the absolute position. If the Display has been created * x will be clamped to 0...width-1. - * + * * @return Absolute x axis position of mouse */ public static int getX() { @@ -548,7 +548,7 @@ public static int getButtonCount() { return buttonCount; } - + /** * @return Whether or not this mouse has wheel support */ @@ -564,7 +564,7 @@ } /** - * Sets whether or not the mouse has grabbed the cursor + * Sets whether or not the mouse has grabbed the cursor * (and thus hidden). If grab is false, the getX() and getY() * will return delta movement in pixels clamped to the display * dimensions, from the center of the display. @@ -581,7 +581,7 @@ /** * Updates the cursor, so that animation can be changed if needed. - * This method is called automatically by the window on its update, and + * This method is called automatically by the window on its update, and * shouldn't be called otherwise */ public static void updateCursor() { |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:16:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9997 Modified Files: BufferChecks.java PlatformAdapter.java Sys.java Log Message: Code cleanup Index: PlatformAdapter.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/PlatformAdapter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- PlatformAdapter.java 17 Oct 2004 17:25:29 -0000 1.4 +++ PlatformAdapter.java 25 Nov 2004 22:16:10 -0000 1.5 @@ -48,13 +48,13 @@ * @param title * @param message */ - public void alert(String title, String message); - + void alert(String title, String message); + /** * Get the contents of the system clipboard. The system might not have a clipboard * (particularly if it doesn't even have a keyboard) in which case we return null. * Otherwise we return a String, which may be the empty string "". * @return a String, or null if there is no system clipboard. - */ - public String getClipboard(); + */ + String getClipboard(); } Index: BufferChecks.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/BufferChecks.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BufferChecks.java 29 Jul 2004 11:20:42 -0000 1.1 +++ BufferChecks.java 25 Nov 2004 22:16:10 -0000 1.2 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -43,7 +43,7 @@ * check buffer boundaries in general. If there is unsufficient space * in the buffer when the call is made then a buffer overflow would otherwise * occur and cause unexpected behaviour, a crash, or worse, a security risk. - * + * * @author cix_foo <ci...@us...> * @author elias_naur <eli...@us...> * @version $Revision$ @@ -66,7 +66,7 @@ checkDirect(buf); } } - + public static void checkDirectOrNull(FloatBuffer buf) { if (buf != null) { checkDirect(buf); @@ -78,19 +78,19 @@ checkDirect(buf); } } - + public static void checkDirectOrNull(IntBuffer buf) { if (buf != null) { checkDirect(buf); } } - + public static void checkDirectOrNull(DoubleBuffer buf) { if (buf != null) { checkDirect(buf); } } - + /** * Helper methods to ensure a buffer is direct (and, implicitly, non-null). */ @@ -108,13 +108,13 @@ else throw new IllegalStateException("Unsupported buffer type"); } - + public static void checkDirect(ByteBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("ByteBuffer is not direct"); } } - + public static void checkDirect(FloatBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("FloatBuffer is not direct"); @@ -126,28 +126,28 @@ throw new IllegalArgumentException("ShortBuffer is not direct"); } } - + public static void checkDirect(IntBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("IntBuffer is not direct"); } } - + public static void checkDirect(DoubleBuffer buf) { if (!buf.isDirect()) { throw new IllegalArgumentException("IntBuffer is not direct"); } } - + /** * Helper method to ensure a buffer is big enough to receive data from a * glGet* operation. - * + * * @param buf * The buffer to check * @param size * The minimum buffer size - * @throws BufferOverflowException + * @throws IllegalArgumentException */ private static void checkBufferSize(Buffer buf, int size) { if (buf.remaining() < size) { @@ -185,10 +185,10 @@ * glGet* operation. To avoid unnecessarily complex buffer size checking * we've just set the bar artificially high and insist that any receiving * buffer has at least 4 remaining(). - * + * * @param buf * The buffer to check - * @throws BufferOverflowException + * @throws IllegalArgumentException */ public static void checkBuffer(ByteBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); @@ -197,15 +197,15 @@ public static void checkBuffer(ShortBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } - + public static void checkBuffer(FloatBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } - + public static void checkBuffer(IntBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } - + public static void checkBuffer(DoubleBuffer buf) { checkBuffer(buf, DEFAULT_BUFFER_SIZE); } Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- Sys.java 22 Nov 2004 21:54:06 -0000 1.61 +++ Sys.java 25 Nov 2004 22:16:10 -0000 1.62 @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ @@ -43,11 +43,12 @@ * $Id$ * * System class (named Sys so as not to conflict with java.lang.System) - * + * * @author cix_foo <ci...@us...> * @version $Revision$ */ public final class Sys { + public static final String VERSION = "0.93"; /** Low process priority. @see #setProcessPriority() */ @@ -58,7 +59,7 @@ * JVM has when it is started up normally. Note that if the JVM is started * inside a process which is already a different priority then this will not * be the initial priority. - * + * * @see #setProcessPriority(int) */ public static final int NORMAL_PRIORITY = 0; @@ -72,9 +73,9 @@ * that this puts it at a higher priority than many OS critical tasks, such * as disk writes or mouse input and the like. Hence it is quite possible to * completely freeze your machine if you have an errant thread. - * + * * This priority is <strong>not</strong> recommended for gaming applications. - * + * * @see #setProcessPriority(int) */ public static final int REALTIME_PRIORITY = 2; @@ -84,13 +85,13 @@ /** The platform adapter class name */ private static String PLATFORM; - + /** * Debug flag. */ public static final boolean DEBUG = Boolean.getBoolean("org.lwjgl.Sys.debug"); - private static boolean initialized = false; + private static boolean initialized; static { initialize(); @@ -129,7 +130,7 @@ System.loadLibrary(LIBRARY_NAME); String native_version = getNativeLibraryVersion(); if (!native_version.equals(VERSION)) - throw new LinkageError("Version mismatch: jar version is '" + VERSION + + throw new LinkageError("Version mismatch: jar version is '" + VERSION + "', native libary version is '" + native_version + "'"); setDebug(DEBUG); @@ -153,11 +154,11 @@ * @return timer resolution in ticks per second or 0 if no timer is present. */ public static native long getTimerResolution(); - + /** * Gets the current value of the hires timer, in ticks. When the Sys class is first loaded * the hires timer is reset to 0. If no hires timer is present then this method will always - * return 0.<p><strong>NOTEZ BIEN</strong> that the hires timer WILL wrap around. + * return 0.<p><strong>NOTEZ BIEN</strong> that the hires timer WILL wrap around. * * @return the current hires time, in ticks (always >= 0) */ @@ -165,28 +166,28 @@ return ngetTime() & 0x7FFFFFFFFFFFFFFFL; } private static native long ngetTime(); - + /** * Set the process priority in a system independent way. Because of the various * differences in operating systems this might or might not have any effect or * the correct effect. - * + * * The default process priority is NORMAL_PRIORITY. - * + * * REALTIME_PRIORITY processes should theoretically be the maximum priority of * any process on the system and may have side effects on I/O and other fundamental * operating system functions - use with caution. - * + * * It is unlikely that any games will want to change the priority of the Java * process; but there are some other applications for this library which require * process priority adjustments, such as in soft-realtime graphics rendering * for broadcast television. - * + * * @param priority a priority class, which will be one of REALTIME_PRIORITY, * HIGH_PRIORITY, NORMAL_PRIORITY, or LOW_PRIORITY. */ public static native void setProcessPriority(int priority); - + /** * Attempt to display a modal alert to the user. This method should be used * when a game fails to initialize properly or crashes out losing its display @@ -227,7 +228,7 @@ } private static native void nAlert(String title, String message); - + /** * Open the system web browser and point it at the specified URL. It is recommended * that this not be called whilst your game is running, but on application exit in @@ -267,7 +268,7 @@ * clipboard (particularly if it doesn't even have a keyboard) in which case * we return null. Otherwise we return a String, which may be the empty * string "". - * + * * @return a String, or null if there is no system clipboard. */ public static String getClipboard() { @@ -280,6 +281,6 @@ return nGetClipboard(); } } - + private static native String nGetClipboard(); -} +} |
|
From: Ioannis T. <sp...@us...> - 2004-11-25 22:11:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8932 Modified Files: org_lwjgl_opengl_GL11.c org_lwjgl_opengl_GL12.c Log Message: glTexImageXD now accept null buffers Index: org_lwjgl_opengl_GL11.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL11.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_opengl_GL11.c 14 Nov 2004 10:42:16 -0000 1.3 +++ org_lwjgl_opengl_GL11.c 25 Nov 2004 22:11:16 -0000 1.4 @@ -1,35 +1,35 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * [...2081 lines suppressed...] /* @@ -2558,7 +2558,7 @@ static void JNICALL Java_org_lwjgl_opengl_GL11_glStencilMask(JNIEnv * env, jclass clazz, jint p0) { glStencilMask((GLint) p0); - + } /* @@ -2568,7 +2568,7 @@ static void JNICALL Java_org_lwjgl_opengl_GL11_glViewport(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3) { glViewport((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3); - + } #ifdef __cplusplus Index: org_lwjgl_opengl_GL12.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_opengl_GL12.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL12.c 10 Sep 2004 08:13:49 -0000 1.1 +++ org_lwjgl_opengl_GL12.c 25 Nov 2004 22:11:16 -0000 1.2 @@ -1,35 +1,35 @@ -/* +/* * Copyright (c) 2002-2004 LWJGL Project * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are + * modification, are permitted provided that the following conditions are * met: - * - * * Redistributions of source code must retain the above copyright + * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + /** * $Id$ * @@ -62,7 +62,7 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glDrawRangeElements(mode, start, end, count, type, address); - + } /* @@ -74,7 +74,7 @@ (JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jint buffer_offset) { glDrawRangeElements(mode, start, end, count, type, offsetToPointer(buffer_offset)); - + } /* @@ -85,9 +85,9 @@ static void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3D (JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject buffer, jint offset) { - const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); - glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, address); - + GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset); + glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, buffer_ptr); + } /* @@ -100,7 +100,7 @@ { const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer)); glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, address); - + } /* @@ -112,7 +112,7 @@ (JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); - + } #ifdef __cplusplus |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-22 21:54:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2581/src/java/org/lwjgl Modified Files: Sys.java Log Message: Now added URL encoding Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- Sys.java 22 Nov 2004 21:38:08 -0000 1.60 +++ Sys.java 22 Nov 2004 21:54:06 -0000 1.61 @@ -34,6 +34,7 @@ import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLEncoder; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display; @@ -250,7 +251,7 @@ Class basicServiceClass = Class.forName("javax.jnlp.BasicService"); Method showDocumentMethod = basicServiceClass.getMethod("showDocument", new Class[] {URL.class}); try { - Boolean ret = (Boolean) showDocumentMethod.invoke(basicService, new Object[] {new URL(url)}); + Boolean ret = (Boolean) showDocumentMethod.invoke(basicService, new Object[] {new URL(URLEncoder.encode(url, "utf8"))}); return ret.booleanValue(); } catch (MalformedURLException e) { e.printStackTrace(System.err); |
|
From: Elias N. <eli...@us...> - 2004-11-22 21:40:44
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31287/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java Log Message: Mac OS X: Implemented MacOSXDisplay.openURL() Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- MacOSXDisplay.java 22 Nov 2004 21:22:29 -0000 1.13 +++ MacOSXDisplay.java 22 Nov 2004 21:40:13 -0000 1.14 @@ -51,6 +51,7 @@ import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -375,8 +376,16 @@ return GL11.glGetString(GL11.GL_EXTENSIONS).indexOf("GL_APPLE_pixel_buffer") != -1 ? Pbuffer.PBUFFER_SUPPORTED : 0; } + /* Use the com.apple.eio.FileManager Mac OS X extension to show the given URL */ public boolean openURL(String url) { - return false; + try { + Class com_apple_eio_FileManager = Class.forName("com.apple.eio.FileManager"); + Method openURL_method = com_apple_eio_FileManager.getMethod("openURL", new Class[]{String.class}); + openURL_method.invoke(null, new Object[]{url}); + return true; + } catch (Exception e) { + return false; + } } /** |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-22 21:38:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30589/src/java/org/lwjgl Modified Files: Sys.java Log Message: Uses Webstart services for Sys.openURL now Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- Sys.java 22 Nov 2004 21:22:28 -0000 1.59 +++ Sys.java 22 Nov 2004 21:38:08 -0000 1.60 @@ -31,7 +31,9 @@ */ package org.lwjgl; -import java.io.IOException; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.Display; @@ -239,13 +241,32 @@ * @return false if we are CERTAIN the call has failed */ public static boolean openURL(String url) { - return Display.getImplementation().openURL(url); + // Attempt to use Webstart if we have it available + try { + // Lookup the javax.jnlp.BasicService object + Class serviceManagerClass = Class.forName("javax.jnlp.ServiceManager"); + Method lookupMethod = serviceManagerClass.getMethod("lookup", new Class[] {String.class}); + Object basicService = lookupMethod.invoke(serviceManagerClass, new Object[] {"javax.jnlp.BasicService"}); + Class basicServiceClass = Class.forName("javax.jnlp.BasicService"); + Method showDocumentMethod = basicServiceClass.getMethod("showDocument", new Class[] {URL.class}); + try { + Boolean ret = (Boolean) showDocumentMethod.invoke(basicService, new Object[] {new URL(url)}); + return ret.booleanValue(); + } catch (MalformedURLException e) { + e.printStackTrace(System.err); + return false; + } + } catch (Exception ue) { + return Display.getImplementation().openURL(url); + } } /** - * Get the contents of the system clipboard. The system might not have a clipboard - * (particularly if it doesn't even have a keyboard) in which case we return null. - * Otherwise we return a String, which may be the empty string "". + * Get the contents of the system clipboard. The system might not have a + * clipboard (particularly if it doesn't even have a keyboard) in which case + * we return null. Otherwise we return a String, which may be the empty + * string "". + * * @return a String, or null if there is no system clipboard. */ public static String getClipboard() { |
|
From: Elias N. <eli...@us...> - 2004-11-22 21:23:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26730/src/java/org/lwjgl Modified Files: Sys.java Log Message: Split up Sys.openURL into the platform specific DisplayImplementation Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Sys.java 24 Oct 2004 17:29:19 -0000 1.58 +++ Sys.java 22 Nov 2004 21:22:28 -0000 1.59 @@ -34,6 +34,7 @@ import java.io.IOException; import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; /** * $Id$ @@ -238,36 +239,8 @@ * @return false if we are CERTAIN the call has failed */ public static boolean openURL(String url) { - String osName = System.getProperty("os.name"); - if (osName.startsWith("Mac OS") || osName.startsWith("Windows")) { - // Mac and Windows both do this nicely from native code. - nOpenURL(url); - return true; - } - // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it - // right anyway. - - String[] browsers = {"mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"}; - - for (int i = 0; i < browsers.length; i ++) { - try { - Runtime.getRuntime().exec(new String[] { browsers[i], url }); - return true; - } catch (IOException e) { - // Ignore - e.printStackTrace(System.err); - } - } - - // Seems to have failed - return false; + return Display.getImplementation().openURL(url); } - - - /* - * Where necessary, we use a native implementation of openURL. - */ - private static native void nOpenURL(String url); /** * Get the contents of the system clipboard. The system might not have a clipboard |
|
From: Elias N. <eli...@us...> - 2004-11-22 21:23:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26730/src/java/org/lwjgl/opengl Modified Files: DisplayImplementation.java LinuxDisplay.java MacOSXDisplay.java Win32Display.java Log Message: Split up Sys.openURL into the platform specific DisplayImplementation Index: Win32Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Win32Display.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Win32Display.java 20 Nov 2004 16:46:43 -0000 1.4 +++ Win32Display.java 22 Nov 2004 21:22:29 -0000 1.5 @@ -102,4 +102,10 @@ public native void destroyCursor(Object cursorHandle); public native int getPbufferCaps(); + public boolean openURL(String url) { + nOpenURL(url); + return true; + } + + private native void nOpenURL(String url); } Index: DisplayImplementation.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/DisplayImplementation.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- DisplayImplementation.java 18 Nov 2004 12:10:26 -0000 1.3 +++ DisplayImplementation.java 22 Nov 2004 21:22:29 -0000 1.4 @@ -237,4 +237,6 @@ /* Pbuffer caps */ public int getPbufferCaps(); + + public boolean openURL(String url); } Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- MacOSXDisplay.java 22 Nov 2004 19:32:39 -0000 1.12 +++ MacOSXDisplay.java 22 Nov 2004 21:22:29 -0000 1.13 @@ -375,6 +375,10 @@ return GL11.glGetString(GL11.GL_EXTENSIONS).indexOf("GL_APPLE_pixel_buffer") != -1 ? Pbuffer.PBUFFER_SUPPORTED : 0; } + public boolean openURL(String url) { + return false; + } + /** * This class captures com.apple.eawt.ApplicationEvents through reflection * to enable compilation on other platforms than Mac OS X Index: LinuxDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- LinuxDisplay.java 20 Nov 2004 16:46:43 -0000 1.4 +++ LinuxDisplay.java 22 Nov 2004 21:22:29 -0000 1.5 @@ -41,6 +41,7 @@ import java.nio.ByteBuffer; import java.nio.FloatBuffer; import java.nio.IntBuffer; +import java.io.IOException; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; @@ -102,4 +103,24 @@ public native void destroyCursor(Object cursorHandle); public native int getPbufferCaps(); + + public boolean openURL(String url) { + // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it + // right anyway. + + String[] browsers = {"mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"}; + + for (int i = 0; i < browsers.length; i ++) { + try { + Runtime.getRuntime().exec(new String[] { browsers[i], url }); + return true; + } catch (IOException e) { + // Ignore + e.printStackTrace(System.err); + } + } + + // Seems to have failed + return false; + } } |
|
From: Elias N. <eli...@us...> - 2004-11-22 21:23:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26730/src/native/macosx Modified Files: org_lwjgl_Sys.c Log Message: Split up Sys.openURL into the platform specific DisplayImplementation Index: org_lwjgl_Sys.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/org_lwjgl_Sys.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_Sys.c 13 Nov 2004 21:06:37 -0000 1.2 +++ org_lwjgl_Sys.c 22 Nov 2004 21:22:29 -0000 1.3 @@ -94,28 +94,6 @@ { } -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL - (JNIEnv * env, jclass clazz, jstring url) -{ -/* char * urlString = GetStringNativeChars(env, url); - - OSStatus err; - ICInstance inst; - long startSel; - long endSel; - Str255 urlStr; - - CopyCStringToPascal(urlString, urlStr); - free(urlString); - err = ICStart(&inst, '????'); // Use your creator code if you have one! - if (err == noErr) { - startSel = 0; - endSel = urlStr[0]; - err = ICLaunchURL(inst, "\p", (char *) &urlStr[1], urlStr[0], &startSel, &endSel); - (void) ICStop(inst); - }*/ -} - JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_nGetClipboard (JNIEnv * env, jclass clazz) { |
|
From: Elias N. <eli...@us...> - 2004-11-22 21:22:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26730/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Split up Sys.openURL into the platform specific DisplayImplementation Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- org_lwjgl_Sys.cpp 14 Nov 2004 10:42:19 -0000 1.37 +++ org_lwjgl_Sys.cpp 22 Nov 2004 21:22:30 -0000 1.38 @@ -41,6 +41,7 @@ #include "Window.h" #include "org_lwjgl_Sys.h" +#include "org_lwjgl_opengl_Win32Display.h" #include "common_tools.h" #include <malloc.h> @@ -135,8 +136,8 @@ * Method: openURL * Signature: (Ljava/lang/String;)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL - (JNIEnv * env, jclass clazz, jstring url) +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Win32Display_nOpenURL + (JNIEnv * env, jobject self, jstring url) { char * urlString = GetStringNativeChars(env, url); |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-22 21:13:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24606/src/java/org/lwjgl/opengl Modified Files: Display.java Log Message: Centres windowed mode now. Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Display.java 22 Nov 2004 13:42:28 -0000 1.31 +++ Display.java 22 Nov 2004 21:12:51 -0000 1.32 @@ -200,8 +200,8 @@ * A native context must exist, and it will be attached to the window. */ private static void createWindow() throws LWJGLException { - x = Math.max(0, Math.min(initial_mode.getWidth() - current_mode.getWidth(), x)); - y = Math.max(0, Math.min(initial_mode.getHeight() - current_mode.getHeight(), y)); + x = Math.max(0, (initial_mode.getWidth() - current_mode.getWidth()) / 2); + y = Math.max(0, (initial_mode.getHeight() - current_mode.getHeight()) / 2); display_impl.createWindow(current_mode, fullscreen, (fullscreen) ? 0 : x, (fullscreen) ? 0 : y); setTitle(title); initControls(); |
|
From: Elias N. <eli...@us...> - 2004-11-22 19:33:00
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv430/src/java/org/lwjgl/opengl Modified Files: MacOSXDisplay.java MouseEventQueue.java Log Message: Mac OS X: Fix bogus repeated mouse deltas when grabbed Index: MacOSXDisplay.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- MacOSXDisplay.java 20 Nov 2004 16:46:43 -0000 1.11 +++ MacOSXDisplay.java 22 Nov 2004 19:32:39 -0000 1.12 @@ -211,7 +211,6 @@ GL11.glViewport(0, 0, frame.getCanvas().syncGetWidth(), frame.getCanvas().syncGetHeight()); warpCursor(); } - mouse_queue.updateDeltas(); } private void warpCursor() { Index: MouseEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/MouseEventQueue.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MouseEventQueue.java 16 Nov 2004 20:33:48 -0000 1.4 +++ MouseEventQueue.java 22 Nov 2004 19:32:40 -0000 1.5 @@ -185,7 +185,6 @@ } public void mousePressed(MouseEvent e) { - updateDeltas(); handleButton(e); } @@ -195,16 +194,23 @@ } public void mouseReleased(MouseEvent e) { - updateDeltas(); handleButton(e); } + private void handleMotion(MouseEvent e) { + if (grabbed) { + updateDeltas(); + } else { + setCursorPos(e.getX(), e.getY()); + } + } + public void mouseDragged(MouseEvent e) { - setCursorPos(e.getX(), e.getY()); + handleMotion(e); } public void mouseMoved(MouseEvent e) { - setCursorPos(e.getX(), e.getY()); + handleMotion(e); } private synchronized void handleWheel(int amount) { @@ -212,7 +218,7 @@ putMouseEvent(-1, 0, amount); } - public void updateDeltas() { + private void updateDeltas() { if (!grabbed) return; synchronized (this) { @@ -229,7 +235,6 @@ public void mouseWheelMoved(MouseWheelEvent e) { int wheel_amount = -e.getWheelRotation()*WHEEL_SCALE; - updateDeltas(); handleWheel(wheel_amount); } } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-11-22 13:42:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9794/src/java/org/lwjgl/opengl Modified Files: Display.java Log Message: Fixed a fullscreen/displaymode setting bug Index: Display.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/Display.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Display.java 7 Nov 2004 17:26:45 -0000 1.30 +++ Display.java 22 Nov 2004 13:42:28 -0000 1.31 @@ -182,6 +182,7 @@ current_mode = mode; if (isCreated()) { destroyWindow(); + setFullscreen(mode.isFullscreen()); try { if (fullscreen) switchDisplayMode(); |
|
From: Elias N. <eli...@us...> - 2004-11-22 12:53:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31688/src/java/org/lwjgl/opengl Modified Files: KeyboardEventQueue.java Log Message: Mac OS X: Ignore repeating key press events Index: KeyboardEventQueue.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/KeyboardEventQueue.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- KeyboardEventQueue.java 20 Nov 2004 16:46:43 -0000 1.3 +++ KeyboardEventQueue.java 22 Nov 2004 12:52:57 -0000 1.4 @@ -260,6 +260,9 @@ int key_code_mapped = KEY_MAP[key_code]; if (character == KeyEvent.CHAR_UNDEFINED) character = Keyboard.CHAR_NONE; + /* Ignore repeating presses */ + if (key_states[key_code_mapped] == state) + return; key_states[key_code_mapped] = state; int key_int_char = ((int)character) & 0xffff; putKeyboardEvent(key_code_mapped, state, key_int_char); |
|
From: Elias N. <eli...@us...> - 2004-11-22 09:44:06
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26765/src/java/org/lwjgl/openal Modified Files: AL.java Log Message: Fix Mac OS X Webstart OpenAL by searching for thw lwjgl library in addition to the openal library Index: AL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/AL.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- AL.java 19 Sep 2004 11:17:28 -0000 1.33 +++ AL.java 22 Nov 2004 09:43:52 -0000 1.34 @@ -146,12 +146,17 @@ } String jwsPath = getPathFromJWS(jwsLibname); - Sys.log("getPathFromJWS: Paths found: " + jwsPath); if (jwsPath != null) { + Sys.log("getPathFromJWS: Path found: " + jwsPath); libpath += seperator + jwsPath.substring(0, jwsPath.lastIndexOf(File.separator)); } - + String lwjgl_jws_path = getPathFromJWS("lwjgl"); + if (lwjgl_jws_path != null) { + Sys.log("getPathFromJWS: Path found: " + lwjgl_jws_path); + libpath += seperator + + lwjgl_jws_path.substring(0, lwjgl_jws_path.lastIndexOf(File.separator)); + } StringTokenizer st = new StringTokenizer(libpath, seperator); //create needed string array @@ -161,10 +166,10 @@ for (int i = 0; i < oalPaths.length - 1; i++) { oalPaths[i] = st.nextToken() + File.separator; } - - for(int i=0 ; i<oalPaths.length; i++) { - Sys.log("Will search " + oalPaths[i] + " for " + jwsLibname); - } + + for(int i=0 ; i<oalPaths.length; i++) { + Sys.log("Will search " + oalPaths[i] + " for " + jwsLibname); + } //add cwd path oalPaths[oalPaths.length - 1] = ""; |
|
From: Brian M. <ma...@us...> - 2004-11-21 10:10:32
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2732/src/native/common/devil Modified Files: org_lwjgl_devil_IL.c Log Message: use safeGetBufferAddress when loading data use correct size of image, instead of size of pointer (!) Index: org_lwjgl_devil_IL.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/devil/org_lwjgl_devil_IL.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- org_lwjgl_devil_IL.c 14 Nov 2004 10:42:16 -0000 1.8 +++ org_lwjgl_devil_IL.c 21 Nov 2004 10:10:05 -0000 1.9 @@ -270,7 +270,7 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_devil_IL_ilGetData(JNIEnv * env, jclass clazz) { ILubyte *data = ilGetData(); - int size = sizeof(data); + int size = ilGetInteger(IL_IMAGE_WIDTH) * ilGetInteger(IL_IMAGE_HEIGHT) * ilGetInteger(IL_IMAGE_BYTES_PER_PIXEL); jobject result = safeNewBuffer(env, data, size); return result; @@ -438,9 +438,9 @@ * Signature: (ILjava/nio/ByteBuffer;II)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_devil_IL_nilLoadL(JNIEnv *env, jclass clazz, jint type, jobject lump_buffer, jint lump_offset, jint size) { - ILbyte *lump = (ILbyte *)(*env)->GetDirectBufferAddress(env, lump_buffer); + ILbyte *lump = (ILbyte *)safeGetBufferAddress(env, lump_buffer, lump_offset); - return ilLoadL((ILenum)type, (ILvoid *)(lump + lump_offset), (ILuint)size); + return ilLoadL((ILenum)type, (ILvoid *)(lump), (ILuint)size); } /* |
|
From: Brian M. <ma...@us...> - 2004-11-21 10:07:02
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2032/src/java/org/lwjgl/devil Modified Files: IL.java Log Message: call correct native method! Index: IL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/devil/IL.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- IL.java 12 Nov 2004 02:40:41 -0000 1.3 +++ IL.java 21 Nov 2004 10:06:52 -0000 1.4 @@ -376,7 +376,7 @@ public static native boolean ilLoadImage(String fileName); public static boolean ilLoadL(int Type, ByteBuffer Lump, int Size) { BufferChecks.checkDirect(Lump); - return nilIsValidL(Type, Lump, Lump.position(), Size); + return nilLoadL(Type, Lump, Lump.position(), Size); } public static native boolean nilLoadL(int Type, ByteBuffer Lump, int lump_offset, int Size); public static native boolean ilLoadPal(String FileName); |