You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ma...@us...> - 2010-02-20 10:43:52
|
Revision: 3275 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3275&view=rev Author: matzon Date: 2010-02-20 10:43:45 +0000 (Sat, 20 Feb 2010) Log Message: ----------- added test for WaveData Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/test/WaveDataTest.java Added: trunk/LWJGL/src/java/org/lwjgl/test/WaveDataTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/WaveDataTest.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/WaveDataTest.java 2010-02-20 10:43:45 UTC (rev 3275) @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test; + +import java.io.File; + +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; + +import org.lwjgl.LWJGLException; +import org.lwjgl.util.WaveData; + +/** + * <br> + * Test class WaveDataTest + * + * @author Brian Matzon <br...@ma...> + */ +public class WaveDataTest { + + String filePath = "Footsteps.wav"; + + /** + * Creates a new DisplayTest + */ + public WaveDataTest() { + } + + /** + * Runs the tests + */ + public void executeTest() throws LWJGLException { + executeCreationTest(); + executeBrokenCreationTest(); + executeMidStreamCreationTest(); + } + + + private void executeCreationTest() { + WaveData wd = WaveData.create(filePath); + if(wd != null) { + System.out.println("executeCreationTest::success"); + } + } + + private void executeBrokenCreationTest() { + WaveData wd = WaveData.create(""); + if(wd == null) { + System.out.println("executeBrokenCreationTest::success"); + } + } + + private void executeStreamCreationTest() { + try { + AudioInputStream ais = AudioSystem.getAudioInputStream(new File(filePath)); + WaveData wd = WaveData.create(ais); + if(wd == null) { + System.out.println("executeMidStreamCreationTest::success"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void executeMidStreamCreationTest() { + try { + + AudioInputStream ais = AudioSystem.getAudioInputStream(WaveDataTest.class.getClassLoader().getResource(filePath)); + int totalSize = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; + + // skip 1/4 of the stream + int skip = totalSize / 4; + long skipped = ais.skip(skip); + + WaveData wd = WaveData.create(ais); + if(wd == null) { + System.out.println("executeMidStreamCreationTest::success"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Pause current thread for a specified time + * + * @param time milliseconds to sleep + */ + private void pause(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException inte) { + /* ignored */ + } + } + + /** + * Tests the Sys class, and serves as basic usage test + * + * @param args ignored + */ + public static void main(String[] args) throws LWJGLException { + new WaveDataTest().executeTest(); + System.exit(0); + } +} Property changes on: trunk/LWJGL/src/java/org/lwjgl/test/WaveDataTest.java ___________________________________________________________________ Added: svn:mime-type + text/plain This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-02-20 10:43:30
|
Revision: 3274 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3274&view=rev Author: matzon Date: 2010-02-20 10:43:22 +0000 (Sat, 20 Feb 2010) Log Message: ----------- cleanup and better logging - no longer prints stacktrace changed AudioInputStream method to use available() instead of calculating it. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java 2010-02-14 17:06:15 UTC (rev 3273) +++ trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java 2010-02-20 10:43:22 UTC (rev 3274) @@ -96,8 +96,7 @@ AudioSystem.getAudioInputStream( new BufferedInputStream(path.openStream()))); } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from: " + path); - e.printStackTrace(); + org.lwjgl.LWJGLUtil.log("Unable to create from: " + path + ", " + e.getMessage()); return null; } } @@ -123,8 +122,7 @@ return create( AudioSystem.getAudioInputStream(is)); } catch (Exception e) { - org.lwjgl.LWJGLUtil.log("Unable to create from inputstream"); - e.printStackTrace(); + org.lwjgl.LWJGLUtil.log("Unable to create from inputstream, " + e.getMessage()); return null; } } @@ -141,7 +139,7 @@ AudioSystem.getAudioInputStream( new BufferedInputStream(new ByteArrayInputStream(buffer)))); } catch (Exception e) { - e.printStackTrace(); + org.lwjgl.LWJGLUtil.log("Unable to create from byte array, " + e.getMessage()); return null; } } @@ -166,7 +164,7 @@ } return create(bytes); } catch (Exception e) { - e.printStackTrace(); + org.lwjgl.LWJGLUtil.log("Unable to create from ByteBuffer, " + e.getMessage()); return null; } } @@ -204,26 +202,23 @@ } //read data into buffer - byte[] buf = - new byte[audioformat.getChannels() - * (int) ais.getFrameLength() - * audioformat.getSampleSizeInBits() - / 8]; - int read = 0, total = 0; + ByteBuffer buffer = null; try { + int available = ais.available(); + if(available <= 0) { + available = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; + } + byte[] buf = new byte[ais.available()]; + int read = 0, total = 0; while ((read = ais.read(buf, total, buf.length - total)) != -1 && total < buf.length) { total += read; } + buffer = convertAudioBytes(buf, audioformat.getSampleSizeInBits() == 16); } catch (IOException ioe) { return null; } - //insert data into bytebuffer - ByteBuffer buffer = convertAudioBytes(buf, audioformat.getSampleSizeInBits() == 16); -/* ByteBuffer buffer = ByteBuffer.allocateDirect(buf.length); - buffer.put(buf); - buffer.rewind();*/ //create our result WaveData wavedata = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2010-02-14 17:06:22
|
Revision: 3273 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3273&view=rev Author: kappa1 Date: 2010-02-14 17:06:15 +0000 (Sun, 14 Feb 2010) Log Message: ----------- Complete overhaul of the linux focus system when using Display.setParent(). This should fix the input problems with applets (on linux) due to Display not being able to gain focus. Also now works perfectly in all browsers, previously input focus was not restored to other browser components when requested (like firefox's address bar). Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-02-10 11:22:16 UTC (rev 3272) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-02-14 17:06:15 UTC (rev 3273) @@ -127,27 +127,11 @@ private Canvas parent; private long parent_window; private boolean xembedded; - private boolean parent_focused; - private boolean parent_focus_changed; + private boolean parent_focus; private LinuxKeyboard keyboard; private LinuxMouse mouse; - private final FocusListener focus_listener = new FocusListener() { - public void focusGained(FocusEvent e) { - synchronized (GlobalLock.lock) { - parent_focused = true; - parent_focus_changed = true; - } - } - public void focusLost(FocusEvent e) { - synchronized (GlobalLock.lock) { - parent_focused = false; - parent_focus_changed = true; - } - } - }; - private static ByteBuffer getCurrentGammaRamp() throws LWJGLException { lockAWT(); try { @@ -439,11 +423,6 @@ grab = false; minimized = false; dirty = true; - if (parent != null) { - parent.addFocusListener(focus_listener); - parent_focused = parent.isFocusOwner(); - parent_focus_changed = true; - } } finally { peer_info.unlock(); } @@ -494,8 +473,6 @@ public void destroyWindow() { lockAWT(); try { - if (parent != null) - parent.removeFocusListener(focus_listener); try { setNativeCursor(null); } catch (LWJGLException e) { @@ -853,17 +830,21 @@ } private void checkInput() { - if (parent == null || !parent_focus_changed) - return; + if (parent == null) return; - if (!focused && parent_focused) { - if (xembedded) { - // disable parent from taking focus back from Display when it is clicked - parent.setFocusable(false); + if (parent_focus != parent.hasFocus()) { + parent_focus = parent.hasFocus(); + + if (parent_focus) { + setInputFocusUnsafe(current_window); } - setInputFocusUnsafe(getWindow()); - parent_focus_changed = false; + else { + setInputFocusUnsafe(0); + } } + else if (parent_focus && !focused) { + setInputFocusUnsafe(current_window); + } } private void setFocused(boolean got_focus, int focus_detail) { @@ -874,19 +855,8 @@ if (focused) { acquireInput(); } - - if (parent != null && xembedded && focused != parent.hasFocus()) { - return; - } - - if (!focused) { + else { releaseInput(); - - if (parent != null && xembedded) { - setInputFocusUnsafe(0); - // re-enable parent focus to detect click on window - parent.setFocusable(true); - } } } static native long nGetInputFocus(long display); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-02-10 11:22:23
|
Revision: 3272 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3272&view=rev Author: spasi Date: 2010-02-10 11:22:16 +0000 (Wed, 10 Feb 2010) Log Message: ----------- Changed BaseReferences to use GL20.GL_MAX_TEXTURE_IMAGE_UNITS when available (GL13.GL_MAX_TEXTURE_UNITS is deprecated). Catch and log OpenGL errors during context creation, instead of throwing an exception. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-02-09 15:22:58 UTC (rev 3271) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-02-10 11:22:16 UTC (rev 3272) @@ -58,7 +58,10 @@ glVertexAttribPointer_buffer = new Buffer[max_vertex_attribs]; int max_texture_units; - if (caps.OpenGL13 || caps.GL_ARB_multitexture) { + if (caps.OpenGL20) { + GL11.glGetInteger(GL20.GL_MAX_TEXTURE_IMAGE_UNITS, temp); + max_texture_units = temp.get(0); + } else if (caps.OpenGL13 || caps.GL_ARB_multitexture) { GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS, temp); max_texture_units = temp.get(0); } else Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-02-09 15:22:58 UTC (rev 3271) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-02-10 11:22:16 UTC (rev 3272) @@ -881,7 +881,11 @@ private static void makeCurrentAndSetSwapInterval() throws LWJGLException { makeCurrent(); - Util.checkGLError(); + try { + Util.checkGLError(); + } catch (OpenGLException e) { + LWJGLUtil.log("OpenGL error during context creation: " + e.getMessage()); + } setSwapInterval(swap_interval); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-02-09 15:23:24
|
Revision: 3271 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3271&view=rev Author: spasi Date: 2010-02-09 15:22:58 +0000 (Tue, 09 Feb 2010) Log Message: ----------- Catch and ignore INVALID_OPERATION error when retrieving CONTEXT_PROFILE_MASK (workaround for ATI 9.12). Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-02-07 18:50:23 UTC (rev 3270) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-02-09 15:22:58 UTC (rev 3271) @@ -247,8 +247,18 @@ // Get the context profile mask for versions >= 3.2 if ( 3 < majorVersion || 2 <= minorVersion ) { + Util.checkGLError(); // Make sure we have no errors up to this point + GL11.glGetInteger(GL32.GL_CONTEXT_PROFILE_MASK, buffer); - profileMask = buffer.get(0); + + try { + // Retrieving GL_CONTEXT_PROFILE_MASK may generate an INVALID_OPERATION error on certain implementations, ignore. + // Happens on pre10.1 ATI drivers, when ContextAttribs.withProfileCompatibility is not used + Util.checkGLError(); + profileMask = buffer.get(0); + } catch (OpenGLException e) { + LWJGLUtil.log("Failed to retrieve CONTEXT_PROFILE_MASK"); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-02-07 18:50:31
|
Revision: 3270 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3270&view=rev Author: spasi Date: 2010-02-07 18:50:23 +0000 (Sun, 07 Feb 2010) Log Message: ----------- Made glGetInteger64i_v optional (not exposed on NV drivers) Modified Paths: -------------- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-02-07 15:15:33 UTC (rev 3269) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-02-07 18:50:23 UTC (rev 3270) @@ -315,6 +315,7 @@ void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer data); @StripPostfix(value = "data", postfix = "64") + @Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)") void glGetInteger64i_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLint64 LongBuffer data); @StripPostfix("values") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-02-07 15:16:13
|
Revision: 3269 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3269&view=rev Author: spasi Date: 2010-02-07 15:15:33 +0000 (Sun, 07 Feb 2010) Log Message: ----------- Removed glPrimitiveRestart from GL31 (immediate mode call that never made it to the core) Added Optional annotation for functions that miss from incomplete implementations. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/util/generator/Optional.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-02-03 21:03:32 UTC (rev 3268) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-02-07 15:15:33 UTC (rev 3269) @@ -197,12 +197,13 @@ writer.print("\tprivate boolean " + getAddressesInitializerName(d.getSimpleName()) + "("); - DeprecatedGL deprecated = d.getAnnotation(DeprecatedGL.class); + boolean optional; + boolean deprecated = d.getAnnotation(DeprecatedGL.class) != null; Dependent dependent = d.getAnnotation(Dependent.class); - if ( deprecated != null ) + if ( deprecated ) writer.print("boolean forwardCompatible"); if ( dependent != null ) { - if ( deprecated != null ) + if ( deprecated ) writer.print(","); writer.print("Set supported_extensions"); } @@ -211,11 +212,14 @@ writer.println("\t\treturn "); while ( methods.hasNext() ) { MethodDeclaration method = methods.next(); - deprecated = method.getAnnotation(DeprecatedGL.class); + optional = method.getAnnotation(Optional.class) != null; + deprecated = method.getAnnotation(DeprecatedGL.class) != null; dependent = method.getAnnotation(Dependent.class); writer.print("\t\t\t("); - if ( deprecated != null ) + if ( optional ) + writer.print('('); + if ( deprecated ) writer.print("forwardCompatible || "); if ( dependent != null ) { if ( dependent.value().indexOf(',') == -1 ) @@ -227,7 +231,7 @@ writer.print(") || "); } } - if ( deprecated != null || dependent != null ) + if ( deprecated || dependent != null ) writer.print('('); writer.print(Utils.getFunctionAddressName(d, method) + " = "); PlatformDependent platform_dependent = method.getAnnotation(PlatformDependent.class); @@ -253,8 +257,10 @@ } else writer.print("GLContext.getFunctionAddress("); writer.print("\"" + method.getSimpleName() + "\")) != 0"); - if ( deprecated != null || dependent != null ) + if ( deprecated || dependent != null ) writer.print(')'); + if ( optional ) + writer.print(" || true)"); if ( methods.hasNext() ) writer.println(" &&"); } Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/Optional.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Optional.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Optional.java 2010-02-07 15:15:33 UTC (rev 3269) @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * A function annotated with @Optional will allow the extension to be available even if the driver does not expose that function. + * This is useful when certain buggy drivers miss some functionality. + * + * @author spasi <sp...@us...> + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +public @interface Optional { + String reason(); // No default value to force documentation +} \ No newline at end of file Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java 2010-02-03 21:03:32 UTC (rev 3268) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java 2010-02-07 15:15:33 UTC (rev 3269) @@ -96,8 +96,6 @@ */ int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; - void glPrimitiveRestart(); - void glPrimitiveRestartIndex(@GLuint int index); // ------------------------------------------------------------------------- Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-02-03 21:03:32 UTC (rev 3268) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-02-07 15:15:33 UTC (rev 3269) @@ -63,6 +63,7 @@ // ----------------------[ ARB_draw_elements_base_vertex ]---------------------- // ----------------------------------------------------------------------------- + @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)") void glDrawElementsBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, @BufferObject(BufferKind.ElementVBO) @Const @@ -70,6 +71,7 @@ @GLushort @GLuint Buffer indices, int basevertex); + @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)") void glDrawRangeElementsBaseVertex(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, @BufferObject(BufferKind.ElementVBO) @Const @@ -77,6 +79,7 @@ @GLushort @GLuint Buffer indices, int basevertex); + @Optional(reason = "AMD's 3.2 implementation does not expose this (last driver checked: 10.1)") void glDrawElementsInstancedBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, @BufferObject(BufferKind.ElementVBO) @Const This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Yahoo! グ. <no...@ya...> - 2010-02-04 23:22:43
|
[このメールは、携帯電話など受信文字数に制限のあるアドレスには対応していません。] こんにちは、Yahoo!グループです。 ■メッセージを投稿できません [java-genjin]グループに投稿された以下のメッセージは受け付けられませんでした。 投稿元メールアドレス: <jav...@li...> 投稿先メールアドレス: <jav...@eg...> ■投稿先のグループが見つかりません メッセージを投稿したグループが見つかりませんでした。 アドレスが間違っていないかご確認のうえ、再度投稿してください。 ■[java-genjin]グループについてのお問い合わせ グループ管理者:jav...@ya... -- [PR] -------------------------------------------------------------- -−―★ 安くてピッタリの自動車保険をみつけよう ★―−- -−―★ 見積もり結果にびっくり!?最大12社からじっくり比較 ★―−- -− Yahoo!保険の自動車保険一括見積もりサービス −- http://rd.yahoo.co.jp/egroups/050701y/1.html -------------------------------------------------------------- [PR] -- ============================================================== Yahoo!グループ - 多くの仲間とらくらくコミュニケーション! http://groups.yahoo.co.jp/ ヘルプ・お問い合わせ: http://help.yahoo.co.jp/help/jp/groups/ ※このメールに質問をご返信いただいても回答いたしかねます。 お問い合わせはヘルプページからお願いします。 |
From: <ma...@us...> - 2010-02-03 21:06:33
|
Revision: 3268 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3268&view=rev Author: matzon Date: 2010-02-03 21:03:32 +0000 (Wed, 03 Feb 2010) Log Message: ----------- prepare for 2.3 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-01-31 16:40:51 UTC (rev 3267) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-02-03 21:03:32 UTC (rev 3268) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.2.2" /> + <property name="lwjgl.version" value="2.3" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-01-31 16:40:51 UTC (rev 3267) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-02-03 21:03:32 UTC (rev 3268) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.2.2"; + private static final String VERSION = "2.3"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Lena H. <pr...@bu...> - 2010-02-01 16:38:21
|
TO: Librarian/Head, Library Acquisition FROM: Lena Han CHINA PUBLICATIONS China Abrasives Directory 2010 (English Ed.) New! It Lists 1,130 abrasive enterprises in China, including manufacturers of corundum, silicon carbide, grinding tools and wheels, polishing products, raw materials and so on. Information given includes enterprise name, address, contact persons, tel&fax numbers, year of establishment, number of employees, email & URLs if applicable, product lines, etc. 2010, 322pp, ebook or hardcopy US$199.50; both US$299.50 (including P&H),ISBN: 978-0-9733166-6-7 China Aviation Directory 2009 (English Ed.) New! It covers an overview on China's aviation industry and all leading organization and enterprises, including governmental agencies, societies and associations, airlines, airports, national corporations, manufacturers, aeronautical research institutes, universities, trade & professional corporations, space business, aviation hospitals, industrial parks, air shows, and foreign companies in China. The information given includes company name, names and titles of key persons, description on company history and current situation, technical strength, product lines, intention of cooperation, and contact details (address, telephone and fax numbers, e-mail addresses and websites). It also provides a key word index. 2009, 321pp, ebook or hardcopy US$199.50; both US$299.50 (including P&H), ISBN: 978-0-9733166-1-2 China Maritime Directory 2009/10 (English Ed.) New! It contains the most up-to-date information on more than 6,000 maritime companies and institutions in China. The industry fields listed include shipbuilding & shiprepair, marine equipment and materials, shipping and logistics, shipowners, survey of ship, tradeing and intermediary service, research and design institutes, education and training, associations, news and publishers, maritime law institutions, administrations, etc. Each entry contains the company's name, address, phone & fax numbers, email & URL, and description of business scope. It also provides a key word index. 2009, 558pp, hardcopy (softcover) US$199.50, ISBN: 978-0-9733166-4-3 <http://www.collectionscanada.gc.ca/ciss-ssci/app/index.php?fuseaction=logbo ok.edit&publication=220496&lang=eng> China Shipbuilding Industry Directory 2010 (English Ed.) New! It covers about 4,000 companies within the shipbuilding industry throughout China. The industry fields listed include shipbuilding & ship repair, yacht and lifesaving equipment, marine equipment and materials, trading and intermediary service, research and design institutes, education and training, associations, news and publications, as well as survey of ship. Each entry contains the company's name, address, phone & fax numbers, email & URL, and business scope. 2010, 388pp, US$199.50, ISBN: 978-0-9733166-5-0 China Leather Directory 2010 (English Ed.) New! It covers about 1,500 companies within the leather industry throughout China. The industry fields listed include tanning, leather shoes & sport shoes, leather garment, fur, leather goods, leather chemicals, leather and shoe machinery, research institutes, trading companies, publishing and training, and associations. Each entry contains the company's name, contact person, address, phone & fax numbers, email & URL, and product lines. 2010, 328pp, US$199.50 China Refractory Directory 2009/10 (English-Chinese) Lists 2,184 leading refractory enterprises in China. Information given includes the enterprise name, name of director, full address, phone and fax numbers, email, website, description, qualification of quality system, and product lines. 2009, 339pp, ebook or hardcopy US$199.95; both US$299.95, ISBN: 978-0-9733166-3-6 China Ceramic Directory 2008 (English Ed.) New! Completely revised and updated compared to previous edition, this edition lists about 1,400 leading ceramic and pottery enterprises, research institutes, associations, importers & exporters. It covers daily used ceramics, porcelain products, sanitary ceramics, building ceramics, tiles, electroceramics, refractories, technical and industrial ceramics, ceramic raw materials, equipment and machines as well as publications. It gives information on the organization's name, address, tel/fax number, emails & URLs, name of director, registered capital, number of employees, history, production capacity, main products. An appendix lists about 30 websites on ceramic industry in China. A classification index is also included. 2008, 321pp, ebook or hardcopy US$199.95; both US$299.95 (including P&H), ISBN 978-0-9733166-2-9 The China Customs Tariffs Table 2009 (English-Chinese) Provides you the comprehensive information about the China tariffs and non-tariff control on importation and exportation. Just download the table and its browser into your hard disk, you can find all related rates and rules. The contents are arranged according to the HS Code, which is widely used by the customs and you can also search the whole table by keywords. 2009, US$195.00 Directory of China's Foreign Trade Enterprises 2008 (English-Chinese) Compiled by the China Council for the Promotion of International Trade (CCPIT) and the China Chamber of International Commerce (CCIC). This edition provides updated and accurate information on more than 10,000 import and export companies, manufacturers permitted to engage in international trade. Information given includes company name, address, contact person, phone/fax numbers, email and web sites, description. It was arranged in such industrial categories as textile & garment, medicine & healthcare, mineral & chemical industry, machinery & electronics, food & animal industries, light industry, general trading, automobiles & motorcycles and parts, culture industry, exhibitions, foreign services, etc. 2008, 743pp, US$199.95 China Chemical Directory 2008 (English Ed.) Lists more than 15,000 chemical producers, 20,000 chemicals divided into 19 types and 80,000 items of production information. Information given includes company name, address, phone/fax numbers, email, websites, names of executives, chemical product code, chemical product name, CAS number, number of employees, annual output value, import/export authorization, as well as production capacity, etc. 2008, 1,300pp, US$695.00 Chinese Biotechnology Directory 2009 (English Ed.) As there has been much progress in biotechnology R&D, particularly in functional genomics, in China in recent years, this fifth edition was expanded, updated and revised completely, compared to the previous edition. It contains most up-to-date and accurate information. It was also divided into three parts. The first part contains an overview on China's biotechnology, including government policy, science base, bioindustry, technology transfer, information resources, intellectual property and regulation environment. The second part lists all government agencies and societies involved in biotechnology. The third part lists over 1,000 research institutes, university departments, and companies, as well as foreign companies' representative offices in China. It gives information on the organization's name, address, tel/telex/fax numbers, some email or websites of its first kind, activities and services offered with an index. Appendices contain China's laws and regulations related to biotechnology and pharmaceutical. 2009, 320pp, US$199.95 TLC Atlas of Chinese Crude Drugs in Chinese Pharmacopoeia (English Ed.) Compiled by Chinese Pharmacopoeia Commission, TLC Atlas Of Chinese Crude Drugs In Chinese Pharmacopoeia includes color photographs of superb quality demonstrating chromatograms of all Chinese crude drugs in Chinese Pharmacopoeia 2005. The atlas will be a useful reference for analyzing Chinese crude drugs, identifying unknown drugs or monitoring the purity or constituents of a given drug. All drugs presented meet the standard of the official pharmacopoeia and originate from well-defined sources. With this guide the technique of thin layer chromatography can be easily used without previous pharmacognostic training. Only commercially available equipment and reagents are needed, the sources as well as all practical details are given. 2009, 306pp, hardcover US$199.95 Pharmacopoeia of The People's Republic of China 2005 (English Edition) Compiled by the Pharmacopoeia, Commission of the Ministry of Public Health, the Chinese Pharmacopoeia, an official English translation of its Chinese version, is a national code of standards for the quality of drugs. It consists of technical specifications on drug quality for the implementation of China's Drug Administration Law. According to regulations by the China's State Drug Administration, the quality of any imported drugs must conform with the Chinese Pharmacopoeia. This fifth edition, as compared with its preceding English edition (2000), was expanded and revised greatly. In this 2005 edition, the total number of monograph is 3,214 in three volumes. Volume I contains 1146 monographs, with 154 new admissions and 453 revised; Volume II covers 1967 monographs, with 327 new admissions and 522 revised; Volume III contains 101 monographs, with 44 new antibiotics, biochemicals, radiopharmaceuticals, biological products, for the first time, gene engineered medicine, new drugs are included in this volume. Modern analytical techniques are adopted extensively for the tests of drugs and new preparations were added. Information given includes the standards of purity, description, test, dosage, precaution, storage, and the strength for each drug. 2006, 3 Vols, hardcover, US$1199.00 Directory of China's Foreign Trade Enterprises 2008 (English- Chinese) Compiled by the China Council for the Promotion of International Trade (CCPIT) and the China Chamber of International Commerce (CCIC). This edition provides updated and accurate contact information on more than 10,000 import and export companies, manufacturers permitted to engage in international trade. Information given includes company name, address, phone/fax numbers, email and web sites, description. It is arranged in 12 industrial categories, including agriculture, forestry, fishery; mineral industry, manufacturing, electric power, gas and water; architectural industry, mineral exploration, irritation; transport, storage up, post and communication industry; wholesale and retail; finance and insurance; real estate; social service industry; and physical education and social welfare industry. Appendix contains official services on foreign affairs, foreign embassies in China, foreign chambers of commerce in China and major websites in China. It was indexed by Standard Industrial Classification regions. 2008, 650pp, US$199.95 Directory of Medical Device Companies in China 2008 (English Ed.) Lists about 1,000 leading medical device and equipment companies in China. It gives latest information on company name, address, tel/fax numbers, email/website addresses if applicable, business activity, product lines, number of employees, annual turnover. 2008, 310pp, US$199.00 Almanac of China's Finance and Banking 2007 (English Ed.) Contains nine chapters, including reform and developments; international finance and international exchanges in finance; economy and finance in regions; documents and regulations; statistics and subject surveys; events and profiles of major financial organizations; etc. 2007, hardcover US$299.50 China Statistical Yearbook of High Technology Industry 2007 (English-Chinese) Contains 6 chapters, including production, marketing and technical activities in major hi-tech companies, employment in hi-tech companies; capital investment; exports in hi-tech industries, as well as international comparison, etc. 2007, 42pp, hardcover US$199.50 China Capital Markets Development Report (English-Chinese) Compiled by China Securities Regulatory Commission, it contains four chapters, including brief review of the development of China's capital markets; important capital markets policies and reforms in recent years; the challenges facing China's capital markets; and China's capital markets: strategies and prospects. 2008, 301pp, hardcover US$199.50 China Energy Statistical Yearbook 2007 (English-Chinese) Contains 8 parts, including overview; energy construction; production of energy; balance table of naational energy; energy consumption; balance table of regional energy; data on energy in Hong Kong, Macau, and Taiwan, etc. 2008, 288pp, US$199.50 China Environment Statistical Yearbook 2008 (English-Chinese) New! It contains statistical data on environment in all provinces since 2006 and major data on environment in all country. It contains ten chapters, including general survey, freshwater environment, marine environment, atmospheric environment, solid wastes, eco-environment, natural disasters, investment in the treatment of environmental pollution, urban environment, rural environment. Appendix contains major environment indicators by eastern, central and western China, main environmental indicators of the world's major countries and regions, main environmental indicators, the main pollutants emission indicators communique of the provinces, autonomous regions, municipality directly under the central government in the first half of 2008, explanatory notes on main statistical indicators. 2008, 248pp, US$199.50 China Trade and External Economic Statistical Yearbook 2008 (Chinese-English) Compiled by the National Bureau of Statistics of China, this yearbook provides comprehensive statistical data on domestic trade, external economic cooperation and trade, and international travel in China. It contains eight chapters, including general survey, domestic trade, foreign trade, foreign investment, international income and payment, external economic cooperation, travel, and profiles of enterprises. 2008, US$199.50 China Rubber Market Yearbook 2007 (English Ed.) Covers current status and developments in China's rubber markets; major rubber and related markets; current status and developments in major provinces; technical achievements; imports & exports; statistical data; list of members of China Rubber Industry Association, etc. 2007, US$299.95 Annual Report on Electric Power Industry in China 2007 (English Ed.) Covers tremendous achievements and brilliant prospects, development and achievements of electric power industry in China, development plan and outlook of electric power industry in China, power network development, rural electrification, achievements in science and technology, education and training, international cooperation, general survey on China's power industry (total installed generating capacity, national total electricity consumption, schematic map of large thermal power plants and nuclear power station, etc.) with figures and tables. 2007, hardcover US$199.50 China Statistical Yearbook 2008 (English-Chinese) Contains 24 chapters and 2 appendices, giving comprehensive statistical data on every aspect of China's economic and social development in 2004. Its contents include administrative divisions and natural resources; general survey; population; employment and wage; investment in fixed assets; public finance; prices; people's livelihood; agriculture; industries; energy and production materials; transportation; postal & telecommunication services; construction; domestic trade; foreign trade and tourism; banking and insurance; city development; education; science; patents and culture; sports; health-care; social welfare, major social and economic indicators in Hong Kong. 2008, hardcover US$199.50 How to Order You can order with 3 methods: by fax, email or mail. Orders must be prepaid. We ship ordered items worldwide, using the delivery method you choose. Airmail delivery usually takes 10-15 days to most countries, but sometimes it may takes 3-4 weeks. To place an order, please fill in the required information and fax, email or mail it to BDI, using the information below: Business Data International Inc. 85 Perron Street, La Prairie Montreal, QC, J5R 5Z5, Canada Phone: 514-558-3135 Fax: 450-619-2532 Email: in...@bu... Order Form Please send me the following items: ---------------------------------------------------------------------------- ------------------------------------ Please select format: [ ] Electronic (no despatch charge) [ ] Hard Copy (please select method of despatch) Postage and Handling [ ] Air Parcel / First Class USD 15 North America; USD 30 Rest of the World [ ] Courier Delivery USD 60 Total (please complete) US$_________________ Your contact and despatch Name: _________________________________________________________________ Company Name: _________________________________________________________ Address: _______________________________________________________________ City/State: ______________________________________________________________ Postcode:__________________________ Country:_____________________________ Phone number: __________________________________________________________ (essential for courier delivery) Email address:___________________________________________________________ (essential for electronic reports) Method of Payment (please check one) [ ] Bank wire transfer to your account below: A/C Name: Business Data International Inc. A/C #: 0095-5201048 TD Canada Trust, IBAN#: 026-009-593 5290 Verdun Ave., Montreal, QC H4H 1K1, Canada Transit Code: 48161-004 Swift #: TDOMCATTTOR [ ] Check (made out to Business Data International Inc.) [ ] Charge my credit card: __Visa __Mastercard __American Express Card Number: ______________________________________ Expiry Date: ____ / ____ Name on Card: ____________________________________ Billing Details (if different) ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ ________________________________________________________________________ Signature (if ordering by fax or mail): ____________________________ Date: ________ |
From: <sp...@us...> - 2010-01-31 16:41:03
|
Revision: 3267 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3267&view=rev Author: spasi Date: 2010-01-31 16:40:51 +0000 (Sun, 31 Jan 2010) Log Message: ----------- Improved compatibility mode detection Removed support for indirect buffers as arguments to GL functions Added missing tokens in GL30 & GL32 Added support for AMD_seamless_cubemap_per_texture & AMD_shader_stencil_export Fixed AMD_vertex_shader_tessellator typo Added AMD extensions to the build process >.< Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java Added Paths: ----------- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java Removed Paths: ------------- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tesselator.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-01-31 16:40:51 UTC (rev 3267) @@ -14,7 +14,7 @@ <property name="lwjgl.res" location="res" /> <property name="lwjgl.version" value="2.2.2" /> - <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> + <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> <!-- Filesets used for targets --> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLContext.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -173,13 +173,13 @@ static native long getFunctionAddress(String name); /** - * Determine which extensions are available. Helper method to ContextCapabilities. + * Determine which extensions are available and returns the context profile mask. Helper method to ContextCapabilities. * - * @return A Set containing all available extension strings. + * @param supported_extensions the Set to fill with the available extension names + * + * @return the context profile mask, will be 0 for any version < 3.2 */ - static Set getSupportedExtensions() { - final Set supported_extensions = new HashSet(); - + static int getSupportedExtensions(final Set supported_extensions) { // Detect OpenGL version first final String version = GL11.glGetString(GL11.GL_VERSION); @@ -225,6 +225,8 @@ if ( 1 < majorVersion || 1 <= minorVersion ) supported_extensions.add("OpenGL11"); + int profileMask = 0; + if ( majorVersion < 3 ) { // Parse EXTENSIONS string final String extensions_string = GL11.glGetString(GL11.GL_EXTENSIONS); @@ -242,9 +244,15 @@ for ( int i = 0; i < extensionCount; i++ ) supported_extensions.add(GL30.glGetStringi(GL11.GL_EXTENSIONS, i)); + + // Get the context profile mask for versions >= 3.2 + if ( 3 < majorVersion || 2 <= minorVersion ) { + GL11.glGetInteger(GL32.GL_CONTEXT_PROFILE_MASK, buffer); + profileMask = buffer.get(0); + } } - return supported_extensions; + return profileMask; } /** Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -55,6 +55,7 @@ private final static String ALL_INIT_METHOD_NAME = "initAllStubs"; private final static String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; private final static String CACHED_EXTS_VAR_NAME = "supported_extensions"; + private final static String PROFILE_MASK_VAR_NAME = "profileMask"; private final static String EXTENSION_PREFIX = "GL_"; private final static String CORE_PREFIX = "Open"; @@ -128,10 +129,11 @@ // Get the supported extensions set. writer.println("\t\tGLContext.setCapabilities(this);"); - writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = GLContext.getSupportedExtensions();"); + writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = new HashSet(256);"); + writer.println("\t\tint " + PROFILE_MASK_VAR_NAME + " = GLContext.getSupportedExtensions(" + CACHED_EXTS_VAR_NAME + ");"); // Force forward compatible mode when OpenGL version is 3.1 or higher and ARB_compatibility is not available. - writer.println("\t\tif ( supported_extensions.contains(\"OpenGL31\") && !supported_extensions.contains(\"GL_ARB_compatibility\") )"); + writer.println("\t\tif ( supported_extensions.contains(\"OpenGL31\") && !(supported_extensions.contains(\"GL_ARB_compatibility\") || (profileMask & GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0) )"); writer.println("\t\t\tforwardCompatible = true;"); if ( !context_specific ) { Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -117,6 +117,7 @@ writer.println("import org.lwjgl.LWJGLUtil;"); writer.println("import org.lwjgl.BufferUtils;"); writer.println("import java.util.Set;"); + writer.println("import java.util.HashSet;"); writer.println("import java.nio.IntBuffer;"); writer.println(); ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -175,7 +175,8 @@ java_writer.println(); java_writer.println("import org.lwjgl.LWJGLException;"); java_writer.println("import org.lwjgl.BufferChecks;"); - java_writer.println("import org.lwjgl.NondirectBufferWrapper;"); + // DISABLED: indirect buffer support + //java_writer.println("import org.lwjgl.NondirectBufferWrapper;"); java_writer.println("import java.nio.*;"); java_writer.println(); java_writer.print("public "); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -238,7 +238,8 @@ writer.println(");"); if (generate_error_checks && method.getAnnotation(NoErrorCheck.class) == null) writer.println("\t\t" + type_map.getErrorCheckMethodName() + ";"); - printNondirectParameterCopies(writer, method, mode); + // DISABLED: indirect buffer support + //printNondirectParameterCopies(writer, method, mode); if (has_result) writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ";"); writer.println("\t}"); @@ -491,7 +492,7 @@ } NullTerminated null_terminated = param.getAnnotation(NullTerminated.class); if (Buffer.class.isAssignableFrom(java_type)) { - boolean indirect_buffer_allowed = param.getAnnotation(CachedReference.class) == null; + boolean indirect_buffer_allowed = false && param.getAnnotation(CachedReference.class) == null; // DISABLED: indirect buffer support boolean out_parameter = param.getAnnotation(OutParameter.class) != null; TypeInfo typeinfo = typeinfos.get(param); printParameterCheck(writer, param.getSimpleName(), typeinfo.getType().getSimpleName(), check_value, can_be_null, null_terminated, indirect_buffer_allowed, out_parameter); Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_seamless_cubemap_per_texture { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = ARB_seamless_cube_map.GL_TEXTURE_CUBE_MAP_SEAMLESS; + +} \ No newline at end of file Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_shader_stencil_export { +} \ No newline at end of file Deleted: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tesselator.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tesselator.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tesselator.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2002-2008 LWJGL Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'LWJGL' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.lwjgl.opengl; - -import org.lwjgl.util.generator.GLenum; - -public interface AMD_vertex_shader_tesselator { - - /** Returned by the <type> parameter of GetActiveUniform: */ - int GL_SAMPLER_BUFFER_AMD = 0x9001; - int GL_INT_SAMPLER_BUFFER_AMD = 0x9002; - int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003; - - /** Accepted by TessellationModeAMD */ - int GL_DISCRETE_AMD = 0x9006; - int GL_CONTINUOUS_AMD = 0x9007; - - /** Accepted by GetIntegerv */ - int GL_TESSELLATION_MODE_AMD = 0x9004; - - /** Accepted by GetFloatv */ - int GL_TESSELLATION_FACTOR_AMD = 0x9005; - - void glTessellationFactorAMD(float factor); - - void glTessellationModeAMD(@GLenum int mode); - -} \ No newline at end of file Copied: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java (from rev 3264, trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tesselator.java) =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.GLenum; + +public interface AMD_vertex_shader_tessellator { + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_BUFFER_AMD = 0x9001; + int GL_INT_SAMPLER_BUFFER_AMD = 0x9002; + int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003; + + /** Accepted by TessellationModeAMD */ + int GL_DISCRETE_AMD = 0x9006; + int GL_CONTINUOUS_AMD = 0x9007; + + /** Accepted by GetIntegerv */ + int GL_TESSELLATION_MODE_AMD = 0x9004; + + /** Accepted by GetFloatv */ + int GL_TESSELLATION_FACTOR_AMD = 0x9005; + + void glTessellationFactorAMD(float factor); + + void glTessellationModeAMD(@GLenum int mode); + +} \ No newline at end of file Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -62,11 +62,17 @@ int GL_CLIP_DISTANCE3 = GL11.GL_CLIP_PLANE3; int GL_CLIP_DISTANCE4 = GL11.GL_CLIP_PLANE4; int GL_CLIP_DISTANCE5 = GL11.GL_CLIP_PLANE5; + int GL_CLIP_DISTANCE6 = 0x3006; + int GL_CLIP_DISTANCE7 = 0x3007; int GL_MAX_CLIP_DISTANCES = GL11.GL_MAX_CLIP_PLANES; int GL_MAX_VARYING_COMPONENTS = GL20.GL_MAX_VARYING_FLOATS; + int GL_BUFFER_ACCESS_FLAGS = 0x911F; + int GL_BUFFER_MAP_LENGTH = 0x9120; + int GL_BUFFER_MAP_OFFSET = 0x9121; + String glGetStringi(@GLenum int name, @GLuint int index); @StripPostfix("value") Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-01-26 22:18:48 UTC (rev 3266) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2010-01-31 16:40:51 UTC (rev 3267) @@ -44,6 +44,10 @@ // ----------------------[ OpenGL 3.2 ]---------------------- // ---------------------------------------------------------- + int GL_CONTEXT_PROFILE_MASK = 0x9126; + int GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001; + int GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002; + int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123; int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Buy F. V. on www.qa35.c. <ti...@in...> - 2010-01-31 06:22:34
|
proto coliz e remil itari ze prepo stero us divul ge delus ion panth eoniz es refor estiz es thiol inver ter poled energ ized charl eroi gargl es ginge ry getaw ay malms ey perse cuted depen d hangm an senso riall y mater ial depen d comme ncing drabn ess amoeb iasis seeml ier whirl y shagg ily strik eout ranca gua bibli ophil e metro polis smoko nuiss ance doork eeper sweet iewif e lette r unpic k scipi o blint ze serge becko ning knock out codif ying waste fully choos e exact er hangm an baudr ons async hrono us sider osis nymph cerro marmo set shagg ily tross achs splas h arcti cises erasa ble crede nce bijec tion battl egrou nd misre prese nt nonag e venia lness nuiss ance trium phal unpic k muset tes caste s turve s baudr ons block buste r sofa marmo set gener ates astra chan rivet s irrit ating ly metab olise d favor er exact er embal ming diacr itica l polem icall y |
From: <ma...@us...> - 2010-01-26 22:19:01
|
Revision: 3266 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3266&view=rev Author: matzon Date: 2010-01-26 22:18:48 +0000 (Tue, 26 Jan 2010) Log Message: ----------- tagging 2.2.2 Added Paths: ----------- tags/lwjgl2.2.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-01-25 21:14:28
|
Revision: 3265 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3265&view=rev Author: matzon Date: 2010-01-25 21:14:15 +0000 (Mon, 25 Jan 2010) Log Message: ----------- 2.2.2 Modified Paths: -------------- trunk/LWJGL/platform_build/build-definitions.xml trunk/LWJGL/src/java/org/lwjgl/Sys.java Modified: trunk/LWJGL/platform_build/build-definitions.xml =================================================================== --- trunk/LWJGL/platform_build/build-definitions.xml 2010-01-17 11:54:08 UTC (rev 3264) +++ trunk/LWJGL/platform_build/build-definitions.xml 2010-01-25 21:14:15 UTC (rev 3265) @@ -12,7 +12,7 @@ <property name="lwjgl.docs" location="doc" /> <property name="lwjgl.temp" location="temp" /> <property name="lwjgl.res" location="res" /> - <property name="lwjgl.version" value="2.2.1" /> + <property name="lwjgl.version" value="2.2.2" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> <!-- ================================================================== --> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-01-17 11:54:08 UTC (rev 3264) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-01-25 21:14:15 UTC (rev 3265) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.2.1"; + private static final String VERSION = "2.2.2"; /** The implementation instance to delegate platform specific behavior to */ private final static SysImplementation implementation; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Shortle <mai...@pi...> - 2010-01-19 18:04:17
|
Een corrected in this | | text. For a complete list, please see the bottom of this | | document. | | | +--------------------------------------------------------------+ * * * * * SMITHSONIAN INSTITUTION BUREAU OF AMERICAN ETHNOLOGY BULLETIN 76 ARCHEOLOGICAL INVESTIGATIONS I. CAVE EXPLORATIONS IN THE OZARK REGION OF CENTRAL MISSOURI II. CAVE EXPLORATIONS IN OTHER STATES III. EXPLORATIONS ALONG THE MISSOURI RIVER BLUFFS IN KANSAS AND NEBRASKA IV. ABORIGINAL HOUSE MOUNDS V. ARCHEOLOGICAL WORK IN HAWAII BY GERARD FOWKE WASHINGTON GOVERNMENT PRINTING OFFICE 1922 LETTER OF TRANSMITTAL SMITHSONIAN INSTITUTION, BUREAU OF AMERICAN ETHNOLOGY, _Washington, D.C., February 17, 1920._ SIR: I have the honor to transmi |
From: <sp...@us...> - 2010-01-17 11:54:15
|
Revision: 3264 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3264&view=rev Author: spasi Date: 2010-01-17 11:54:08 +0000 (Sun, 17 Jan 2010) Log Message: ----------- Fixed glClearBuffer signature. Modified Paths: -------------- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-01-10 22:46:41 UTC (rev 3263) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-01-17 11:54:08 UTC (rev 3264) @@ -69,11 +69,17 @@ String glGetStringi(@GLenum int name, @GLuint int index); - void glClearBufferfv(@GLenum int buffer, @Const @Check("4")FloatBuffer value); - void glClearBufferiv(@GLenum int buffer, @Const @Check("4")IntBuffer value); - void glClearBufferuiv(@GLenum int buffer, @Const @Check("4")IntBuffer value); - void glClearBufferfi(@GLenum int buffer, float depth, int stencil); + @StripPostfix("value") + void glClearBufferfv(@GLenum int buffer, int drawbuffer, @Const @Check("4")FloatBuffer value); + @StripPostfix("value") + void glClearBufferiv(@GLenum int buffer, int drawbuffer, @Const @Check("4")IntBuffer value); + + @StripPostfix("value") + void glClearBufferuiv(@GLenum int buffer, int drawbuffer, @Const @Check("4")IntBuffer value); + + void glClearBufferfi(@GLenum int buffer, int drawbuffer, float depth, int stencil); + // --------------------------------------------------------------- // ----------------------[ EXT_gpu_shader4 ]---------------------- // --------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2010-01-10 22:46:59
|
Revision: 3263 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3263&view=rev Author: matzon Date: 2010-01-10 22:46:41 +0000 (Sun, 10 Jan 2010) Log Message: ----------- fix for issue with Cursor that turned out to be a leaking DC Modified Paths: -------------- trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c Modified: trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c 2010-01-04 18:47:49 UTC (rev 3262) +++ trunk/LWJGL/src/native/windows/org_lwjgl_input_Cursor.c 2010-01-10 22:46:41 UTC (rev 3263) @@ -68,6 +68,7 @@ int maskCount = 0; HBITMAP colorBitmap; int x, y; + HDC hDC; jobject handle_buffer = newJavaManagedByteBuffer(env, sizeof(HCURSOR)); int *pixels; @@ -85,8 +86,10 @@ bitmapInfo.bmiHeader.biBitCount = 24; bitmapInfo.bmiHeader.biCompression = BI_RGB; + + hDC = GetDC(NULL); - colorDIB = CreateDIBSection(GetDC(NULL), (BITMAPINFO*)&(bitmapInfo), + colorDIB = CreateDIBSection(hDC, (BITMAPINFO*)&(bitmapInfo), DIB_RGB_COLORS, (void*)&(ptrCursorImage), NULL, 0); @@ -94,6 +97,7 @@ dstPtr = ptrCursorImage; if (!dstPtr) { throwException(env, "Could not allocate DIB section."); + ReleaseDC(NULL, hDC); return NULL; } for (y = 0; y < height; y++ ) { @@ -107,7 +111,7 @@ } } - colorBitmap = CreateDIBitmap(GetDC(NULL), + colorBitmap = CreateDIBitmap(hDC, (BITMAPINFOHEADER*)&bitmapInfo.bmiHeader, CBM_INIT, (void *)ptrCursorImage, @@ -148,6 +152,7 @@ DeleteObject(colorBitmap); DeleteObject(cursorMask); free(maskPixels); + ReleaseDC(NULL, hDC); cursor_handle = (HCURSOR *)(*env)->GetDirectBufferAddress(env, handle_buffer); *cursor_handle = cursor; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2010-01-04 18:47:56
|
Revision: 3262 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3262&view=rev Author: spasi Date: 2010-01-04 18:47:49 +0000 (Mon, 04 Jan 2010) Log Message: ----------- Added support for explicit length arguments in functions that map buffer objects. Simplified CachedResult handling of functions that map buffer object ranges. Improved documentation of CachedResult functions. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java trunk/LWJGL/src/java/org/lwjgl/util/generator/CachedResult.java trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Mode.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL15.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -71,6 +71,12 @@ return scratch_buffer.get(0); } + static int getBufferObjectSizeATI(ContextCapabilities caps, int buffer) { + IntBuffer scratch_buffer = caps.scratch_int_buffer; + ATIVertexArrayObject.glGetObjectBufferATI(buffer, ATIVertexArrayObject.GL_OBJECT_BUFFER_SIZE_ATI, scratch_buffer); + return scratch_buffer.get(0); + } + static int getNamedBufferObjectSize(ContextCapabilities caps, int buffer) { IntBuffer scratch_buffer = caps.scratch_int_buffer; EXTDirectStateAccess.glGetNamedBufferParameterEXT(buffer, GL15.GL_BUFFER_SIZE, scratch_buffer); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/CachedResult.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/CachedResult.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/CachedResult.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -43,4 +43,5 @@ @Target(ElementType.METHOD) public @interface CachedResult { + boolean isRange() default false; } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -91,8 +91,12 @@ } if (Utils.getResultParameter(method) != null && !method.getReturnType().equals(env.getTypeUtils().getVoidType())) throw new RuntimeException(method + " return type is not void but a parameter is annotated with Result"); - if (method.getAnnotation(CachedResult.class) != null && Utils.getNIOBufferType(Utils.getMethodReturnType(method)) == null) - throw new RuntimeException(method + " return type is not a Buffer, but is annotated with CachedResult"); + if (method.getAnnotation(CachedResult.class) != null) { + if (Utils.getNIOBufferType(Utils.getMethodReturnType(method)) == null) + throw new RuntimeException(method + " return type is not a Buffer, but is annotated with CachedResult"); + if (method.getAnnotation(AutoResultSize.class) == null) + throw new RuntimeException(method + " is annotated with CachedResult but misses an AutoResultSize annotation"); + } validateTypes(method, method.getAnnotationMirrors(), method.getReturnType()); } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -68,6 +68,9 @@ printMethodWithMultiType(env, type_map, writer, interface_decl, method, typeinfos_instance, Mode.NORMAL, generate_error_checks, context_specific); } } + if ( method.getAnnotation(CachedResult.class) != null && !method.getAnnotation(CachedResult.class).isRange() ) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.CACHEDRESULT, generate_error_checks, context_specific); + } printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); if (Utils.hasMethodBufferObjectParameter(method)) { printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.BUFFEROBJECT, generate_error_checks, context_specific); @@ -120,16 +123,23 @@ first_parameter = generateParameterJava(writer, param, type_info, native_stub, first_parameter, mode); } } + CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); TypeMirror result_type = Utils.getMethodReturnType(method); if ((native_stub && Utils.getNIOBufferType(result_type) != null) || Utils.needResultSize(method)) { - if (!first_parameter) - writer.print(", "); - first_parameter = false; - writer.print("long " + Utils.RESULT_SIZE_NAME); + if (cached_result_annotation == null || !cached_result_annotation.isRange()) { + if (!first_parameter) + writer.print(", "); + first_parameter = false; + writer.print("long " + Utils.RESULT_SIZE_NAME); + } } - if (method.getAnnotation(CachedResult.class) != null) { + if (cached_result_annotation != null) { if (!first_parameter) writer.print(", "); + + if ( mode == Mode.CACHEDRESULT ) + writer.print("long " + Utils.CACHED_BUFFER_LENGTH_NAME + ", "); + first_parameter = false; printResultType(writer, method, native_stub); writer.print(" " + Utils.CACHED_BUFFER_NAME); @@ -403,16 +413,26 @@ first_parameter = printMethodCallArgument(writer, method, param, typeinfos_instance, mode, first_parameter); } if (Utils.getNIOBufferType(Utils.getMethodReturnType(method)) != null) { - if (!first_parameter) - writer.print(", "); - first_parameter = false; - AutoResultSize auto_result_size_annotation = method.getAnnotation(AutoResultSize.class); - String result_size_expression; - if (auto_result_size_annotation == null) - result_size_expression = Utils.RESULT_SIZE_NAME; - else - result_size_expression = auto_result_size_annotation.value(); - Utils.printExtraCallArguments(writer, method, result_size_expression); + if (method.getAnnotation(CachedResult.class) != null && method.getAnnotation(CachedResult.class).isRange()) { + first_parameter = false; + Utils.printExtraCallArguments(writer, method, ""); + } else { + if (!first_parameter) + writer.print(", "); + first_parameter = false; + + String result_size_expression; + if ( mode == Mode.CACHEDRESULT ) + result_size_expression = Utils.CACHED_BUFFER_LENGTH_NAME; + else { + AutoResultSize auto_result_size_annotation = method.getAnnotation(AutoResultSize.class); + if (auto_result_size_annotation == null) + result_size_expression = Utils.RESULT_SIZE_NAME; + else + result_size_expression = auto_result_size_annotation.value(); + } + Utils.printExtraCallArguments(writer, method, result_size_expression); + } } return first_parameter; } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Mode.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Mode.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Mode.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2008 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,5 +34,6 @@ public enum Mode { BUFFEROBJECT, AUTOS, + CACHEDRESULT, // Used for generating a CachedResult method with an explicit length argument. NORMAL } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -106,8 +106,10 @@ writer.print("(JNIEnv *env, jclass clazz"); generateParameters(writer, method.getParameters(), mode); if (Utils.getNIOBufferType(result_type) != null) { - writer.print(", jlong " + Utils.RESULT_SIZE_NAME); - if (method.getAnnotation(CachedResult.class) != null) + CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); + if (cached_result_annotation == null || !cached_result_annotation.isRange()) + writer.print(", jlong " + Utils.RESULT_SIZE_NAME); + if (cached_result_annotation != null) writer.print(", jobject " + Utils.CACHED_BUFFER_NAME); } if (context_specific) { @@ -160,7 +162,10 @@ writer.print(Utils.RESULT_VAR_NAME); if (Buffer.class.isAssignableFrom(java_result_type)) { writer.print(", "); - Utils.printExtraCallArguments(writer, method, Utils.RESULT_SIZE_NAME); + if (method.getAnnotation(CachedResult.class) != null && method.getAnnotation(CachedResult.class).isRange()) + Utils.printExtraCallArguments(writer, method, method.getAnnotation(AutoResultSize.class).value()); + else + Utils.printExtraCallArguments(writer, method, Utils.RESULT_SIZE_NAME); } if (Buffer.class.isAssignableFrom(java_result_type) || String.class.equals(java_result_type)) Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -58,13 +58,14 @@ public static final String BUFFER_OBJECT_PARAMETER_POSTFIX = "_buffer_offset"; public static final String RESULT_SIZE_NAME = "result_size"; public static final String RESULT_VAR_NAME = "__result"; + public static final String CACHED_BUFFER_LENGTH_NAME = "length"; public static final String CACHED_BUFFER_NAME = "old_buffer"; private static final String OVERLOADED_METHOD_PREFIX = "n"; public static String getTypedefName(MethodDeclaration method) { return method.getSimpleName() + TYPEDEF_POSTFIX; } - + public static String getFunctionAddressName(InterfaceDeclaration interface_decl, MethodDeclaration method) { return interface_decl.getSimpleName() + "_" + method.getSimpleName() + FUNCTION_POINTER_POSTFIX; } @@ -201,7 +202,7 @@ public static boolean needResultSize(MethodDeclaration method) { return getNIOBufferType(getMethodReturnType(method)) != null && method.getAnnotation(AutoResultSize.class) == null; } - + public static void printExtraCallArguments(PrintWriter writer, MethodDeclaration method, String size_parameter_name) { writer.print(size_parameter_name); if (method.getAnnotation(CachedResult.class) != null) { Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_buffer_object.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_buffer_object.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_buffer_object.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -104,13 +104,24 @@ @GLdouble Buffer data); /** - * glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, - * in which case a new ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, - * it will be returned if it points to the same mapped memory, otherwise a new ByteBuffer is created. That - * way, an application will normally use glMapBufferARB like this: + * glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferARB like this: * <p/> - * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer); + * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * <p/> + * The version of this method without an explicit length argument calls glGetBufferParameterARB internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + * <p/> + * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.<br> + * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. * + * @param length the length of the mapped memory in bytes. * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. * * @return A ByteBuffer representing the mapped buffer memory. Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -45,7 +45,21 @@ int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; - @CachedResult + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + * <p/> + * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult(isRange = true) @GLvoid @AutoResultSize("length") ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -38,19 +38,31 @@ public interface ATI_map_object_buffer { /** - * glMapObjectBufferATI maps a gl object buffer to a ByteBuffer. The oldBuffer argument can be - * null, in which case a new ByteBuffer will be created, pointing to the returned memory. If - * oldBuffer is non-null, it will be returned if it points to the same mapped memory, otherwise a - * new ByteBuffer is created. + * glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the vertex array object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: + * <p/> + * ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * <p/> + * The version of this method without an explicit length argument calls glGetObjectBufferATI internally to + * retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. + * <p/> + * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.<br> + * Security warning: The length argument should match the vertex array object size. Reading from or writing to outside + * the memory region that corresponds to the mapped vertex array object will cause native crashes. * - * @param result_size The size of the buffer area. - * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, - * it will be returned and no new buffer will be created. + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. * - * @return A ByteBuffer representing the mapped object buffer memory. + * @return A ByteBuffer representing the mapped buffer memory. */ @CachedResult @GLvoid + @AutoResultSize("GLChecks.getBufferObjectSizeATI(caps, buffer)") ByteBuffer glMapObjectBufferATI(@GLuint int buffer); void glUnmapObjectBufferATI(@GLuint int buffer); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -778,6 +778,29 @@ @GLfloat @GLdouble Buffer data); + /** + * glMapNamedBufferEXT maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferEXT like this: + * <p/> + * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferEXT(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferEXT(..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * <p/> + * The version of this method without an explicit length argument calls glGetNamedBufferParameterEXT internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + * <p/> + * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.<br> + * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ @Dependent("OpenGL15") @CachedResult @GLvoid @@ -1283,8 +1306,22 @@ in name and replace "enum target" parameter with "uint buffer" */ + /** + * glMapNamedBufferRangeEXT maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferRangeEXT like this: + * <p/> + * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ @Dependent("OpenGL30") - @CachedResult + @CachedResult(isRange = true) @GLvoid @AutoResultSize("length") ByteBuffer glMapNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL15.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL15.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL15.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -124,17 +124,26 @@ @GLdouble Buffer data); /** - * glMapBuffer maps a gl vertex buffer buffer to a ByteBuffer. The oldBuffer argument can be null, in which case a new - * ByteBuffer will be created, pointing to the returned memory. If oldBuffer is non-null, it will be returned if it points to - * the same mapped memory, otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like - * this: + * glMapBuffer maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: * <p/> - * ByteBuffer mapped_buffer; mapped_buffer = glMapBuffer(..., ..., ..., null); ... // Another map on the same buffer - * mapped_buffer = glMapBuffer(..., ..., ..., mapped_buffer); + * ByteBuffer mapped_buffer; mapped_buffer = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * <p/> + * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + * <p/> + * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.<br> + * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. * - * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no - * new buffer will be created. - * * @return A ByteBuffer representing the mapped buffer memory. */ @CachedResult Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-28 15:00:06 UTC (rev 3261) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-01-04 18:47:49 UTC (rev 3262) @@ -240,7 +240,21 @@ int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; - @CachedResult + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + * <p/> + * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + * <p/> + * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult(isRange = true) @GLvoid @AutoResultSize("length") ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2009-12-28 15:00:15
|
Revision: 3261 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3261&view=rev Author: spasi Date: 2009-12-28 15:00:06 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fixed MapBufferRange signature. Modified Paths: -------------- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java 2009-12-04 04:49:19 UTC (rev 3260) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java 2009-12-28 15:00:06 UTC (rev 3261) @@ -47,8 +47,8 @@ @CachedResult @GLvoid - ByteBuffer - glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + @AutoResultSize("length") + ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); void glFlushMappedBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2009-12-04 04:49:19 UTC (rev 3260) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2009-12-28 15:00:06 UTC (rev 3261) @@ -1286,6 +1286,7 @@ @Dependent("OpenGL30") @CachedResult @GLvoid + @AutoResultSize("length") ByteBuffer glMapNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); @Dependent("OpenGL30") Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-04 04:49:19 UTC (rev 3260) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-28 15:00:06 UTC (rev 3261) @@ -242,8 +242,8 @@ @CachedResult @GLvoid - ByteBuffer - glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + @AutoResultSize("length") + ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); void glFlushMappedBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2009-12-04 04:49:39
|
Revision: 3260 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3260&view=rev Author: spasi Date: 2009-12-04 04:49:19 +0000 (Fri, 04 Dec 2009) Log Message: ----------- Added generator support for null-terminated string lists. Fixed GetUniformIndices and TransformFeedbackVaryings. Added a ARB_uniform_buffer_object test. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/NullTerminated.java trunk/LWJGL/src/java/org/lwjgl/util/generator/TypedefsGenerator.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh trunk/LWJGL/src/java/org/lwjgl/util/generator/StringList.java Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -74,6 +74,17 @@ } } + public static void checkNullTerminated(ByteBuffer buf, int count) { + int nullFound = 0; + for ( int i = buf.position(); i < buf.limit(); i++ ) { + if ( buf.get(i) == 0 ) + nullFound++; + } + + if ( nullFound < count ) + throw new IllegalArgumentException("Missing null termination"); + } + public static void checkNotNull(Object o) { if (o == null) throw new IllegalArgumentException("Null argument"); Added: trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2009-12-04 + */ + +package org.lwjgl.test.opengl.shaders; + +import org.lwjgl.BufferUtils; +import org.lwjgl.opengl.ARBUniformBufferObject; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL20; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +final class ShaderUNI extends Shader { + + final String file; + final ByteBuffer source; + + final int shaderID; + final int programID; + + final int uniformA; + final int uniformB; + + ShaderUNI(final String shaderFile) { + file = shaderFile; + source = getShaderText(shaderFile); + + shaderID = GL20.glCreateShader(GL20.GL_VERTEX_SHADER); + GL20.glShaderSource(shaderID, source); + GL20.glCompileShader(shaderID); + + printShaderObjectInfoLog(file, shaderID); + + GL20.glGetShader(shaderID, GL20.GL_COMPILE_STATUS, programBuffer); + if ( programBuffer.get(0) == GL11.GL_FALSE ) + ShadersTest.kill("A compilation error occured in a vertex shader."); + + programID = GL20.glCreateProgram(); + + GL20.glAttachShader(programID, shaderID); + GL20.glLinkProgram(programID); + + printShaderProgramInfoLog(programID); + + GL20.glGetProgram(programID, GL20.GL_LINK_STATUS, programBuffer); + if ( programBuffer.get(0) == GL11.GL_FALSE ) + ShadersTest.kill("A linking error occured in a shader program."); + + uniformA = getUniformLocation(programID, "uniformA"); + uniformB = getUniformLocation(programID, "uniformB"); + + String[] uniformNames = { "uniformA", "uniformB" }; + IntBuffer tmp = BufferUtils.createIntBuffer(uniformNames.length); + + ARBUniformBufferObject.glGetUniformIndices(programID, toByteBuffer(uniformNames), tmp); + + System.out.println("uniformA index = " + tmp.get(0)); + System.out.println("uniformB index = " + tmp.get(1)); + } + + private static ByteBuffer toByteBuffer(String[] strs) { + int length = 0; + for ( int i = 0; i < strs.length; i++ ) + length += strs[i].length() + 1; // +1 for the NULL-character + + final ByteBuffer buff = BufferUtils.createByteBuffer(length); + for ( int i = 0; i < strs.length; i++ ) { + buff.put(strs[i].getBytes()); + buff.put((byte)0); // The ending NULL-character + } + buff.flip(); + + return buff; + } + + void render() { + GL20.glUseProgram(programID); + + GL20.glUniform2f(uniformA, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f); + GL20.glUniform3f(uniformB, 0.0f, 0.7f, 0.0f); + + ShadersTest.renderObject(); + + GL20.glUseProgram(0); + } + + void cleanup() { + GL20.glDetachShader(programID, shaderID); + + GL20.glDeleteShader(shaderID); + GL20.glDeleteProgram(programID); + } + +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -1,31 +1,31 @@ -/* +/* * Copyright (c) 2002-2008 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. */ @@ -45,11 +45,7 @@ import org.lwjgl.Sys; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; -import org.lwjgl.opengl.Display; -import org.lwjgl.opengl.DisplayMode; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GLContext; -import org.lwjgl.opengl.PixelFormat; +import org.lwjgl.opengl.*; import org.lwjgl.util.glu.GLU; import org.lwjgl.util.glu.Sphere; @@ -92,7 +88,8 @@ lastFrameTime = frameStart; - angle += frameTime * 90.0f; + //angle += frameTime * 90.0f; + angle += 0.1f; sin = (float)Math.sin(Math.toRadians(angle)); handleIO(); @@ -138,7 +135,7 @@ System.out.println("Setting display mode to: " + displayMode); Display.setDisplayMode(displayMode); - Display.create(new PixelFormat(8, 24, 0)); + Display.create(new PixelFormat(8, 24, 0), "UNI".equalsIgnoreCase(args[0]) ? new ContextAttribs(3, 1) : null); ShadersTest.displayMode = displayMode; } catch (LWJGLException e) { kill(e.getMessage()); @@ -170,6 +167,11 @@ kill("The ARB_fragment_shader extension is not supported."); shader = new ShaderFSH("shaderFSH.vsh", "shaderFSH.fsh"); + } else if ("UNI".equalsIgnoreCase(args[0]) ) { + if ( !GLContext.getCapabilities().OpenGL31 ) + kill("OpenGL version 3.1 is not supported."); + + shader = new ShaderUNI("shaderUNI.vsh"); } else { argsError(); } Added: trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh 2009-12-04 04:49:19 UTC (rev 3260) @@ -0,0 +1,25 @@ +#version 140 + +uniform vec2 uniformA; +uniform vec3 uniformB; + +void main(void) { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + + vec3 normal = gl_NormalMatrix * gl_Normal; + + float diffuseDot = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + float specularDot = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); + specularDot = pow(specularDot, uniformA.y); + + // Normalize position, to get a {-1..1} value for each vertex. + // Multiply with current sin. + vec3 color3D = normalize(vec3(gl_Vertex)) * uniformA.x; + // {-1..1} => {0..1} & Intensify colors. + color3D = (color3D * 0.5 + 0.5) * 2.0; + + // Accumulate color contributions. + color3D = diffuseDot * (uniformB + color3D) + vec3(gl_LightModel.ambient); + gl_FrontColor.rgb = specularDot * vec3(gl_LightSource[0].specular) + color3D; + gl_FrontColor.a = 1.0; +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -41,8 +41,6 @@ * $Id$ */ -import org.lwjgl.opengl.PointerWrapper; - import com.sun.mirror.apt.*; import com.sun.mirror.declaration.*; import com.sun.mirror.type.*; @@ -471,23 +469,23 @@ check_value = check_annotation.value(); can_be_null = check_annotation.canBeNull(); } - boolean null_terminated = param.getAnnotation(NullTerminated.class) != null; + NullTerminated null_terminated = param.getAnnotation(NullTerminated.class); if (Buffer.class.isAssignableFrom(java_type)) { boolean indirect_buffer_allowed = param.getAnnotation(CachedReference.class) == null; boolean out_parameter = param.getAnnotation(OutParameter.class) != null; TypeInfo typeinfo = typeinfos.get(param); printParameterCheck(writer, param.getSimpleName(), typeinfo.getType().getSimpleName(), check_value, can_be_null, null_terminated, indirect_buffer_allowed, out_parameter); - } else if (String.class.equals(java_type)) { + } else if ( String.class.equals(java_type)) { if (!can_be_null) writer.println("\t\tBufferChecks.checkNotNull(" + param.getSimpleName() + ");"); } } } if (method.getAnnotation(CachedResult.class) != null) - printParameterCheck(writer, Utils.CACHED_BUFFER_NAME, null, null, true, false, false, false); + printParameterCheck(writer, Utils.CACHED_BUFFER_NAME, null, null, true, null, false, false); } - private static void printParameterCheck(PrintWriter writer, String name, String type, String check_value, boolean can_be_null, boolean null_terminated, boolean indirect_buffer_allowed, boolean out_parameter) { + private static void printParameterCheck(PrintWriter writer, String name, String type, String check_value, boolean can_be_null, NullTerminated null_terminated, boolean indirect_buffer_allowed, boolean out_parameter) { if (indirect_buffer_allowed && out_parameter) { writer.println("\t\t" + type + " " + name + SAVED_PARAMETER_POSTFIX + " = " + name + ";"); } @@ -507,8 +505,15 @@ writer.print("Direct(" + name); } writer.println(");"); - if (null_terminated) - writer.println("\t\tBufferChecks.checkNullTerminated(" + name + ");"); + if (null_terminated != null) { + writer.print("\t\tBufferChecks.checkNullTerminated("); + writer.print(name); + if ( null_terminated.value().length() > 0 ) { + writer.print(", "); + writer.print(null_terminated.value()); + } + writer.println(");"); + } } private static void printResultType(PrintWriter writer, MethodDeclaration method, boolean native_stub) { Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -52,6 +52,7 @@ public class NativeMethodStubsGenerator { private static final String BUFFER_ADDRESS_POSTFIX = "_address"; public static final String BUFFER_POSITION_POSTFIX = "_position"; + private static final String STRING_LIST_POSTFIX = "_str"; public static void generateNativeMethodStubs(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration d, boolean generate_error_checks, boolean context_specific) { for (MethodDeclaration method : d.getMethods()) { @@ -120,6 +121,7 @@ writer.print(" = (" + typedef_name + ")((intptr_t)"); writer.println(Utils.FUNCTION_POINTER_VAR_NAME + ");"); } + generateStringListInits(writer, method.getParameters()); writer.print("\t"); if (!result_type.equals(env.getTypeUtils().getVoidType())) { Declaration return_declaration; @@ -197,17 +199,21 @@ writer.print(Utils.RESULT_VAR_NAME); } else { writer.print(param.getSimpleName()); - if (Utils.isAddressableType(param.getType())) { + if ( param.getAnnotation(StringList.class) != null ) + writer.print(STRING_LIST_POSTFIX); + else if (Utils.isAddressableType(param.getType())) writer.print(BUFFER_ADDRESS_POSTFIX); - } } } private static void generateStringDeallocations(PrintWriter writer, Collection<ParameterDeclaration> params) { - for (ParameterDeclaration param : params) + for (ParameterDeclaration param : params) { if (Utils.getJavaType(param.getType()).equals(String.class) && param.getAnnotation(Result.class) == null) writer.println("\tfree(" + param.getSimpleName() + BUFFER_ADDRESS_POSTFIX + ");"); + else if (param.getAnnotation(StringList.class) != null ) // Free the string array mem + writer.println("\tfree(" + param.getSimpleName() + STRING_LIST_POSTFIX + ");"); + } } private static void generateBufferParameterAddresses(TypeMap type_map, PrintWriter writer, MethodDeclaration method, Mode mode) { @@ -249,5 +255,34 @@ throw new RuntimeException("Illegal type " + java_type); } writer.println(";"); + + if ( param.getAnnotation(StringList.class) != null ) { + if ( param.getAnnotation(GLchar.class) == null || + param.getAnnotation(NullTerminated.class) == null || + param.getAnnotation(NullTerminated.class).value().length() == 0 + ) + throw new RuntimeException("StringList annotation can only be applied on null-terminated GLchar buffers."); + + // Declare string array and loop counters + writer.print("\tGLchar **" + param.getSimpleName() + STRING_LIST_POSTFIX + "; "); + writer.println("\tunsigned int " + param.getSimpleName() + "_i = 0;"); + writer.println("\tGLchar *" + param.getSimpleName() + "_next = (GLchar *)" + param.getSimpleName() + BUFFER_ADDRESS_POSTFIX + ";"); + } } + + private static void generateStringListInits(PrintWriter writer, Collection<ParameterDeclaration> params) { + for ( ParameterDeclaration param : params ) { + StringList stringList_annotation = param.getAnnotation(StringList.class); + if ( stringList_annotation != null ) { + // Allocate the string array + writer.println("\t" + param.getSimpleName() + STRING_LIST_POSTFIX + " = (GLchar **) malloc(" + stringList_annotation.value() + "*sizeof(GLchar*));"); + // Fill string array with the string pointers + writer.println("\tdo {"); + writer.println("\t\t" + param.getSimpleName() + STRING_LIST_POSTFIX + "[" + param.getSimpleName() + "_i++] = " + param.getSimpleName() + "_next;"); + writer.println("\t\t" + param.getSimpleName() + "_next += strlen(" + param.getSimpleName() + "_next) + 1;"); + writer.println("\t} while ( " + param.getSimpleName() + "_i < " + stringList_annotation.value() + " );"); + } + } + } + } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/NullTerminated.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/NullTerminated.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/NullTerminated.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -46,4 +46,5 @@ @Target(ElementType.PARAMETER) public @interface NullTerminated { + String value() default ""; } Added: trunk/LWJGL/src/java/org/lwjgl/util/generator/StringList.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/StringList.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/StringList.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author spasi <sp...@us...> + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface StringList { + String value(); +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/TypedefsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/TypedefsGenerator.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/TypedefsGenerator.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -76,7 +76,7 @@ NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); param.getType().accept(translator); writer.print(translator.getSignature()); - if (param.getAnnotation(Result.class) != null || param.getAnnotation(Indirect.class) != null) + if (param.getAnnotation(Result.class) != null || param.getAnnotation(Indirect.class) != null || param.getAnnotation(StringList.class) != null) writer.print("*"); writer.print(" " + param.getSimpleName()); } Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -99,7 +99,7 @@ int GL_INVALID_INDEX = 0xFFFFFFFF; void glGetUniformIndices(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, - @Const @NullTerminated @GLchar ByteBuffer uniformNames, + @Const @NullTerminated("uniformIndices.remaining()") @GLchar @StringList("uniformCount") ByteBuffer uniformNames, @OutParameter @GLuint IntBuffer uniformIndices); @StripPostfix("params") Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -101,7 +101,9 @@ void glEndTransformFeedbackEXT(); - void glTransformFeedbackVaryingsEXT(@GLuint int program, @GLsizei int count, @Const @NullTerminated @GLchar ByteBuffer varyings, @GLenum int bufferMode); + void glTransformFeedbackVaryingsEXT(@GLuint int program, @GLsizei int count, + @Const @NullTerminated("count") @GLchar @StringList("count") ByteBuffer varyings, + @GLenum int bufferMode); void glGetTransformFeedbackVaryingEXT(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -864,7 +864,9 @@ void glEndTransformFeedback(); - void glTransformFeedbackVaryings(@GLuint int program, @GLsizei int count, @Const @NullTerminated @GLchar ByteBuffer varyings, @GLenum int bufferMode); + void glTransformFeedbackVaryings(@GLuint int program, @GLsizei int count, + @Const @NullTerminated("count") @GLchar @StringList("count") ByteBuffer varyings, + @GLenum int bufferMode); void glGetTransformFeedbackVarying(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java 2009-12-02 23:11:14 UTC (rev 3259) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL31.java 2009-12-04 04:49:19 UTC (rev 3260) @@ -234,7 +234,7 @@ int GL_INVALID_INDEX = 0xFFFFFFFF; void glGetUniformIndices(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, - @Const @NullTerminated @GLchar ByteBuffer uniformNames, + @Const @NullTerminated("uniformIndices.remaining()") @GLchar @StringList("uniformCount") ByteBuffer uniformNames, @OutParameter @GLuint IntBuffer uniformIndices); @StripPostfix("params") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-12-02 23:11:25
|
Revision: 3259 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3259&view=rev Author: matzon Date: 2009-12-02 23:11:14 +0000 (Wed, 02 Dec 2009) Log Message: ----------- call InitCommonControls if no display has been created prior to Alert Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c Modified: trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2009-12-01 15:12:52 UTC (rev 3258) +++ trunk/LWJGL/src/java/org/lwjgl/WindowsSysImplementation.java 2009-12-02 23:11:14 UTC (rev 3259) @@ -94,9 +94,13 @@ } public void alert(String title, String message) { + if(!Display.isCreated()) { + initCommonControls(); + } nAlert(getHwnd(), title, message); } private static native void nAlert(long parent_hwnd, String title, String message); + private static native void initCommonControls(); public boolean openURL(final String url) { try { Modified: trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c =================================================================== --- trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2009-12-01 15:12:52 UTC (rev 3258) +++ trunk/LWJGL/src/native/windows/org_lwjgl_Sys.c 2009-12-02 23:11:14 UTC (rev 3259) @@ -44,6 +44,7 @@ #include "org_lwjgl_WindowsSysImplementation.h" #include "common_tools.h" #include <malloc.h> +#include <commctrl.h> JNIEXPORT jlong JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetTime(JNIEnv * env, jclass unused) { DWORD time; @@ -67,6 +68,10 @@ free(cTitleBarText); } +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_initCommonControls(JNIEnv * env, jclass unused) { + InitCommonControls(); +} + JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetClipboard (JNIEnv * env, jclass unused) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2009-12-01 15:13:10
|
Revision: 3258 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3258&view=rev Author: kappa1 Date: 2009-12-01 15:12:52 +0000 (Tue, 01 Dec 2009) Log Message: ----------- added the Display.setInitialBackground(r,g,b) method, this will allow you to select the initial background color of the lwjgl Display window. Useful to create more polished applications and smoother looking applets. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2009-12-01 11:39:48 UTC (rev 3257) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2009-12-01 15:12:52 UTC (rev 3258) @@ -116,6 +116,9 @@ private static boolean window_created = false; private static boolean parent_resized; + + /** Initial Background Color of Display */ + private static float r = 0, g = 0, b = 0; private static ComponentListener component_listener = new ComponentAdapter() { public void componentResized(ComponentEvent e) { @@ -861,6 +864,20 @@ } } } + + /** + * Set the initial color of the Display. This method is called before the Display is created and will set the + * background color to the one specified in this method. + * + * @param red - color value between 0 - 1 + * @param green - color value between 0 - 1 + * @param blue - color value between 0 - 1 + */ + public static void setInitialBackground(float red, float green, float blue) { + r = red; + g = green; + b = blue; + } private static void makeCurrentAndSetSwapInterval() throws LWJGLException { makeCurrent(); @@ -869,6 +886,8 @@ } private static void initContext() { + // set background clear color + GL11.glClearColor(r, g, b, 1.0f); // Clear window to avoid the desktop "showing through" GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); update(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2009-12-01 13:06:03
|
Revision: 3257 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3257&view=rev Author: spasi Date: 2009-12-01 11:39:48 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Fixed GetSync signature. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/test/opengl/SyncTest.java Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/SyncTest.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/opengl/SyncTest.java 2009-12-01 03:37:27 UTC (rev 3256) +++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/SyncTest.java 2009-12-01 11:39:48 UTC (rev 3257) @@ -132,7 +132,7 @@ } IntBuffer property = BufferUtils.createIntBuffer(1); - GL32.glGetSynciv(sync, GL32.GL_SYNC_STATUS, null, property); + GL32.glGetSync(sync, GL32.GL_SYNC_STATUS, null, property); System.out.println("Sync Status: " + (property.get(0) == GL32.GL_UNSIGNALED ? "UNSIGNALED" : "SIGNALED")); GL32.glDeleteSync(sync); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2009-12-01 03:37:36
|
Revision: 3256 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3256&view=rev Author: spasi Date: 2009-12-01 03:37:27 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Updated EXT_direct_state_access to latest revision. Improved postfix stripping and extension dependency. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java trunk/LWJGL/src/java/org/lwjgl/util/generator/StripPostfix.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_geometry_program4.java Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -215,8 +215,16 @@ writer.print("\t\t\t("); if ( deprecated != null ) writer.print("forwardCompatible || "); - if ( dependent != null ) - writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || "); + if ( dependent != null ) { + if ( dependent.value().indexOf(',') == -1 ) + writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || "); + else { + writer.print("!(false"); + for ( String extension : dependent.value().split(",") ) + writer.print(" || supported_extensions.contains(\"" + extension + "\")"); + writer.print(") || "); + } + } if ( deprecated != null || dependent != null ) writer.print('('); writer.print(Utils.getFunctionAddressName(d, method) + " = "); Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -283,22 +283,29 @@ private static String getPostfixStrippedName(TypeMap type_map, InterfaceDeclaration interface_decl, MethodDeclaration method) { StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class); ParameterDeclaration postfix_parameter = Utils.findParameter(method, strip_annotation.value()); - PostfixTranslator translator = new PostfixTranslator(type_map, postfix_parameter); - postfix_parameter.getType().accept(translator); - String postfix = translator.getSignature(); + String postfix = strip_annotation.postfix(); + if ( "NULL".equals(postfix) ) { + PostfixTranslator translator = new PostfixTranslator(type_map, postfix_parameter); + postfix_parameter.getType().accept(translator); + postfix = translator.getSignature(); + } String method_name = method.getSimpleName(); String extension_postfix = "NULL".equals(strip_annotation.extension()) ? getExtensionPostfix(interface_decl) : strip_annotation.extension(); String result; - if (method_name.endsWith(postfix + "v" + extension_postfix)) + + if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + "v" + extension_postfix)) result = method_name.substring(0, method_name.length() - (postfix.length() + 1 + extension_postfix.length())); - else if (method_name.endsWith(postfix + extension_postfix)) + else if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + extension_postfix)) result = method_name.substring(0, method_name.length() - (postfix.length() + extension_postfix.length())); - else if ( method_name.endsWith("_v" + extension_postfix) ) - result = method_name.substring(0, method_name.length() - (2 + extension_postfix.length())); + else if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + "i_v" + extension_postfix) ) + result = method_name.substring(0, method_name.length() - (postfix.length() + 3 + extension_postfix.length())); + else if ( method_name.endsWith("i_v" + extension_postfix) ) + result = method_name.substring(0, method_name.length() - (3 + extension_postfix.length())); else if (method_name.endsWith("v" + extension_postfix)) result = method_name.substring(0, method_name.length() - (1 + extension_postfix.length())); else throw new RuntimeException(method + " is specified as being postfix stripped on parameter " + postfix_parameter + ", but it's postfix is not '" + postfix + "' nor 'v'"); + return result + extension_postfix; } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/StripPostfix.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/StripPostfix.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/StripPostfix.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -48,4 +48,6 @@ public @interface StripPostfix { String value(); // The parameter to deduce the postfix from String extension() default "NULL"; + boolean hasPostfix() default true; + String postfix() default "NULL"; } Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_sync.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -82,9 +82,10 @@ void glWaitSync(@GLpointer("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); - @StripPostfix("params") + @StripPostfix(value = "params", postfix = "64") void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + @StripPostfix("values") void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -39,6 +39,15 @@ @DeprecatedGL public interface EXT_direct_state_access { + /** + * Accepted by the <pname> parameter of GetBooleanIndexedvEXT, + * GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT: + * GetBooleani_v, GetIntegeri_v, GetFloati_vEXT, GetDoublei_vEXT: + */ + int GL_PROGRAM_MATRIX_EXT = 0x8E2D; + int GL_TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E; + int GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F; + /* OpenGL 1.1: New client commands */ @@ -183,16 +192,16 @@ @GLdouble Buffer pixels); @StripPostfix("params") - void glGetTextureParameterfvEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4")FloatBuffer params); + void glGetTextureParameterfvEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); @StripPostfix("params") - void glGetTextureParameterivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4")IntBuffer params); + void glGetTextureParameterivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); @StripPostfix("params") - void glGetTextureLevelParameterfvEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4")FloatBuffer params); + void glGetTextureLevelParameterfvEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); @StripPostfix("params") - void glGetTextureLevelParameterivEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4")IntBuffer params); + void glGetTextureLevelParameterivEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); /* OpenGL 1.2: New 3D texture object commands replace "Tex" in name with @@ -460,6 +469,19 @@ void glDisableClientStateIndexedEXT(@GLenum int array, @GLuint int index); /* + OpenGL 3.0: New indexed texture commands and queries append "i" + to name and add "uint index" parameter (to identify the texture + unit index) after state name parameters (if any) and before state + value parameters + */ + + @Dependent("OpenGL30") + void glEnableClientStateiEXT(@GLenum int array, @GLuint int index); + + @Dependent("OpenGL30") + void glDisableClientStateiEXT(@GLenum int array, @GLuint int index); + + /* OpenGL 1.2.1: New indexed generic queries (added for indexed texture state) append "Indexed" to name and add "uint index" parameter (to identify the texture unit) after state name parameters (if any) @@ -468,17 +490,36 @@ @Dependent("OpenGL13") @StripPostfix("params") - void glGetFloatIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16")FloatBuffer params); + void glGetFloatIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params); @Dependent("OpenGL13") - @StripPostfix("params") - void glGetDoubleIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16")DoubleBuffer params); + @StripPostfix(value = "params", hasPostfix = false) + void glGetDoubleIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params); @Dependent("OpenGL13") @StripPostfix("params") void glGetPointerIndexedvEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params); /* + OpenGL 3.0: New indexed generic queries (added for indexed texture + state) replace "v" for "i_v" to name and add "uint index" parameter + (to identify the texture unit) after state name parameters (if any) + and before state value parameters + */ + + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetFloati_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params); + + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetDoublei_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params); + + @Dependent("OpenGL30") + @StripPostfix(value = "params", hasPostfix = false) + void glGetPointeri_vEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params); + + /* OpenGL 1.2.1: Extend the functionality of these EXT_draw_buffers2 commands and queries for multitexture TODO: Why 1.2.1 and not EXT_draw_buffers2? @@ -495,7 +536,7 @@ @Dependent("GL_EXT_draw_buffers2") @StripPostfix("params") - void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16")IntBuffer params); + void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") IntBuffer params); @Dependent("GL_EXT_draw_buffers2") @StripPostfix("params") @@ -514,26 +555,26 @@ @Dependent("GL_ARB_vertex_program") @StripPostfix("params") - void glNamedProgramLocalParameter4dvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4")DoubleBuffer params); + void glNamedProgramLocalParameter4dvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4") DoubleBuffer params); @Dependent("GL_ARB_vertex_program") void glNamedProgramLocalParameter4fEXT(@GLuint int program, @GLenum int target, @GLuint int index, float x, float y, float z, float w); @Dependent("GL_ARB_vertex_program") @StripPostfix("params") - void glNamedProgramLocalParameter4fvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4")FloatBuffer params); + void glNamedProgramLocalParameter4fvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4") FloatBuffer params); @Dependent("GL_ARB_vertex_program") @StripPostfix("params") - void glGetNamedProgramLocalParameterdvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4")DoubleBuffer params); + void glGetNamedProgramLocalParameterdvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); @Dependent("GL_ARB_vertex_program") @StripPostfix("params") - void glGetNamedProgramLocalParameterfvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4")FloatBuffer params); + void glGetNamedProgramLocalParameterfvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); @Dependent("GL_ARB_vertex_program") @StripPostfix("params") - void glGetNamedProgramivEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check("4")IntBuffer params); + void glGetNamedProgramivEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); @Dependent("GL_ARB_vertex_program") void glGetNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check @GLvoid ByteBuffer string); @@ -748,7 +789,7 @@ @Dependent("OpenGL15") @StripPostfix("params") - void glGetNamedBufferParameterivEXT(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("4")IntBuffer params); + void glGetNamedBufferParameterivEXT(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); @Dependent("OpenGL15") @StripPostfix("params") @@ -1015,14 +1056,14 @@ void glGetNamedProgramLocalParameterIuivEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Check("4") @OutParameter @GLuint IntBuffer params); /* - EXT_framebuffer_object: New renderbuffer commands add "Named" prefix - to name and replace "enum target" with "uint renderbuffer" + OpenGL 3.0: New renderbuffer commands add "Named" prefix to name + and replace "enum target" with "uint renderbuffer" */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glNamedRenderbufferStorageEXT(@GLuint int renderbuffer, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") @StripPostfix("params") void glGetNamedRenderbufferParameterivEXT(@GLuint int renderbuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); @@ -1031,7 +1072,7 @@ prefix to name and replace "enum target" with "uint renderbuffer" */ - @Dependent("GL_EXT_framebuffer_multisample") + @Dependent("OpenGL30,GL_EXT_framebuffer_multisample") void glNamedRenderbufferStorageMultisampleEXT(@GLuint int renderbuffer, @GLsizei int samples, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); /* @@ -1044,80 +1085,87 @@ void glNamedRenderbufferStorageMultisampleCoverageEXT(@GLuint int renderbuffer, @GLsizei int coverageSamples, @GLsizei int colorSamples, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); /* - EXT_framebuffer_object: New framebuffer commands add "Named" prefix - to name and replace "enum target" with "uint framebuffer" + OpenGL 3.0: New framebuffer commands add "Named" prefix to name + and replace "enum target" with "uint framebuffer" */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") @GLenum int glCheckNamedFramebufferStatusEXT(@GLuint int framebuffer, @GLenum int target); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glNamedFramebufferTexture1DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glNamedFramebufferTexture2DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glNamedFramebufferTexture3DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level, int zoffset); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glNamedFramebufferRenderbufferEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") @StripPostfix("params") void glGetNamedFramebufferAttachmentParameterivEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); /* - EXT_framebuffer_object: New texture commands add "Texture" within - name and replace "enum target" with "uint texture" + OpenGL 3.0: New texture commands add "Texture" within name and + replace "enum target" with "uint texture" */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glGenerateTextureMipmapEXT(@GLuint int texture, @GLenum int target); /* - EXT_framebuffer_object: New texture commands add "MultiTex" within - name and replace "enum target" with "enum texunit" + OpenGL 3.0: New texture commands add "MultiTex" within name and + replace "enum target" with "enum texunit" */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glGenerateMultiTexMipmapEXT(@GLenum int texunit, @GLenum int target); /* - EXT_framebuffer_object: New framebuffer commands + OpenGL 3.0: New framebuffer commands */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glFramebufferDrawBufferEXT(@GLuint int framebuffer, @GLenum int mode); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glFramebufferDrawBuffersEXT(@GLuint int framebuffer, @AutoSize("bufs") @GLsizei int n, @Const @GLenum IntBuffer bufs); - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") void glFramebufferReadBufferEXT(@GLuint int framebuffer, @GLenum int mode); /* - EXT_framebuffer_object: New framebuffer query + OpenGL 3.0: New framebuffer query */ - @Dependent("GL_EXT_framebuffer_object") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") @StripPostfix("param") void glGetFramebufferParameterivEXT(@GLuint int framebuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer param); /* - EXT_geometry_shader4 or NV_gpu_program4: New framebuffer commands + OpenGL 3.1: New buffer data copy command + */ + + @Dependent("OpenGL31,GL_ARB_copy_buffer") + void glNamedCopyBufferSubDataEXT(@GLuint int readBuffer, @GLuint int writeBuffer, @GLintptr long readoffset, @GLintptr long writeoffset, @GLsizeiptr long size); + + /* + EXT_geometry_shader4 or NV_geometry_program4: New framebuffer commands add "Named" prefix to name and replace "enum target" with "uint framebuffer" */ - @Dependent("GL_EXT_geometry_shader4") + @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4") void glNamedFramebufferTextureEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level); - @Dependent("GL_EXT_geometry_shader4") + @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4") void glNamedFramebufferTextureLayerEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, int layer); - @Dependent("GL_EXT_geometry_shader4") + @Dependent("GL_EXT_geometry_shader4,NV_geometry_program4") void glNamedFramebufferTextureFaceEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); /* @@ -1138,4 +1186,109 @@ @Dependent("GL_NV_explicit_multisample") void glMultiTexRenderbufferEXT(@GLenum int texunit, @GLenum int target, @GLuint int renderbuffer); + /* + OpenGL 3.0: New vertex array specification commands for vertex + array objects prefix "VertexArray", add initial "uint vaobj" and + "uint buffer" parameters, change "Pointer" suffix to "Offset", + and change the final parameter from "const void *" to "intptr offset" + */ + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayVertexOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayColorOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayEdgeFlagOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayIndexOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayNormalOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayTexCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayMultiTexCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int texunit, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayFogCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArraySecondaryColorOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayVertexAttribOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayVertexAttribIOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + /* + OpenGL 3.0: New vertex array enable commands for vertex array + objects change "ClientState" to "VertexArray" and add an initial + "uint vaobj" parameter + */ + + @Dependent("OpenGL30") + void glEnableVertexArrayEXT(@GLuint int vaobj, @GLenum int array); + + @Dependent("OpenGL30") + void glDisableVertexArrayEXT(@GLuint int vaobj, @GLenum int array); + + /* + OpenGL 3.0: New vertex attrib array enable commands for vertex + array objects change "VertexAttribArray" to "VertexArrayAttrib" + and add an initial "uint vaobj" parameter + */ + + @Dependent("OpenGL30") + void glEnableVertexArrayAttribEXT(@GLuint int vaobj, @GLuint int index); + + @Dependent("OpenGL30") + void glDisableVertexArrayAttribEXT(@GLuint int vaobj, @GLuint int index); + + /* + OpenGL 3.0: New queries for vertex array objects + */ + + @Dependent("OpenGL30") + @StripPostfix("param") + void glGetVertexArrayIntegervEXT(@GLuint int vaobj, @GLenum int pname, @OutParameter @Check("16") IntBuffer param); + + @Dependent("OpenGL30") + @StripPostfix("param") + void glGetVertexArrayPointervEXT(@GLuint int vaobj, @GLenum int pname, @Result @GLvoid ByteBuffer param); + + @Dependent("OpenGL30") + @StripPostfix(value = "param", hasPostfix = false) + void glGetVertexArrayIntegeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @OutParameter @Check("16") IntBuffer param); + + @Dependent("OpenGL30") + @StripPostfix(value = "param", hasPostfix = false) + void glGetVertexArrayPointeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer param); + + /* + OpenGL 3.0: New buffer commands replace "Buffer" with "NamedBuffer" + in name and replace "enum target" parameter with "uint buffer" + */ + + @Dependent("OpenGL30") + @CachedResult + @GLvoid + ByteBuffer glMapNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + @Dependent("OpenGL30") + void glFlushMappedNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length); + } \ No newline at end of file Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -725,7 +725,7 @@ void glColorMaski(@GLuint int buf, boolean r, boolean g, boolean b, boolean a); - @StripPostfix("data") + @StripPostfix(value = "data", hasPostfix = false) void glGetBooleani_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data); @StripPostfix("data") Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL32.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -304,9 +304,13 @@ void glWaitSync(@GLpointer("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); - @StripPostfix("params") - void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + @StripPostfix(value = "data", postfix = "64") + void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer data); + @StripPostfix(value = "data", postfix = "64") + void glGetInteger64i_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLint64 LongBuffer data); + + @StripPostfix("values") void glGetSynciv(@GLpointer("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_geometry_program4.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_geometry_program4.java 2009-11-26 22:44:17 UTC (rev 3255) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_geometry_program4.java 2009-12-01 03:37:27 UTC (rev 3256) @@ -53,4 +53,6 @@ void glFramebufferTextureLayerEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + void glFramebufferTextureFaceEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2009-11-26 22:44:31
|
Revision: 3255 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3255&view=rev Author: matzon Date: 2009-11-26 22:44:17 +0000 (Thu, 26 Nov 2009) Log Message: ----------- stop updating cursor all the time and only continue animation if mouse is inside window Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java Modified: trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2009-11-24 20:13:12 UTC (rev 3254) +++ trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2009-11-26 22:44:17 UTC (rev 3255) @@ -630,7 +630,7 @@ */ public static void updateCursor() { synchronized (OpenGLPackageAccess.global_lock) { - if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut()) { + if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut() && Mouse.isInsideWindow()) { currentCursor.nextCursor(); try { setNativeCursor(currentCursor); Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2009-11-24 20:13:12 UTC (rev 3254) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2009-11-26 22:44:17 UTC (rev 3255) @@ -761,7 +761,6 @@ private static native int defWindowProc(long hwnd, int msg, long wParam, long lParam); private void checkCursorState() { - updateCursor(); updateClipping(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |