You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
(4) |
2
(2) |
3
(2) |
|
4
(2) |
5
(2) |
6
(1) |
7
(4) |
8
(2) |
9
(2) |
10
(2) |
|
11
(2) |
12
(4) |
13
(5) |
14
(6) |
15
(4) |
16
(2) |
17
(3) |
|
18
(2) |
19
(2) |
20
(1) |
21
(2) |
22
(6) |
23
|
24
(1) |
|
25
(1) |
26
(6) |
27
(3) |
28
(3) |
29
(5) |
30
(2) |
|
|
From: <ma...@us...> - 2010-04-29 17:37:26
|
Revision: 3337
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3337&view=rev
Author: matzon
Date: 2010-04-29 17:37:18 +0000 (Thu, 29 Apr 2010)
Log Message:
-----------
yes, we really should...
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
Modified: trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2010-04-26 21:52:59 UTC (rev 3336)
+++ trunk/LWJGL/src/java/org/lwjgl/input/Mouse.java 2010-04-29 17:37:18 UTC (rev 3337)
@@ -467,7 +467,7 @@
}
/**
- * @return Current events delta x. Only valid when the mouse is grabbed.
+ * @return Current events delta x.
*/
public static int getEventDX() {
synchronized (OpenGLPackageAccess.global_lock) {
@@ -476,7 +476,7 @@
}
/**
- * @return Current events delta y. Only valid when the mouse is grabbed.
+ * @return Current events delta y.
*/
public static int getEventDY() {
synchronized (OpenGLPackageAccess.global_lock) {
@@ -485,7 +485,7 @@
}
/**
- * @return Current events absolute x. Only valid when the mouse is not grabbed.
+ * @return Current events absolute x.
*/
public static int getEventX() {
synchronized (OpenGLPackageAccess.global_lock) {
@@ -494,7 +494,7 @@
}
/**
- * @return Current events absolute y. Only valid when the mouse is not grabbed.
+ * @return Current events absolute y.
*/
public static int getEventY() {
synchronized (OpenGLPackageAccess.global_lock) {
@@ -550,7 +550,7 @@
}
/**
- * @return Movement on the x axis since last time getDX() was called. Only valid when the mouse is grabbed.
+ * @return Movement on the x axis since last time getDX() was called.
*/
public static int getDX() {
synchronized (OpenGLPackageAccess.global_lock) {
@@ -561,7 +561,7 @@
}
/**
- * @return Movement on the y axis since last time getDY() was called. Only valid when the mouse is grabbed.
+ * @return Movement on the y axis since last time getDY() was called.
*/
public static int getDY() {
synchronized (OpenGLPackageAccess.global_lock) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-26 21:53:06
|
Revision: 3336
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3336&view=rev
Author: matzon
Date: 2010-04-26 21:52:59 +0000 (Mon, 26 Apr 2010)
Log Message:
-----------
use context classloader, since u19+u20 broke the old impl
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-04-22 23:49:46 UTC (rev 3335)
+++ trunk/LWJGL/src/java/org/lwjgl/util/WaveData.java 2010-04-26 21:52:59 UTC (rev 3336)
@@ -108,7 +108,7 @@
* @return WaveData containing data, or null if a failure occured
*/
public static WaveData create(String path) {
- return create(WaveData.class.getClassLoader().getResource(path));
+ return create(Thread.currentThread().getContextClassLoader().getResource(path));
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-04-22 23:49:52
|
Revision: 3335
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3335&view=rev
Author: spasi
Date: 2010-04-22 23:49:46 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
Added org.lwjgl.util.NoChecks
Modified Paths:
--------------
trunk/LWJGL/doc/lwjgl_hidden_switches.text
Modified: trunk/LWJGL/doc/lwjgl_hidden_switches.text
===================================================================
--- trunk/LWJGL/doc/lwjgl_hidden_switches.text 2010-04-22 23:21:48 UTC (rev 3334)
+++ trunk/LWJGL/doc/lwjgl_hidden_switches.text 2010-04-22 23:49:46 UTC (rev 3335)
@@ -12,6 +12,9 @@
org.lwjgl.util.Debug
Whether to output debug info
+org.lwjgl.util.NoChecks
+Whether to disable runtime function/buffer checks and state tracking.
+
org.lwjgl.opengl.Display.allowSoftwareOpenGL
Whether to allow creation of a software only opengl context
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-04-22 23:21:55
|
Revision: 3334
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3334&view=rev
Author: spasi
Date: 2010-04-22 23:21:48 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
Fixed ByteOrder of @Return ByteBuffers.
Cleaned up Drawable interface and introduced a reusable base implementation.
Added support for disabling runtime function checks, buffer checks and state tracking. Activated with -Dorg.lwjgl.util.NoChecks=true
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java
trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.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/ATI_vertex_array_object.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
Modified: trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/BufferChecks.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -60,7 +60,7 @@
* Helper methods to ensure a function pointer is not-null (0)
*/
public static void checkFunctionAddress(long pointer) {
- if (pointer == 0) {
+ if (LWJGLUtil.CHECKS && pointer == 0) {
throw new IllegalStateException("Function is not supported");
}
}
@@ -69,20 +69,22 @@
* Helper methods to ensure a ByteBuffer is null-terminated
*/
public static void checkNullTerminated(ByteBuffer buf) {
- if (buf.get(buf.limit() - 1) != 0) {
+ if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) {
throw new IllegalArgumentException("Missing null termination");
}
}
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 ( LWJGLUtil.CHECKS ) {
+ 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");
}
-
- if ( nullFound < count )
- throw new IllegalArgumentException("Missing null termination");
}
/** Helper methods to ensure an IntBuffer is null-terminated */
@@ -93,7 +95,7 @@
}
public static void checkNotNull(Object o) {
- if (o == null)
+ if ( LWJGLUtil.CHECKS && o == null)
throw new IllegalArgumentException("Null argument");
}
@@ -101,37 +103,37 @@
* Helper methods to ensure a buffer is direct (and, implicitly, non-null).
*/
public static void checkDirect(ByteBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("ByteBuffer is not direct");
}
}
public static void checkDirect(ShortBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("ShortBuffer is not direct");
}
}
public static void checkDirect(IntBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("IntBuffer is not direct");
}
}
public static void checkDirect(LongBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("LongBuffer is not direct");
}
}
public static void checkDirect(FloatBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("FloatBuffer is not direct");
}
}
public static void checkDirect(DoubleBuffer buf) {
- if (!buf.isDirect()) {
+ if ( LWJGLUtil.CHECKS && !buf.isDirect()) {
throw new IllegalArgumentException("DoubleBuffer is not direct");
}
}
@@ -154,38 +156,50 @@
* @throws IllegalArgumentException
*/
public static void checkBufferSize(Buffer buf, int size) {
- if (buf.remaining() < size) {
+ if ( LWJGLUtil.CHECKS && buf.remaining() < size) {
throwBufferSizeException(buf, size);
}
}
public static void checkBuffer(ByteBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
public static void checkBuffer(ShortBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
public static void checkBuffer(IntBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
public static void checkBuffer(LongBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
public static void checkBuffer(FloatBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
public static void checkBuffer(DoubleBuffer buf, int size) {
- checkBufferSize(buf, size);
- checkDirect(buf);
+ if ( LWJGLUtil.CHECKS ) {
+ checkBufferSize(buf, size);
+ checkDirect(buf);
+ }
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/LWJGLUtil.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -266,7 +266,9 @@
/** Debug flag. */
public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl.util.Debug");
-
+
+ public static final boolean CHECKS = !getPrivilegedBoolean("org.lwjgl.util.NoChecks");
+
static {
LWJGLIcon16x16.flip();
LWJGLIcon32x32.flip();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -50,7 +50,7 @@
* $Id$
* @version $Revision$
*/
-public class AWTGLCanvas extends Canvas implements Drawable, ComponentListener, HierarchyListener {
+public class AWTGLCanvas extends Canvas implements DrawableLWJGL, ComponentListener, HierarchyListener {
private static final long serialVersionUID = 1L;
@@ -109,13 +109,12 @@
return context;
}
+ /** This method should only be called internally. */
public Context createSharedContext() throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- synchronized ( SYNC_LOCK ) {
- if ( context == null ) throw new IllegalStateException("Canvas not yet displayable");
+ synchronized ( SYNC_LOCK ) {
+ if ( context == null ) throw new IllegalStateException("Canvas not yet displayable");
- return new Context(peer_info, context.getContextAttribs(), context);
- }
+ return new Context(peer_info, context.getContextAttribs(), context);
}
}
@@ -213,12 +212,11 @@
}
}
- public void releaseContext() throws LWJGLException {
+ public boolean isCurrent() throws LWJGLException {
synchronized ( SYNC_LOCK ) {
- if ( context == null )
- throw new IllegalStateException("Canvas not yet displayable");
- if ( context.isCurrent() )
- Context.releaseCurrentContext();
+ if ( context == null ) throw new IllegalStateException("Canvas not yet displayable");
+
+ return context.isCurrent();
}
}
@@ -234,6 +232,15 @@
}
}
+ public void releaseContext() throws LWJGLException {
+ synchronized ( SYNC_LOCK ) {
+ if ( context == null )
+ throw new IllegalStateException("Canvas not yet displayable");
+ if ( context.isCurrent() )
+ Context.releaseCurrentContext();
+ }
+ }
+
/** Destroy the OpenGL context. This happens when the component becomes undisplayable */
public final void destroy() {
synchronized ( SYNC_LOCK ) {
@@ -279,7 +286,7 @@
peer_info.lockAndGetHandle();
try {
if ( context == null ) {
- this.context = new Context(peer_info, attribs, drawable != null ? drawable.getContext() : null);
+ this.context = new Context(peer_info, attribs, drawable != null ? ((DrawableLWJGL)drawable).getContext() : null);
first_run = true;
}
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AbstractDrawable.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -0,0 +1,82 @@
+package org.lwjgl.opengl;
+
+import org.lwjgl.LWJGLException;
+import org.lwjgl.LWJGLUtil;
+
+/**
+ * @author Spasi
+ * @since 22 \xC1\xF0\xF1 2010
+ */
+abstract class AbstractDrawable implements DrawableLWJGL {
+
+ /** Handle to the native GL rendering context */
+ protected PeerInfo peer_info;
+
+ /** The OpenGL Context. */
+ protected Context context;
+
+ protected AbstractDrawable() {
+ }
+
+ public Context getContext() {
+ synchronized ( GlobalLock.lock ) {
+ return context;
+ }
+ }
+
+ public Context createSharedContext() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ checkDestroyed();
+ return new Context(peer_info, context.getContextAttribs(), context);
+ }
+ }
+
+ public boolean isCurrent() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ checkDestroyed();
+ return context.isCurrent();
+ }
+ }
+
+ public void makeCurrent() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ checkDestroyed();
+ context.makeCurrent();
+ }
+ }
+
+ public void releaseContext() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ checkDestroyed();
+ if ( context.isCurrent() )
+ Context.releaseCurrentContext();
+ }
+ }
+
+ public void destroy() {
+ synchronized ( GlobalLock.lock ) {
+ if ( context == null )
+ return;
+
+ try {
+ releaseContext();
+
+ context.forceDestroy();
+ context = null;
+
+ if ( peer_info != null ) {
+ peer_info.destroy();
+ peer_info = null;
+ }
+ } catch (LWJGLException e) {
+ LWJGLUtil.log("Exception occurred while destroying Drawable: " + e);
+ }
+ }
+ }
+
+ protected final void checkDestroyed() {
+ if ( context == null )
+ throw new IllegalStateException("The Drawable has no context available.");
+ }
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/BaseReferences.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -32,7 +32,6 @@
package org.lwjgl.opengl;
import java.nio.Buffer;
-import java.nio.IntBuffer;
import java.util.Arrays;
class BaseReferences {
@@ -49,24 +48,19 @@
int indirectBuffer;
BaseReferences(ContextCapabilities caps) {
- IntBuffer temp = caps.scratch_int_buffer;
-
int max_vertex_attribs;
- if (caps.OpenGL20 || caps.GL_ARB_vertex_shader) {
- GL11.glGetInteger(ARBVertexShader.GL_MAX_VERTEX_ATTRIBS_ARB, temp);
- max_vertex_attribs = temp.get(0);
- } else
+ if (caps.OpenGL20 || caps.GL_ARB_vertex_shader)
+ max_vertex_attribs = GL11.glGetInteger(ARBVertexShader.GL_MAX_VERTEX_ATTRIBS_ARB);
+ else
max_vertex_attribs = 0;
glVertexAttribPointer_buffer = new Buffer[max_vertex_attribs];
int max_texture_units;
- 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
+ if (caps.OpenGL20)
+ max_texture_units = GL11.glGetInteger(GL20.GL_MAX_TEXTURE_IMAGE_UNITS);
+ else if (caps.OpenGL13 || caps.GL_ARB_multitexture)
+ max_texture_units = GL11.glGetInteger(GL13.GL_MAX_TEXTURE_UNITS);
+ else
max_texture_units = 1;
glTexCoordPointer_buffer = new Buffer[max_texture_units];
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -106,14 +106,10 @@
/** Swap interval */
private static int swap_interval;
- /** A unique context object, so we can track different contexts between creates() and destroys() */
- private static PeerInfo peer_info;
- private static Context context;
-
/** The Drawable instance that tracks the current Display context */
- private final static Drawable drawable;
+ private static final AbstractDrawable drawable;
- private static boolean window_created = false;
+ private static boolean window_created;
private static boolean parent_resized;
@@ -137,32 +133,21 @@
} catch (LWJGLException e) {
throw new RuntimeException(e);
}
- drawable = new Drawable() {
- public Context getContext() {
+ drawable = new AbstractDrawable() {
+ public void destroy() {
synchronized ( GlobalLock.lock ) {
- return isCreated() ? context : null;
- }
- }
+ if ( !isCreated() )
+ return;
- public Context createSharedContext() throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- if ( !isCreated() ) throw new IllegalStateException("Display must be created.");
-
- return new Context(peer_info, context.getContextAttribs(), context);
+ releaseDrawable();
+ super.destroy();
+ destroyWindow();
+ x = y = -1;
+ cached_icons = null;
+ reset();
+ removeShutdownHook();
}
}
-
- public void makeCurrent() throws LWJGLException {
- Display.makeCurrent();
- }
-
- public void releaseContext() throws LWJGLException {
- Display.releaseContext();
- }
-
- public void destroy() {
- Display.destroy();
- }
};
}
@@ -258,24 +243,23 @@
* @throws LWJGLException if the display mode could not be set
*/
public static void setDisplayMode(DisplayMode mode) throws LWJGLException {
- synchronized (GlobalLock.lock) {
- if (mode == null)
+ synchronized ( GlobalLock.lock ) {
+ if ( mode == null )
throw new NullPointerException("mode must be non-null");
boolean was_fullscreen = isFullscreen();
current_mode = mode;
- if (isCreated()) {
+ if ( isCreated() ) {
destroyWindow();
// If mode is not fullscreen capable, make sure we are in windowed mode
try {
- if (was_fullscreen && !isFullscreen())
+ if ( was_fullscreen && !isFullscreen() )
display_impl.resetDisplayMode();
- else if (isFullscreen())
+ else if ( isFullscreen() )
switchDisplayMode();
createWindow();
makeCurrentAndSetSwapInterval();
} catch (LWJGLException e) {
- destroyContext();
- destroyPeerInfo();
+ drawable.destroy();
display_impl.resetDisplayMode();
throw e;
}
@@ -288,9 +272,9 @@
}
private static int getWindowX() {
- if (!isFullscreen() && parent == null) {
+ if ( !isFullscreen() && parent == null ) {
// if no display location set, center window
- if (x == -1) {
+ if ( x == -1 ) {
return Math.max(0, (initial_mode.getWidth() - current_mode.getWidth()) / 2);
} else {
return x;
@@ -301,7 +285,7 @@
}
private static int getWindowY() {
- if (!isFullscreen() && parent == null) {
+ if ( !isFullscreen() && parent == null ) {
// if no display location set, center window
if ( y == -1 ) {
return Math.max(0, (initial_mode.getHeight() - current_mode.getHeight()) / 2);
@@ -344,6 +328,7 @@
private static void releaseDrawable() {
try {
+ Context context = drawable.context;
if ( context != null && context.isCurrent() ) {
Context.releaseCurrentContext();
context.releaseDrawable();
@@ -483,13 +468,13 @@
*/
public static void setParent(Canvas parent) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- if (Display.parent != parent) {
+ if ( Display.parent != parent ) {
Display.parent = parent;
if ( !isCreated() )
return;
destroyWindow();
try {
- if (isFullscreen()) {
+ if ( isFullscreen() ) {
switchDisplayMode();
} else {
display_impl.resetDisplayMode();
@@ -497,8 +482,7 @@
createWindow();
makeCurrentAndSetSwapInterval();
} catch (LWJGLException e) {
- destroyContext();
- destroyPeerInfo();
+ drawable.destroy();
display_impl.resetDisplayMode();
throw e;
}
@@ -539,18 +523,18 @@
private static void setDisplayModeAndFullscreenInternal(boolean fullscreen, DisplayMode mode) throws LWJGLException {
synchronized ( GlobalLock.lock ) {
- if (mode == null)
+ if ( mode == null )
throw new NullPointerException("mode must be non-null");
DisplayMode old_mode = current_mode;
current_mode = mode;
boolean was_fullscreen = isFullscreen();
Display.fullscreen = fullscreen;
- if (was_fullscreen != isFullscreen() || !mode.equals(old_mode)) {
- if (!isCreated())
+ if ( was_fullscreen != isFullscreen() || !mode.equals(old_mode) ) {
+ if ( !isCreated() )
return;
destroyWindow();
try {
- if (isFullscreen()) {
+ if ( isFullscreen() ) {
switchDisplayMode();
} else {
display_impl.resetDisplayMode();
@@ -558,8 +542,7 @@
createWindow();
makeCurrentAndSetSwapInterval();
} catch (LWJGLException e) {
- destroyContext();
- destroyPeerInfo();
+ drawable.destroy();
display_impl.resetDisplayMode();
throw e;
}
@@ -569,7 +552,7 @@
/** @return whether the Display is in fullscreen mode */
public static boolean isFullscreen() {
- synchronized (GlobalLock.lock) {
+ synchronized ( GlobalLock.lock ) {
return fullscreen && current_mode.isFullscreenCapable();
}
}
@@ -671,7 +654,6 @@
* Update the window. If the window is visible clears
* the dirty flag and calls swapBuffers() and finally
* polls the input devices.
- *
*/
public static void update() {
update(true);
@@ -730,25 +712,21 @@
* @throws LWJGLException If the context could not be released
*/
public static void releaseContext() throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- if ( !isCreated() )
- throw new IllegalStateException("Display is not created");
- if ( context.isCurrent() )
- Context.releaseCurrentContext();
- }
+ drawable.releaseContext();
}
+ /** Returns true if the Display's context is current in the current thread. */
+ public static boolean isCurrent() throws LWJGLException {
+ return drawable.isCurrent();
+ }
+
/**
* Make the Display the current rendering context for GL calls.
*
* @throws LWJGLException If the context could not be made current
*/
public static void makeCurrent() throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- if ( !isCreated() )
- throw new IllegalStateException("Display is not created");
- context.makeCurrent();
- }
+ drawable.makeCurrent();
}
private static void removeShutdownHook() {
@@ -868,19 +846,19 @@
throw new NullPointerException("pixel_format cannot be null");
removeShutdownHook();
registerShutdownHook();
- if (isFullscreen())
+ if ( isFullscreen() )
switchDisplayMode();
try {
- peer_info = display_impl.createPeerInfo(pixel_format);
+ drawable.peer_info = display_impl.createPeerInfo(pixel_format);
try {
createWindow();
try {
- context = new Context(peer_info, attribs, shared_drawable != null ? shared_drawable.getContext() : null);
+ drawable.context = new Context(drawable.peer_info, attribs, shared_drawable != null ? ((AbstractDrawable)shared_drawable).getContext() : null);
try {
makeCurrentAndSetSwapInterval();
initContext();
} catch (LWJGLException e) {
- destroyContext();
+ drawable.destroy();
throw e;
}
} catch (LWJGLException e) {
@@ -888,7 +866,7 @@
throw e;
}
} catch (LWJGLException e) {
- destroyPeerInfo();
+ drawable.destroy();
throw e;
}
} catch (LWJGLException e) {
@@ -899,13 +877,13 @@
}
/**
- * 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
- */
+ * 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;
@@ -977,41 +955,14 @@
* regardless of whether the Display was the current rendering context.
*/
public static void destroy() {
- synchronized ( GlobalLock.lock ) {
- if ( !isCreated() ) {
- return;
- }
-
- releaseDrawable();
- destroyContext();
- destroyWindow();
- destroyPeerInfo();
- x = y = -1;
- cached_icons = null;
- reset();
- removeShutdownHook();
- }
+ drawable.destroy();
}
- private static void destroyPeerInfo() {
- peer_info.destroy();
- peer_info = null;
- }
-
- private static void destroyContext() {
- try {
- context.forceDestroy();
- } catch (LWJGLException e) {
- throw new RuntimeException(e);
- } finally {
- context = null;
- }
- }
-
/*
* Reset display mode if fullscreen. This method is also called from the shutdown hook added
* in the static constructor
*/
+
private static void reset() {
display_impl.resetDisplayMode();
current_mode = initial_mode;
@@ -1070,7 +1021,7 @@
y = new_y;
// offset if already created
- if (isCreated() && !isFullscreen()) {
+ if ( isCreated() && !isFullscreen() ) {
reshape();
}
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -42,21 +42,10 @@
public interface Drawable {
- /**
- * [INTERNAL USE ONLY] Returns the Drawable's Context.
- *
- * @return the Drawable's Context
- */
- Context getContext();
+ /** Returns true if the Drawable's context is current in the current thread. */
+ boolean isCurrent() throws LWJGLException;
/**
- * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context.
- *
- * @return a Context shared with the Drawable's Context.
- */
- Context createSharedContext() throws LWJGLException;
-
- /**
* Makes the Drawable's context current in the current thread.
*
* @throws LWJGLException
@@ -70,9 +59,7 @@
*/
void releaseContext() throws LWJGLException;
- /**
- * Destroys the Drawable.
- */
+ /** Destroys the Drawable. */
void destroy();
}
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/DrawableLWJGL.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -0,0 +1,25 @@
+package org.lwjgl.opengl;
+
+import org.lwjgl.LWJGLException;
+
+/**
+ * @author Spasi
+ * @since 23 \xC1\xF0\xF1 2010
+ */
+interface DrawableLWJGL extends Drawable {
+
+ /**
+ * [INTERNAL USE ONLY] Returns the Drawable's Context.
+ *
+ * @return the Drawable's Context
+ */
+ Context getContext();
+
+ /**
+ * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context.
+ *
+ * @return a Context shared with the Drawable's Context.
+ */
+ Context createSharedContext() throws LWJGLException;
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/GLChecks.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -35,6 +35,7 @@
import java.nio.IntBuffer;
import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLUtil;
/**
* A class to check buffer boundaries in GL methods. Many GL
@@ -60,93 +61,78 @@
}
static int getBufferObjectSize(ContextCapabilities caps, int buffer_enum) {
- IntBuffer scratch_buffer = caps.scratch_int_buffer;
- GL15.glGetBufferParameter(buffer_enum, GL15.GL_BUFFER_SIZE, scratch_buffer);
- return scratch_buffer.get(0);
+ return GL15.glGetBufferParameter(buffer_enum, GL15.GL_BUFFER_SIZE);
}
static int getBufferObjectSizeARB(ContextCapabilities caps, int buffer_enum) {
- IntBuffer scratch_buffer = caps.scratch_int_buffer;
- ARBBufferObject.glGetBufferParameterARB(buffer_enum, ARBBufferObject.GL_BUFFER_SIZE_ARB, scratch_buffer);
- return scratch_buffer.get(0);
+ return ARBBufferObject.glGetBufferParameterARB(buffer_enum, ARBBufferObject.GL_BUFFER_SIZE_ARB);
}
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);
+ return ATIVertexArrayObject.glGetObjectBufferATI(buffer, ATIVertexArrayObject.GL_OBJECT_BUFFER_SIZE_ATI);
}
static int getNamedBufferObjectSize(ContextCapabilities caps, int buffer) {
- IntBuffer scratch_buffer = caps.scratch_int_buffer;
- EXTDirectStateAccess.glGetNamedBufferParameterEXT(buffer, GL15.GL_BUFFER_SIZE, scratch_buffer);
- return scratch_buffer.get(0);
+ return EXTDirectStateAccess.glGetNamedBufferParameterEXT(buffer, GL15.GL_BUFFER_SIZE);
}
- private static boolean checkBufferObject(ContextCapabilities caps, int buffer_enum, boolean state) {
- IntBuffer scratch_buffer = caps.scratch_int_buffer;
- GL11.glGetInteger(buffer_enum, scratch_buffer);
- boolean is_enabled = scratch_buffer.get(0) != 0;
- return state == is_enabled;
- }
-
/** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureArrayVBOdisabled(ContextCapabilities caps) {
- if(StateTracker.getReferencesStack(caps).getReferences().arrayBuffer != 0)
+ if( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().arrayBuffer != 0 )
throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled");
}
/** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureArrayVBOenabled(ContextCapabilities caps) {
- if(StateTracker.getReferencesStack(caps).getReferences().arrayBuffer == 0)
+ if( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().arrayBuffer == 0 )
throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled");
}
/** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureElementVBOdisabled(ContextCapabilities caps) {
- if(StateTracker.getReferencesStack(caps).getReferences().elementArrayBuffer != 0)
+ if( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().elementArrayBuffer != 0 )
throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled");
}
/** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureElementVBOenabled(ContextCapabilities caps) {
- if(StateTracker.getReferencesStack(caps).getReferences().elementArrayBuffer == 0)
+ if( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().elementArrayBuffer == 0 )
throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled");
}
/** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureIndirectBOdisabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().indirectBuffer != 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().indirectBuffer != 0 )
throw new OpenGLException("Cannot use Buffers when Draw Indirect Object is enabled");
}
/** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureIndirectBOenabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().indirectBuffer == 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().indirectBuffer == 0 )
throw new OpenGLException("Cannot use offsets when Draw Indirect Object is disabled");
}
/** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensurePackPBOdisabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().pixelPackBuffer != 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().pixelPackBuffer != 0 )
throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled");
}
/** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensurePackPBOenabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().pixelPackBuffer == 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().pixelPackBuffer == 0 )
throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled");
}
/** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */
static void ensureUnpackPBOdisabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().pixelUnpackBuffer != 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().pixelUnpackBuffer != 0 )
throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled");
}
/** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */
static void ensureUnpackPBOenabled(ContextCapabilities caps) {
- if ( StateTracker.getReferencesStack(caps).getReferences().pixelUnpackBuffer == 0 )
+ if ( LWJGLUtil.CHECKS && StateTracker.getReferencesStack(caps).getReferences().pixelUnpackBuffer == 0 )
throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled");
}
@@ -162,19 +148,19 @@
* @return the size, in elements, of the image
*/
static int calculateImageStorage(Buffer buffer, int format, int type, int width, int height, int depth) {
- return calculateImageStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer);
+ return LWJGLUtil.CHECKS ? calculateImageStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0;
}
static int calculateTexImage1DStorage(Buffer buffer, int format, int type, int width) {
- return calculateTexImage1DStorage(format, type, width) >> BufferUtils.getElementSizeExponent(buffer);
+ return LWJGLUtil.CHECKS ? calculateTexImage1DStorage(format, type, width) >> BufferUtils.getElementSizeExponent(buffer) : 0;
}
static int calculateTexImage2DStorage(Buffer buffer, int format, int type, int width, int height) {
- return calculateTexImage2DStorage(format, type, width, height) >> BufferUtils.getElementSizeExponent(buffer);
+ return LWJGLUtil.CHECKS ? calculateTexImage2DStorage(format, type, width, height) >> BufferUtils.getElementSizeExponent(buffer) : 0;
}
static int calculateTexImage3DStorage(Buffer buffer, int format, int type, int width, int height, int depth) {
- return calculateTexImage3DStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer);
+ return LWJGLUtil.CHECKS ? calculateTexImage3DStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0;
}
/**
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -78,7 +78,7 @@
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws Exception {
Application.getApplication().addApplicationListener(new ApplicationAdapter() {
- public final void handleQuit(ApplicationEvent event) {
+ public void handleQuit(ApplicationEvent event) {
doHandleQuit();
}
});
@@ -271,15 +271,16 @@
*
* - elias
*/
+ AbstractDrawable drawable = (AbstractDrawable)Display.getDrawable();
if (Display.isFullscreen() && (frame != null && frame.getCanvas().syncCanvasPainted() || should_update)) {
try {
- MacOSXContextImplementation.resetView(Display.getDrawable().getContext().getPeerInfo(), Display.getDrawable().getContext());
+ MacOSXContextImplementation.resetView(drawable.peer_info, drawable.context);
} catch (LWJGLException e) {
LWJGLUtil.log("Failed to reset context: " + e);
}
}
if (should_update) {
- Display.getDrawable().getContext().update();
+ drawable.context.update();
/* This is necessary to make sure the context won't "forget" about the view size */
GL11.glGetInteger(GL11.GL_VIEWPORT, current_viewport);
GL11.glViewport(current_viewport.get(0), current_viewport.get(1), current_viewport.get(2), current_viewport.get(3));
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -35,7 +35,6 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.LWJGLException;
-import org.lwjgl.LWJGLUtil;
import org.lwjgl.Sys;
/**
@@ -49,7 +48,7 @@
* @version $Revision$
* $Id$
*/
-public final class Pbuffer implements Drawable {
+public final class Pbuffer extends AbstractDrawable {
/**
* Indicates that Pbuffers can be created.
*/
@@ -136,11 +135,6 @@
public static final int DEPTH_BUFFER = RenderTexture.WGL_DEPTH_COMPONENT_NV;
/**
- * Handle to the native GL rendering context
- */
- private final PeerInfo peer_info;
-
- /**
* Width
*/
private final int width;
@@ -150,10 +144,6 @@
*/
private final int height;
- private final Context context;
-
- private boolean destroyed;
-
static {
Sys.initialize();
}
@@ -227,14 +217,11 @@
this.width = width;
this.height = height;
this.peer_info = createPbuffer(width, height, pixel_format, renderTexture);
- Context shared_context = null;
- if (shared_drawable != null) {
- shared_context = shared_drawable.getContext();
- } else {
- Drawable display_drawable = Display.getDrawable();
- if (display_drawable != null)
- shared_context = display_drawable.getContext();
- }
+ Context shared_context;
+ if (shared_drawable != null)
+ shared_context = ((DrawableLWJGL)shared_drawable).getContext();
+ else
+ shared_context = ((DrawableLWJGL)Display.getDrawable()).getContext(); // May be null
this.context = new Context(peer_info, attribs, shared_context);
}
@@ -251,21 +238,6 @@
renderTexture.pBufferAttribs);
}
- public Context getContext() {
- return context;
- }
-
- public Context createSharedContext() throws LWJGLException {
- synchronized ( GlobalLock.lock ) {
- return new Context(peer_info, context.getContextAttribs(), context);
- }
- }
-
- private void checkDestroyed() {
- if (destroyed)
- throw new IllegalStateException("Pbuffer is destroyed");
- }
-
/**
* Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer can still
* be used, but the results are undefined. The application is expected to release the buffer if needed, destroy it and recreate
@@ -279,21 +251,6 @@
}
/**
- * Method to make the Pbuffer context current. All subsequent OpenGL calls will go to this buffer.
- * @throws LWJGLException if the context could not be made current
- */
- public synchronized void makeCurrent() throws LWJGLException {
- checkDestroyed();
- context.makeCurrent();
- }
-
- public void releaseContext() throws LWJGLException {
- checkDestroyed();
- if ( context.isCurrent() )
- Context.releaseCurrentContext();
- }
-
- /**
* Gets the Pbuffer capabilities.
*
* @return a bitmask of Pbuffer capabilities.
@@ -302,22 +259,6 @@
return Display.getImplementation().getPbufferCapabilities();
}
- /**
- * Destroys the Pbuffer. After this call, there will be no valid GL rendering context - regardless of whether this Pbuffer was
- * the current rendering context or not.
- */
- public synchronized void destroy() {
- if (destroyed)
- return;
- try {
- context.forceDestroy();
- peer_info.destroy();
- destroyed = true;
- } catch (LWJGLException e) {
- LWJGLUtil.log("Exception occurred while destroying pbuffer: " + e);
- }
- }
-
// -----------------------------------------------------------------------------------------
// ------------------------------- Render-to-Texture Methods -------------------------------
// -----------------------------------------------------------------------------------------
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -32,7 +32,6 @@
package org.lwjgl.opengl;
import org.lwjgl.LWJGLException;
-import org.lwjgl.LWJGLUtil;
/**
* @author Spasi
@@ -46,51 +45,14 @@
*
* @author Spasi
*/
-public final class SharedDrawable implements Drawable {
+public final class SharedDrawable extends AbstractDrawable {
- private Context context;
-
- private boolean destroyed;
-
public SharedDrawable(final Drawable drawable) throws LWJGLException {
- this.context = drawable.createSharedContext();
+ this.context = ((DrawableLWJGL)drawable).createSharedContext();
}
- public Context getContext() {
- return context;
- }
-
public Context createSharedContext() {
throw new UnsupportedOperationException();
}
- public void makeCurrent() throws LWJGLException {
- checkDestroyed();
- context.makeCurrent();
-
- }
-
- public void releaseContext() throws LWJGLException {
- checkDestroyed();
- if ( context.isCurrent() )
- Context.releaseCurrentContext();
- }
-
- public void destroy() {
- if ( destroyed )
- return;
-
- try {
- context.forceDestroy();
- destroyed = true;
- } catch (LWJGLException e) {
- LWJGLUtil.log("Exception occurred while destroying SharedDrawable: " + e);
- }
- }
-
- private void checkDestroyed() {
- if ( destroyed )
- throw new IllegalStateException("SharedDrawable is destroyed");
- }
-
}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/WindowsDisplay.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -437,8 +437,9 @@
* is maximized helps some gfx cards recover from fullscreen
*/
try {
- if (Display.getDrawable().getContext() != null && Display.getDrawable().getContext().isCurrent())
- Display.getDrawable().getContext().makeCurrent();
+ Context context = ((DrawableLWJGL)Display.getDrawable()).getContext();
+ if (context != null && context.isCurrent())
+ context.makeCurrent();
} catch (LWJGLException e) {
LWJGLUtil.log("Exception occurred while trying to make context current: " + e);
}
@@ -973,4 +974,4 @@
return "Rect: top = " + top + " bottom = " + bottom + " left = " + left + " right = " + right;
}
}
-}
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -78,8 +78,6 @@
System.out.println("** Sleeping, no texture created yet **");
- long start = System.currentTimeMillis();
-
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -63,7 +63,6 @@
writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";");
writer.println("\tfinal StateTracker tracker = new StateTracker();");
- writer.println("\tfinal IntBuffer scratch_int_buffer = BufferUtils.createIntBuffer(16);");
writer.println();
if ( !context_specific ) {
writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;");
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/GeneratorVisitor.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -180,10 +180,7 @@
java_writer.println();
java_writer.println("package " + d.getPackage().getQualifiedName() + ";");
java_writer.println();
- java_writer.println("import org.lwjgl.LWJGLException;");
- java_writer.println("import org.lwjgl.BufferChecks;");
- // DISABLED: indirect buffer support
- //java_writer.println("import org.lwjgl.NondirectBufferWrapper;");
+ java_writer.println("import org.lwjgl.*;");
java_writer.println("import java.nio.*;");
java_writer.println();
Utils.printDocComment(java_writer, d);
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -261,9 +261,12 @@
// DISABLED: indirect buffer support
//printNondirectParameterCopies(writer, method, mode);
if (has_result) {
- if ( method.getAnnotation(GLreturn.class) == null )
- writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ";");
- else
+ if ( method.getAnnotation(GLreturn.class) == null ) {
+ if ( ByteBuffer.class.equals(Utils.getJavaType(result_type)) )
+ writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ".order(ByteOrder.nativeOrder());"); // safeNewBuffer returns a direct ByteBuffer with BIG_ENDIAN order.
+ else
+ writer.println("\t\treturn " + Utils.RESULT_VAR_NAME + ";");
+ } else
Utils.printGLReturnPost(writer, method, method.getAnnotation(GLreturn.class));
}
writer.println("\t}");
@@ -490,7 +493,7 @@
cachedReference != null &&
(mode != Mode.BUFFEROBJECT || param.getAnnotation(BufferObject.class) == null) &&
param.getAnnotation(Result.class) == null) {
- writer.print("\t\t" + Utils.CHECKS_CLASS_NAME + ".getReferences(caps).");
+ writer.print("\t\tif ( LWJGLUtil.CHECKS ) " + Utils.CHECKS_CLASS_NAME + ".getReferences(caps).");
if(cachedReference.name().length() > 0) {
writer.print(cachedReference.name());
} else {
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java 2010-04-22 18:32:46 UTC (rev 3333)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java 2010-04-22 23:21:48 UTC (rev 3334)
@@ -71,6 +71,11 @@
@StripPostfix("params")
void glGetObjectBufferivATI(@GLuint int buffer, @GLenum int pname, @OutParameter @Check IntBuffer params);
+ @Alternate("glGetObjectBufferivATI")
+ @GLreturn("params")
+ @StripPostfix("params")
+ void glGetObjectBufferivATI2(@GLuint int buffer, @GLenum int pname, @OutParameter IntBuffer params);
+
void glFreeObjectBufferATI(@GLuint int buffer);
void glArrayObjectATI(@GLenum int array, int size, @GLenum int type, @GLsizei int stride, @GLuint int buffer, @GLuint int offset);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-04-22 18:32:53
|
Revision: 3333
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3333&view=rev
Author: kappa1
Date: 2010-04-22 18:32:46 +0000 (Thu, 22 Apr 2010)
Log Message:
-----------
Remove extra permissions from XRandR and just allow minimal permissions needed by the LinuxDisplay.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-04-20 18:21:05 UTC (rev 3332)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-04-22 18:32:46 UTC (rev 3333)
@@ -48,6 +48,9 @@
import org.lwjgl.LWJGLUtil;
import org.lwjgl.opengl.XRandR.Screen;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
final class LinuxDisplay implements DisplayImplementation {
/* X11 constants */
public final static int CurrentTime = 0;
@@ -524,7 +527,12 @@
try {
if( current_displaymode_extension == XRANDR && savedXrandrConfig.length > 0 )
{
- XRandR.setConfiguration( savedXrandrConfig );
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ XRandR.setConfiguration( savedXrandrConfig );
+ return null;
+ }
+ });
}
else
{
@@ -615,7 +623,11 @@
throw new LWJGLException("No modes available");
switch (current_displaymode_extension) {
case XRANDR:
- savedXrandrConfig = XRandR.getConfiguration();
+ savedXrandrConfig = (Screen[])AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return XRandR.getConfiguration();
+ }
+ });
saved_mode = getCurrentXRandrMode();
break;
case XF86VIDMODE:
@@ -890,7 +902,12 @@
try {
if( current_displaymode_extension == XRANDR && savedXrandrConfig.length > 0 )
{
- XRandR.setConfiguration( savedXrandrConfig );
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ XRandR.setConfiguration( savedXrandrConfig );
+ return null;
+ }
+ });
}
else
{
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-20 18:21:05 UTC (rev 3332)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-22 18:32:46 UTC (rev 3333)
@@ -40,8 +40,6 @@
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
/**
* Utility for working with the xrandr commmand-line utility. Assumes
@@ -105,12 +103,7 @@
* xrandr is not supported
*/
public static Screen[] getConfiguration() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- populate();
- return null;
- }
- });
+ populate();
return (Screen[]) current.clone();
}
@@ -119,20 +112,11 @@
* @param screens
* The desired screen set, may not be <code>null</code>
*/
- public static void setConfiguration(final Screen[]/* ... */screens) {
+ public static void setConfiguration(Screen[]/* ... */screens) {
if (screens.length == 0) {
throw new IllegalArgumentException("Must specify at least one screen");
}
-
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- setScreen(screens);
- return null;
- }
- });
- }
-
- private static void setScreen(Screen[] screens) {
+
List/* <String> */cmd = new ArrayList/* <String> */();
cmd.add("xrandr");
@@ -173,6 +157,7 @@
} catch (IOException e) {
e.printStackTrace();
}
+
}
/**
@@ -180,13 +165,7 @@
* xrandr is not supported
*/
public static String[] getScreenNames() {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- populate();
- return null;
- }
- });
-
+ populate();
return (String[]) screens.keySet().toArray(new String[screens.size()]);
}
@@ -196,13 +175,7 @@
* <code>null</code> if there is no such screen
*/
public static Screen[] getResolutions(String name) {
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- populate();
- return null;
- }
- });
-
+ populate();
// clone the array to prevent held copies being altered
return (Screen[]) ((Screen[]) screens.get(name)).clone();
}
@@ -274,4 +247,4 @@
return name + " " + width + "x" + height + " @ " + xPos + "x" + yPos;
}
}
-}
+}
\ 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: <sp...@us...> - 2010-04-20 18:21:12
|
Revision: 3332
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3332&view=rev
Author: spasi
Date: 2010-04-20 18:21:05 +0000 (Tue, 20 Apr 2010)
Log Message:
-----------
Added support for a new Drawable type (SharedDrawable) that shares its context with another Drawable.
Added new methods to the Drawable interface (makeCurrent, releaseContext, destroy).
Added a background thread texture loading test (using either Pbuffer or SharedDrawable).
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DemoBox.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/
trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java
trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -109,6 +109,16 @@
return context;
}
+ public Context createSharedContext() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ synchronized ( SYNC_LOCK ) {
+ if ( context == null ) throw new IllegalStateException("Canvas not yet displayable");
+
+ return new Context(peer_info, context.getContextAttribs(), context);
+ }
+ }
+ }
+
/** Constructor using the default PixelFormat. */
public AWTGLCanvas() throws LWJGLException {
this(new PixelFormat());
@@ -175,7 +185,7 @@
*/
public void removeNotify() {
synchronized ( SYNC_LOCK ) {
- destroyContext();
+ destroy();
super.removeNotify();
}
}
@@ -225,7 +235,7 @@
}
/** Destroy the OpenGL context. This happens when the component becomes undisplayable */
- private void destroyContext() {
+ public final void destroy() {
synchronized ( SYNC_LOCK ) {
try {
if ( context != null ) {
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Context.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -61,7 +61,7 @@
private final ByteBuffer handle;
private final PeerInfo peer_info;
- private final IntBuffer attribList;
+ private final ContextAttribs contextAttribs;
private final boolean forwardCompatible;
/** Whether the context has been destroyed */
@@ -94,6 +94,10 @@
return peer_info;
}
+ ContextAttribs getContextAttribs() {
+ return contextAttribs;
+ }
+
static Context getCurrentContext() {
return (Context)current_context_local.get();
}
@@ -109,6 +113,9 @@
GLContext.loadOpenGLLibrary();
try {
this.peer_info = peer_info;
+ this.contextAttribs = attribs;
+
+ IntBuffer attribList;
if ( attribs != null ) {
attribList = attribs.getAttribList();
forwardCompatible = attribs.isForwardCompatible();
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Display.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -143,6 +143,26 @@
return isCreated() ? context : null;
}
}
+
+ public Context createSharedContext() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ if ( !isCreated() ) throw new IllegalStateException("Display must be created.");
+
+ return new Context(peer_info, context.getContextAttribs(), context);
+ }
+ }
+
+ public void makeCurrent() throws LWJGLException {
+ Display.makeCurrent();
+ }
+
+ public void releaseContext() throws LWJGLException {
+ Display.releaseContext();
+ }
+
+ public void destroy() {
+ Display.destroy();
+ }
};
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Drawable.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -31,6 +31,8 @@
*/
package org.lwjgl.opengl;
+import org.lwjgl.LWJGLException;
+
/**
* The Drawable interface describes an OpenGL drawable with an associated
* Context.
@@ -39,5 +41,38 @@
*/
public interface Drawable {
+
+ /**
+ * [INTERNAL USE ONLY] Returns the Drawable's Context.
+ *
+ * @return the Drawable's Context
+ */
Context getContext();
+
+ /**
+ * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context.
+ *
+ * @return a Context shared with the Drawable's Context.
+ */
+ Context createSharedContext() throws LWJGLException;
+
+ /**
+ * Makes the Drawable's context current in the current thread.
+ *
+ * @throws LWJGLException
+ */
+ void makeCurrent() throws LWJGLException;
+
+ /**
+ * If the Drawable's context is current in the current thread, no context will be current after a call to this method.
+ *
+ * @throws LWJGLException
+ */
+ void releaseContext() throws LWJGLException;
+
+ /**
+ * Destroys the Drawable.
+ */
+ void destroy();
+
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -255,6 +255,12 @@
return context;
}
+ public Context createSharedContext() throws LWJGLException {
+ synchronized ( GlobalLock.lock ) {
+ return new Context(peer_info, context.getContextAttribs(), context);
+ }
+ }
+
private void checkDestroyed() {
if (destroyed)
throw new IllegalStateException("Pbuffer is destroyed");
@@ -281,6 +287,12 @@
context.makeCurrent();
}
+ public void releaseContext() throws LWJGLException {
+ checkDestroyed();
+ if ( context.isCurrent() )
+ Context.releaseCurrentContext();
+ }
+
/**
* Gets the Pbuffer capabilities.
*
Added: trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/SharedDrawable.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -0,0 +1,96 @@
+/*
+ * 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.LWJGLException;
+import org.lwjgl.LWJGLUtil;
+
+/**
+ * @author Spasi
+ * @since 20 \xC1\xF0\xF1 2010
+ */
+
+/**
+ * A Drawable implementation that shares its context with another Drawable. This is useful
+ * for background loading of resources. See org.lwjgl.test.opengl.multithread.BackgroundLoad
+ * for an example.
+ *
+ * @author Spasi
+ */
+public final class SharedDrawable implements Drawable {
+
+ private Context context;
+
+ private boolean destroyed;
+
+ public SharedDrawable(final Drawable drawable) throws LWJGLException {
+ this.context = drawable.createSharedContext();
+ }
+
+ public Context getContext() {
+ return context;
+ }
+
+ public Context createSharedContext() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void makeCurrent() throws LWJGLException {
+ checkDestroyed();
+ context.makeCurrent();
+
+ }
+
+ public void releaseContext() throws LWJGLException {
+ checkDestroyed();
+ if ( context.isCurrent() )
+ Context.releaseCurrentContext();
+ }
+
+ public void destroy() {
+ if ( destroyed )
+ return;
+
+ try {
+ context.forceDestroy();
+ destroyed = true;
+ } catch (LWJGLException e) {
+ LWJGLUtil.log("Exception occurred while destroying SharedDrawable: " + e);
+ }
+ }
+
+ private void checkDestroyed() {
+ if ( destroyed )
+ throw new IllegalStateException("SharedDrawable is destroyed");
+ }
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DemoBox.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DemoBox.java 2010-04-16 19:06:53 UTC (rev 3331)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/awt/DemoBox.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -150,7 +150,7 @@
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
- demoCanvas.destroy();
+ demoCanvas.destroyCanvas();
dispose();
System.exit(0);
}
@@ -269,7 +269,7 @@
}
}
- public void destroy() {
+ public void destroyCanvas() {
setActiveDemo(null);
renderThread = null;
}
Added: trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -0,0 +1,296 @@
+/*
+ * 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.test.opengl.multithread;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+import org.lwjgl.opengl.*;
+import org.lwjgl.util.glu.GLU;
+import org.lwjgl.util.glu.Sphere;
+
+import java.nio.FloatBuffer;
+
+/**
+ * A test of loading textures in a background thread. This can be achieved in 2 ways:
+ * <br>
+ * a) A dummy Pbuffer is created and its context shares the rendering context.<br>
+ * b) A SharedDrawable is used.<br>
+ * <br>
+ * When the test starts, there's no texture created and rendering is done with texturing disabled.
+ * 2 seconds later a "dummy" texture is created in the background thread and texturing is enabled. This dummy texture
+ * can by anything the developer wants to have as a placeholder while textures are being loaded.
+ * Finally, 5 seconds later the "true" texture is loaded and displayed. This texture will change every 5 seconds after
+ * that, until the test is terminated (ESC key).
+ *
+ * @author Spasi
+ */
+public final class BackgroundLoadTest {
+
+ private static boolean run = true;
+
+ private static BackgroundLoader backgroundLoader;
+
+ private static Sphere sphere;
+
+ private BackgroundLoadTest() {
+ }
+
+ public static void main(String[] args) {
+ initialize(args);
+
+ Util.checkGLError();
+
+ try {
+ backgroundLoader.start();
+ } catch (LWJGLException e) {
+ kill("Failed to start background thread.", e);
+ }
+
+ Util.checkGLError();
+
+ while ( run ) {
+ if ( !Display.isVisible() )
+ Thread.yield();
+ else {
+ handleIO();
+
+ GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
+
+ renderObject();
+
+ Util.checkGLError();
+
+ // Restore camera position.
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ }
+
+ Display.update();
+
+ if ( Display.isCloseRequested() )
+ break;
+ }
+
+ cleanup();
+ System.exit(0);
+ }
+
+ private static void initialize(String[] args) {
+ if ( args.length != 1 )
+ argsError();
+
+ DisplayMode displayMode = null;
+
+ try {
+ DisplayMode[] modes = Display.getAvailableDisplayModes();
+
+ displayMode = chooseMode(modes, 1024, 768);
+ if ( displayMode == null )
+ displayMode = chooseMode(modes, 800, 600);
+ if ( displayMode == null )
+ displayMode = chooseMode(modes, 640, 480);
+ if ( displayMode == null )
+ kill("Failed to set an appropriate display mode.");
+
+ System.out.println("Setting display mode to: " + displayMode);
+ Display.setDisplayMode(displayMode);
+ Display.setTitle("Background Loading Test");
+ Display.create(new PixelFormat(8, 24, 0));
+ } catch (LWJGLException e) {
+ kill(e.getMessage());
+ }
+
+ GL11.glViewport(0, 0, displayMode.getWidth(), displayMode.getHeight());
+
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+ GL11.glLoadIdentity();
+ GLU.gluPerspective(45, displayMode.getWidth() / (float)displayMode.getHeight(), 1.0f, 10.0f);
+
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glLoadIdentity();
+
+ // Setup camera position.
+ GL11.glTranslatef(0.0f, 0.0f, -4.0f);
+ GL11.glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
+ GL11.glPushMatrix();
+
+ GL11.glClearDepth(1.0f);
+ GL11.glDepthFunc(GL11.GL_LEQUAL);
+
+ GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
+
+ GL11.glFrontFace(GL11.GL_CCW);
+ GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL);
+
+ GL11.glCullFace(GL11.GL_BACK);
+ GL11.glEnable(GL11.GL_CULL_FACE);
+
+ GL11.glAlphaFunc(GL11.GL_GREATER, 0.0f);
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GL11.glDisable(GL11.GL_BLEND);
+
+ GL11.glShadeModel(GL11.GL_SMOOTH);
+
+ final FloatBuffer vectorBuffer = BufferUtils.createFloatBuffer(4);
+
+ vectorBuffer.clear();
+ vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 1.0f).put(3, 1.0f);
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, vectorBuffer);
+
+ vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 1.0f).put(3, 1.0f);
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, vectorBuffer);
+
+ vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 0.5f).put(3, 1.0f);
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_SPECULAR, vectorBuffer);
+
+ vectorBuffer.put(0, -1.0f / 3.0f).put(1, 1.0f / 3.0f).put(2, 1.0f / 3.0f).put(3, 0.0f); // Infinite
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, vectorBuffer);
+
+ vectorBuffer.put(0, 0.2f).put(1, 0.2f).put(2, 0.2f).put(3, 1.0f);
+ GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, vectorBuffer);
+
+ GL11.glEnable(GL11.GL_LIGHT0);
+ GL11.glEnable(GL11.GL_LIGHTING);
+
+ sphere = new Sphere();
+
+ if ( "PB".equalsIgnoreCase(args[0]) ) {
+ backgroundLoader = new BackgroundLoader() {
+ Drawable getDrawable() throws LWJGLException {
+ return new Pbuffer(2, 2, new PixelFormat(8, 24, 0), Display.getDrawable());
+ }
+ };
+ } else if ( "SD".equalsIgnoreCase(args[0]) ) {
+ backgroundLoader = new BackgroundLoader() {
+ Drawable getDrawable() throws LWJGLException {
+ return new SharedDrawable(Display.getDrawable());
+ }
+ };
+ } else {
+ argsError();
+ }
+ }
+
+ private static void handleIO() {
+ if ( Keyboard.getNumKeyboardEvents() != 0 ) {
+ while ( Keyboard.next() ) {
+ if ( Keyboard.getEventKeyState() )
+ continue;
+
+ switch ( Keyboard.getEventKey() ) {
+ case Keyboard.KEY_ESCAPE:
+ run = false;
+ break;
+ }
+ }
+ }
+
+ while ( Mouse.next() ) ;
+ }
+
+ static void renderObject() {
+ GL11.glColor3f(1.0f, 1.0f, 1.0f);
+
+ int texID = backgroundLoader.getTexID();
+ if ( texID == 0 ) {
+ sphere.setTextureFlag(false);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ } else {
+ sphere.setTextureFlag(true);
+ GL11.glEnable(GL11.GL_TEXTURE_2D);
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID);
+ }
+
+ sphere.draw(1.0f, 32, 32);
+
+ if ( texID != 0 ) { // Unbind so we can update from the background thread.
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
+ GL11.glDisable(GL11.GL_TEXTURE_2D);
+ }
+ }
+
+ private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) {
+ DisplayMode bestMode = null;
+
+ for ( int i = 0; i < modes.length; i++ ) {
+ DisplayMode mode = modes[i];
+ if ( mode.getWidth() == width && mode.getHeight() == height && mode.getFrequency() <= 85 ) {
+ if ( bestMode == null || (mode.getBitsPerPixel() >= bestMode.getBitsPerPixel() && mode.getFrequency() > bestMode.getFrequency()) )
+ bestMode = mode;
+ }
+ }
+
+ return bestMode;
+ }
+
+ private static void cleanup() {
+ backgroundLoader.cleanup();
+
+ Thread.yield(); // Let background thread finish.
+
+ if ( Display.isCreated() )
+ Display.destroy();
+ }
+
+ private static void argsError() {
+ System.out.println("\nInvalid program arguments.");
+ System.out.println("\nUsage: BackgroundLoadTest <testType>, where <testType> argument can be one of the following:\n");
+ System.out.println("PB\t- Use a Pbuffer context for the background thread.");
+ System.out.println("SD\t- Use a SharedDrawable context for the background thread.");
+
+ cleanup();
+ System.exit(-1);
+ }
+
+ static void kill(String reason) {
+ System.out.println("The BackgroundLoadTest program was terminated because an error occured.\n");
+ System.out.println("Reason: " + (reason == null ? "Unknown" : reason));
+
+ cleanup();
+ System.exit(-1);
+ }
+
+ static void kill(String reason, Throwable t) {
+ System.out.println("The BackgroundLoadTest program was terminated because an exception occured.\n");
+ System.out.println("Reason: " + (reason == null ? "Unknown" : reason));
+
+ System.out.println("Exception message: " + t.getMessage());
+
+ cleanup();
+ System.exit(-1);
+ }
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java 2010-04-20 18:21:05 UTC (rev 3332)
@@ -0,0 +1,191 @@
+/*
+ * 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: 2004-03-30
+ * Time: 8:41:42 pm
+ */
+package org.lwjgl.test.opengl.multithread;
+
+import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengl.Drawable;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.util.Color;
+import org.lwjgl.util.ReadableColor;
+
+import java.nio.ByteBuffer;
+
+abstract class BackgroundLoader {
+
+ private static final int WIDTH = 32;
+ private static final int HEIGHT = 32;
+
+ private static final Object lock = new Object();
+
+ private Drawable drawable;
+
+ private boolean running;
+
+ private ByteBuffer texture;
+ private int texID;
+
+ protected BackgroundLoader() {
+ running = true;
+ texture = BufferUtils.createByteBuffer(WIDTH * HEIGHT * 3);
+ }
+
+ abstract Drawable getDrawable() throws LWJGLException;
+
+ void cleanup() {
+ running = false;
+ }
+
+ void start() throws LWJGLException {
+ new Thread(new Runnable() {
+ public void run() {
+ System.out.println("-- Background Thread started --");
+
+ System.out.println("** Sleeping, no texture created yet **");
+
+ long start = System.currentTimeMillis();
+
+ try {
+ Thread.sleep(2000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+
+ try {
+ drawable = getDrawable();
+ drawable.makeCurrent();
+ } catch (LWJGLException e) {
+ throw new RuntimeException(e);
+ }
+
+ System.out.println("** Drawable created **");
+
+ synchronized ( lock ) {
+ // Create a "dummy" texture while we wait for texture IO
+ createCheckerTexture(Color.RED, Color.WHITE, 2);
+
+ texID = GL11.glGenTextures();
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID);
+ GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, WIDTH, HEIGHT, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, texture);
+
+ GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST);
+ GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST);
+
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
+ }
+
+ System.out.println("** Dummy texture created **");
+
+ long lastTextureCreated = System.currentTimeMillis(); // Delay first texture creation
+ int count = 0;
+ while ( running ) {
+ long time = System.currentTimeMillis();
+ if ( time - lastTextureCreated < 5000 ) { // Update the texture every 5 seconds
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ continue;
+ }
+
+ // Create the "true" texture
+ if ( count % 2 == 0 )
+ createGradientTexture(Color.RED, Color.BLUE);
+ else
+ createGradientTexture(Color.GREEN, Color.YELLOW);
+
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, texID);
+ GL11.glTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGB, WIDTH, HEIGHT, 0, GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, texture);
+
+ GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);
+ GL11.glTexParameterf(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
+
+ GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);
+
+ System.out.println("** Created new gradient texture **");
+
+ lastTextureCreated = System.currentTimeMillis();
+ count++;
+ }
+
+ drawable.destroy();
+
+ System.out.println("-- Background Thread finished --");
+ }
+ }).start();
+ }
+
+ int getTexID() {
+ synchronized ( lock ) {
+ return texID;
+ }
+ }
+
+ private void createCheckerTexture(final ReadableColor a, final ReadableColor b, final int size) {
+ int i = 0;
+ for ( int y = 0; y < HEIGHT; y++ ) {
+ for ( int x = 0; x < WIDTH; x++ ) {
+ ReadableColor c = (x / size) % 2 == 0 ? ((y / size) % 2 == 0 ? a : b) : ((y / size) % 2 == 0 ? b : a);
+ texture.put(i + 0, c.getRedByte());
+ texture.put(i + 1, c.getGreenByte());
+ texture.put(i + 2, c.getBlueByte());
+ i += 3;
+ }
+ }
+ }
+
+ private void createGradientTexture(final ReadableColor a, final ReadableColor b) {
+ float l = 0.0f;
+ int i = 0;
+ for ( int y = 0; y < HEIGHT; y++ ) {
+ for ( int x = 0; x < WIDTH; x++ ) {
+ texture.put(i + 0, lerp(a.getRed(), b.getRed(), l));
+ texture.put(i + 1, lerp(a.getGreen(), b.getGreen(), l));
+ texture.put(i + 2, lerp(a.getBlue(), b.getBlue(), l));
+ i += 3;
+ }
+ l += (1.0f / (HEIGHT - 1));
+ }
+ }
+
+ private static byte lerp(final int a, final int b, final float l) {
+ return (byte)Math.round(((1.0f - l) * a + l * b));
+ }
+
+}
\ 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: <ka...@us...> - 2010-04-16 19:06:59
|
Revision: 3331
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3331&view=rev
Author: kappa1
Date: 2010-04-16 19:06:53 +0000 (Fri, 16 Apr 2010)
Log Message:
-----------
minor tweak to XRandR class to add AccessControllers to remaining methods that need it.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-15 20:38:39 UTC (rev 3330)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-16 19:06:53 UTC (rev 3331)
@@ -119,11 +119,20 @@
* @param screens
* The desired screen set, may not be <code>null</code>
*/
- public static void setConfiguration(Screen[]/* ... */screens) {
+ public static void setConfiguration(final Screen[]/* ... */screens) {
if (screens.length == 0) {
throw new IllegalArgumentException("Must specify at least one screen");
}
-
+
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ setScreen(screens);
+ return null;
+ }
+ });
+ }
+
+ private static void setScreen(Screen[] screens) {
List/* <String> */cmd = new ArrayList/* <String> */();
cmd.add("xrandr");
@@ -164,7 +173,6 @@
} catch (IOException e) {
e.printStackTrace();
}
-
}
/**
@@ -172,7 +180,13 @@
* xrandr is not supported
*/
public static String[] getScreenNames() {
- populate();
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ populate();
+ return null;
+ }
+ });
+
return (String[]) screens.keySet().toArray(new String[screens.size()]);
}
@@ -182,7 +196,13 @@
* <code>null</code> if there is no such screen
*/
public static Screen[] getResolutions(String name) {
- populate();
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ populate();
+ return null;
+ }
+ });
+
// clone the array to prevent held copies being altered
return (Screen[]) ((Screen[]) screens.get(name)).clone();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-15 20:38:46
|
Revision: 3330
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3330&view=rev
Author: matzon
Date: 2010-04-15 20:38:39 +0000 (Thu, 15 Apr 2010)
Log Message:
-----------
fixed tag name
Added Paths:
-----------
tags/lwjgl2.4.2/
Removed Paths:
-------------
tags/lwjgl.2.4.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-15 20:18:50
|
Revision: 3329
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3329&view=rev
Author: matzon
Date: 2010-04-15 20:18:43 +0000 (Thu, 15 Apr 2010)
Log Message:
-----------
tagging 2.4.2
Added Paths:
-----------
tags/lwjgl.2.4.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-15 18:04:00
|
Revision: 3328
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3328&view=rev
Author: matzon
Date: 2010-04-15 18:03:54 +0000 (Thu, 15 Apr 2010)
Log Message:
-----------
2.4.2 release
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-04-14 22:34:43 UTC (rev 3327)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2010-04-15 18:03:54 UTC (rev 3328)
@@ -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.4.1" />
+ <property name="lwjgl.version" value="2.4.2" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.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-04-14 22:34:43 UTC (rev 3327)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-15 18:03:54 UTC (rev 3328)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.4.1";
+ private static final String VERSION = "2.4.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: <ka...@us...> - 2010-04-14 22:34:49
|
Revision: 3327
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3327&view=rev
Author: kappa1
Date: 2010-04-14 22:34:43 +0000 (Wed, 14 Apr 2010)
Log Message:
-----------
fix: When using unsigned jars with signed lwjgl jars it fails when creating a Display on linux with an AccessController error. This is due to the new XRandR class missing a AccessController.doPriviledged method when it requires out of sandbox access. (LWJGL Applet Distribution is borken on linux without this fix)
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-14 20:48:01 UTC (rev 3326)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/XRandR.java 2010-04-14 22:34:43 UTC (rev 3327)
@@ -40,6 +40,8 @@
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
/**
* Utility for working with the xrandr commmand-line utility. Assumes
@@ -103,7 +105,12 @@
* xrandr is not supported
*/
public static Screen[] getConfiguration() {
- populate();
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ populate();
+ return null;
+ }
+ });
return (Screen[]) current.clone();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-14 20:48:09
|
Revision: 3326
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3326&view=rev
Author: matzon
Date: 2010-04-14 20:48:01 +0000 (Wed, 14 Apr 2010)
Log Message:
-----------
tagging 2.4.1
Added Paths:
-----------
tags/lwjgl2.4.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-04-14 14:58:25
|
Revision: 3325
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3325&view=rev
Author: spasi
Date: 2010-04-14 14:58:18 +0000 (Wed, 14 Apr 2010)
Log Message:
-----------
New extensions: AMD_conservative_depth, EXT_shader_image_load_store, EXT_vertex_attrib_64bit, NV_gpu_program5, NV_gpu_shader5, NV_shader_buffer_store, NV_tessellation_program5, NV_vertex_attrib_integer_64bit
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_program5.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -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_conservative_depth {
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-13 20:28:04 UTC (rev 3324)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -137,13 +137,13 @@
void glDisableVertexAttribArrayARB(@GLuint int index);
@StripPostfix("params")
- void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check FloatBuffer params);
+ void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
@StripPostfix("params")
- void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check DoubleBuffer params);
+ void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
@StripPostfix("params")
- void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check IntBuffer params);
+ void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
@StripPostfix("result")
void glGetVertexAttribPointervARB(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer result);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-13 20:28:04 UTC (rev 3324)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -195,13 +195,13 @@
int glGetAttribLocationARB(@GLhandleARB int programObj, @NullTerminated CharSequence name);
@StripPostfix("params")
- void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check FloatBuffer params);
+ void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params);
@StripPostfix("params")
- void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check DoubleBuffer params);
+ void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
@StripPostfix("params")
- void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check IntBuffer params);
+ void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
@StripPostfix("result")
void glGetVertexAttribPointervARB(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer result);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-13 20:28:04 UTC (rev 3324)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -168,7 +168,7 @@
@GLuint Buffer buffer);
@StripPostfix("params")
- void glGetVertexAttribIivEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4")IntBuffer params);
+ void glGetVertexAttribIivEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params);
@StripPostfix("params")
void glGetVertexAttribIuivEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params);
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,110 @@
+/*
+ * 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.GLbitfield;
+import org.lwjgl.util.generator.GLenum;
+import org.lwjgl.util.generator.GLuint;
+
+public interface EXT_shader_image_load_store {
+
+ /**
+ * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
+ * GetFloatv, and GetDoublev:
+ */
+ int GL_MAX_IMAGE_UNITS_EXT = 0x8F38;
+ int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39;
+ int GL_MAX_IMAGE_SAMPLES_EXT = 0x906D;
+
+ /** Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: */
+ int GL_IMAGE_BINDING_NAME_EXT = 0x8F3A;
+ int GL_IMAGE_BINDING_LEVEL_EXT = 0x8F3B;
+ int GL_IMAGE_BINDING_LAYERED_EXT = 0x8F3C;
+ int GL_IMAGE_BINDING_LAYER_EXT = 0x8F3D;
+ int GL_IMAGE_BINDING_ACCESS_EXT = 0x8F3E;
+ int GL_IMAGE_BINDING_FORMAT_EXT = 0x906E;
+
+ /** Accepted by the <barriers> parameter of MemoryBarrierEXT: */
+ int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x00000001;
+ int GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x00000002;
+ int GL_UNIFORM_BARRIER_BIT_EXT = 0x00000004;
+ int GL_TEXTURE_FETCH_BARRIER_BIT_EXT = 0x00000008;
+ int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x00000020;
+ int GL_COMMAND_BARRIER_BIT_EXT = 0x00000040;
+ int GL_PIXEL_BUFFER_BARRIER_BIT_EXT = 0x00000080;
+ int GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x00000100;
+ int GL_BUFFER_UPDATE_BARRIER_BIT_EXT = 0x00000200;
+ int GL_FRAMEBUFFER_BARRIER_BIT_EXT = 0x00000400;
+ int GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x00000800;
+ int GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x00001000;
+ int GL_ALL_BARRIER_BITS_EXT = 0xFFFFFFFF;
+
+ /** Returned by the <type> parameter of GetActiveUniform: */
+ int GL_IMAGE_1D_EXT = 0x904C;
+ int GL_IMAGE_2D_EXT = 0x904D;
+ int GL_IMAGE_3D_EXT = 0x904E;
+ int GL_IMAGE_2D_RECT_EXT = 0x904F;
+ int GL_IMAGE_CUBE_EXT = 0x9050;
+ int GL_IMAGE_BUFFER_EXT = 0x9051;
+ int GL_IMAGE_1D_ARRAY_EXT = 0x9052;
+ int GL_IMAGE_2D_ARRAY_EXT = 0x9053;
+ int GL_IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054;
+ int GL_IMAGE_2D_MULTISAMPLE_EXT = 0x9055;
+ int GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056;
+ int GL_INT_IMAGE_1D_EXT = 0x9057;
+ int GL_INT_IMAGE_2D_EXT = 0x9058;
+ int GL_INT_IMAGE_3D_EXT = 0x9059;
+ int GL_INT_IMAGE_2D_RECT_EXT = 0x905A;
+ int GL_INT_IMAGE_CUBE_EXT = 0x905B;
+ int GL_INT_IMAGE_BUFFER_EXT = 0x905C;
+ int GL_INT_IMAGE_1D_ARRAY_EXT = 0x905D;
+ int GL_INT_IMAGE_2D_ARRAY_EXT = 0x905E;
+ int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F;
+ int GL_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060;
+ int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061;
+ int GL_UNSIGNED_INT_IMAGE_1D_EXT = 0x9062;
+ int GL_UNSIGNED_INT_IMAGE_2D_EXT = 0x9063;
+ int GL_UNSIGNED_INT_IMAGE_3D_EXT = 0x9064;
+ int GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065;
+ int GL_UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066;
+ int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067;
+ int GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068;
+ int GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069;
+ int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A;
+ int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B;
+ int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C;
+
+ void glBindImageTextureEXT(@GLuint int index, @GLuint int texture, int level, boolean layered, int layer, @GLenum int access, int format);
+
+ void glMemoryBarrierEXT(@GLbitfield int barriers);
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,87 @@
+/*
+ * 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.*;
+
+import java.nio.Buffer;
+import java.nio.DoubleBuffer;
+
+@Dependent
+public interface EXT_vertex_attrib_64bit {
+
+ /** Returned in the <type> parameter of GetActiveAttrib: */
+ int GL_DOUBLE_VEC2_EXT = 0x8FFC;
+ int GL_DOUBLE_VEC3_EXT = 0x8FFD;
+ int GL_DOUBLE_VEC4_EXT = 0x8FFE;
+ int GL_DOUBLE_MAT2_EXT = 0x8F46;
+ int GL_DOUBLE_MAT3_EXT = 0x8F47;
+ int GL_DOUBLE_MAT4_EXT = 0x8F48;
+ int GL_DOUBLE_MAT2x3_EXT = 0x8F49;
+ int GL_DOUBLE_MAT2x4_EXT = 0x8F4A;
+ int GL_DOUBLE_MAT3x2_EXT = 0x8F4B;
+ int GL_DOUBLE_MAT3x4_EXT = 0x8F4C;
+ int GL_DOUBLE_MAT4x2_EXT = 0x8F4D;
+ int GL_DOUBLE_MAT4x3_EXT = 0x8F4E;
+
+ void glVertexAttribL1dEXT(@GLuint int index, double x);
+
+ void glVertexAttribL2dEXT(@GLuint int index, double x, double y);
+
+ void glVertexAttribL3dEXT(@GLuint int index, double x, double y, double z);
+
+ void glVertexAttribL4dEXT(@GLuint int index, double x, double y, double z, double w);
+
+ @StripPostfix("v")
+ void glVertexAttribL1dvEXT(@GLuint int index, @Const @Check("1") DoubleBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL2dvEXT(@GLuint int index, @Const @Check("2") DoubleBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL3dvEXT(@GLuint int index, @Const @Check("3") DoubleBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL4dvEXT(@GLuint int index, @Const @Check("4") DoubleBuffer v);
+
+ void glVertexAttribLPointerEXT(@GLuint int index, int size, @Constant("GL11.GL_DOUBLE") @GLenum int type, @GLsizei int stride,
+ @CachedReference(index = "index", name = "glVertexAttribPointer_buffer")
+ @BufferObject(BufferKind.ArrayVBO)
+ @Check @Const @GLdouble Buffer pointer);
+
+ @StripPostfix("params")
+ void glGetVertexAttribLdvEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params);
+
+ @Dependent("EXT_direct_state_access")
+ void glVertexArrayVertexAttribLOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset);
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_program5.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_program5.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_program5.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -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.opengl;
+
+public interface NV_gpu_program5 {
+
+ /**
+ * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
+ * GetFloatv, and GetDoublev:
+ */
+ int GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = 0x8E5A;
+ int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5B;
+ int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5C;
+ int GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = 0x8E5D;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,182 @@
+/*
+ * 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.*;
+
+import java.nio.LongBuffer;
+
+@Dependent
+public interface NV_gpu_shader5 {
+
+ /**
+ * Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and
+ * GetTransformFeedbackVarying:
+ */
+ int GL_INT64_NV = 0x140E;
+ int GL_UNSIGNED_INT64_NV = 0x140F;
+
+ int GL_INT8_NV = 0x8FE0;
+ int GL_INT8_VEC2_NV = 0x8FE1;
+ int GL_INT8_VEC3_NV = 0x8FE2;
+ int GL_INT8_VEC4_NV = 0x8FE3;
+ int GL_INT16_NV = 0x8FE4;
+ int GL_INT16_VEC2_NV = 0x8FE5;
+ int GL_INT16_VEC3_NV = 0x8FE6;
+ int GL_INT16_VEC4_NV = 0x8FE7;
+ int GL_INT64_VEC2_NV = 0x8FE9;
+ int GL_INT64_VEC3_NV = 0x8FEA;
+ int GL_INT64_VEC4_NV = 0x8FEB;
+ int GL_UNSIGNED_INT8_NV = 0x8FEC;
+ int GL_UNSIGNED_INT8_VEC2_NV = 0x8FED;
+ int GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE;
+ int GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF;
+ int GL_UNSIGNED_INT16_NV = 0x8FF0;
+ int GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1;
+ int GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2;
+ int GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3;
+ int GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5;
+ int GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6;
+ int GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7;
+ int GL_FLOAT16_NV = 0x8FF8;
+ int GL_FLOAT16_VEC2_NV = 0x8FF9;
+ int GL_FLOAT16_VEC3_NV = 0x8FFA;
+ int GL_FLOAT16_VEC4_NV = 0x8FFB;
+
+ /** Accepted by the <primitiveMode> parameter of BeginTransformFeedback: */
+ int GL_PATCHES = ARB_tessellation_shader.GL_PATCHES;
+
+ void glUniform1i64NV(int location, @GLint64EXT long x);
+
+ void glUniform2i64NV(int location, @GLint64EXT long x, @GLint64EXT long y);
+
+ void glUniform3i64NV(int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z);
+
+ void glUniform4i64NV(int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w);
+
+ @StripPostfix("value")
+ void glUniform1i64vNV(int location, @GLsizei int count, @Const @GLint64EXT @Check("1") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform2i64vNV(int location, @GLsizei int count, @Const @GLint64EXT @Check("2") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform3i64vNV(int location, @GLsizei int count, @Const @GLint64EXT @Check("3") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform4i64vNV(int location, @GLsizei int count, @Const @GLint64EXT @Check("4") LongBuffer value);
+
+ void glUniform1ui64NV(int location, @GLuint64EXT long x);
+
+ void glUniform2ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y);
+
+ void glUniform3ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z);
+
+ void glUniform4ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w);
+
+ @StripPostfix("value")
+ void glUniform1ui64vNV(int location, @GLsizei int count, @Const @GLuint64EXT @Check("1") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform2ui64vNV(int location, @GLsizei int count, @Const @GLuint64EXT @Check("2") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform3ui64vNV(int location, @GLsizei int count, @Const @GLuint64EXT @Check("3") LongBuffer value);
+
+ @StripPostfix("value")
+ void glUniform4ui64vNV(int location, @GLsizei int count, @Const @GLuint64EXT @Check("4") LongBuffer value);
+
+ @StripPostfix("params")
+ void glGetUniformi64vNV(@GLuint int program, int location, @GLint64EXT @Check LongBuffer params);
+
+ @StripPostfix("params")
+ void glGetUniformui64vNV(@GLuint int program, int location, @GLuint64EXT @Check LongBuffer params);
+
+ // -------------
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform1i64NV(@GLuint int program, int location, @GLint64EXT long x);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform2i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform3i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform4i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform1i64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLint64EXT @Check("1") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform2i64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLint64EXT @Check("2") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform3i64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLint64EXT @Check("3") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform4i64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLint64EXT @Check("4") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform1ui64NV(@GLuint int program, int location, @GLuint64EXT long x);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform2ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform3ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z);
+
+ @Dependent("EXT_direct_state_access")
+ void glProgramUniform4ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform1ui64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLuint64EXT @Check("1") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform2ui64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLuint64EXT @Check("2") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform3ui64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLuint64EXT @Check("3") LongBuffer value);
+
+ @Dependent("EXT_direct_state_access")
+ @StripPostfix("value")
+ void glProgramUniform4ui64vNV(@GLuint int program, int location, @GLsizei int count, @Const @GLuint64EXT @Check("4") LongBuffer value);
+
+}
\ No newline at end of file
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java 2010-04-13 20:28:04 UTC (rev 3324)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -55,10 +55,10 @@
boolean glIsBufferResidentNV(@GLenum int target);
- // TODO: These two are currently missing from the latest NV drivers, check again sometime.
- //void glNamedMakeBufferResidentNV(@GLuint int buffer, @GLenum int access);
- //void glNamedMakeBufferNonResidentNV(@GLuint int buffer);
+ void glMakeNamedBufferResidentNV(@GLuint int buffer, @GLenum int access);
+ void glMakeNamedBufferNonResidentNV(@GLuint int buffer);
+
boolean glIsNamedBufferResidentNV(@GLuint int buffer);
@StripPostfix("params")
@@ -88,7 +88,7 @@
void glUniformui64NV(int location, @GLuint64EXT long value);
@StripPostfix("value")
- void glUniformui64vNV(int location, @AutoSize("value") @GLsizei int count, @GLuint64EXT LongBuffer value);
+ void glUniformui64vNV(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
@StripPostfix("params")
void glGetUniformui64vNV(@GLuint int program, int location, @OutParameter @Check("1") @GLuint64EXT LongBuffer params);
@@ -96,6 +96,6 @@
void glProgramUniformui64NV(@GLuint int program, int location, @GLuint64EXT long value);
@StripPostfix("value")
- void glProgramUniformui64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @GLuint64EXT LongBuffer value);
+ void glProgramUniformui64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value);
}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,43 @@
+/*
+ * 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 NV_shader_buffer_store {
+
+ /** Accepted by the <barriers> parameter of MemoryBarrierNV: */
+ int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x00000010;
+
+ /** Accepted by the <access> parameter of MakeBufferResidentNV: */
+ int GL_READ_WRITE = GL15.GL_READ_WRITE;
+ int GL_WRITE_ONLY = GL15.GL_WRITE_ONLY;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,60 @@
+/*
+ * 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 NV_tessellation_program5 {
+
+ /**
+ * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled,
+ * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
+ * and GetDoublev, and by the <target> parameter of ProgramStringARB,
+ * BindProgramARB, ProgramEnvParameter4[df][v]ARB,
+ * ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB,
+ * GetProgramLocalParameter[df]vARB, GetProgramivARB and
+ * GetProgramStringARB:
+ */
+ int GL_TESS_CONTROL_PROGRAM_NV = 0x891E;
+ int GL_TESS_EVALUATION_PROGRAM_NV = 0x891F;
+
+ /**
+ * Accepted by the <target> parameter of ProgramBufferParametersfvNV,
+ * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV,
+ * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer
+ * and the <value> parameter of GetIntegerIndexedvEXT:
+ */
+ int GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = 0x8C74;
+ int GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV = 0x8C75;
+
+ /** Accepted by the <pname> parameter of GetProgramivARB: */
+ int GL_MAX_PROGRAM_PATCH_ATTRIBS_NV = 0x86D8;
+
+}
\ No newline at end of file
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java 2010-04-14 14:58:18 UTC (rev 3325)
@@ -0,0 +1,97 @@
+/*
+ * 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.*;
+
+import java.nio.LongBuffer;
+
+@Dependent
+public interface NV_vertex_attrib_integer_64bit {
+
+ /**
+ * Accepted by the <type> parameter of VertexAttribLPointerEXT,
+ * VertexArrayVertexAttribLOffsetEXT, and VertexAttribLFormatNV:
+ */
+ int GL_INT64_NV = 0x140E;
+ int GL_UNSIGNED_INT64_NV = 0x140F;
+
+ void glVertexAttribL1i64NV(@GLuint int index, @GLint64EXT long x);
+
+ void glVertexAttribL2i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y);
+
+ void glVertexAttribL3i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z);
+
+ void glVertexAttribL4i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w);
+
+ @StripPostfix("v")
+ void glVertexAttribL1i64vNV(@GLuint int index, @Const @GLint64EXT @Check("1") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL2i64vNV(@GLuint int index, @Const @GLint64EXT @Check("2") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL3i64vNV(@GLuint int index, @Const @GLint64EXT @Check("3") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL4i64vNV(@GLuint int index, @Const @GLint64EXT @Check("4") LongBuffer v);
+
+ void glVertexAttribL1ui64NV(@GLuint int index, @GLuint64EXT long x);
+
+ void glVertexAttribL2ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y);
+
+ void glVertexAttribL3ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z);
+
+ void glVertexAttribL4ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w);
+
+ @StripPostfix("v")
+ void glVertexAttribL1ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("1") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL2ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("2") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL3ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("3") LongBuffer v);
+
+ @StripPostfix("v")
+ void glVertexAttribL4ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("4") LongBuffer v);
+
+ @StripPostfix("params")
+ void glGetVertexAttribLi64vNV(@GLuint int index, @GLenum int pname, @OutParameter @GLint64EXT @Check("4") LongBuffer params);
+
+ @StripPostfix("params")
+ void glGetVertexAttribLui64vNV(@GLuint int index, @GLenum int pname, @OutParameter @GLuint64EXT @Check("4") LongBuffer params);
+
+ @Dependent("NV_vertex_buffer_unified_memory")
+ void glVertexAttribLFormatNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride);
+
+}
\ 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...> - 2010-04-13 20:28:10
|
Revision: 3324
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3324&view=rev
Author: matzon
Date: 2010-04-13 20:28:04 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
prepare for 2.4.1
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-04-13 20:25:29 UTC (rev 3323)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2010-04-13 20:28:04 UTC (rev 3324)
@@ -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.4" />
+ <property name="lwjgl.version" value="2.4.1" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.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-04-13 20:25:29 UTC (rev 3323)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2010-04-13 20:28:04 UTC (rev 3324)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.4";
+ private static final String VERSION = "2.4.1";
/** 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: <ma...@us...> - 2010-04-13 20:25:36
|
Revision: 3323
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3323&view=rev
Author: matzon
Date: 2010-04-13 20:25:29 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
disable version check for linux - headless issues
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2010-04-13 07:14:51 UTC (rev 3322)
+++ trunk/LWJGL/build.xml 2010-04-13 20:25:29 UTC (rev 3323)
@@ -391,7 +391,7 @@
<copy todir="${lwjgl.lib}/linux">
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
</copy>
- <version-check platform="linux"/>
+ <!-- headless issues <version-check platform="linux"/> -->
</target>
<!-- Compiles LWJGL on solaris platforms -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-13 07:14:57
|
Revision: 3322
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3322&view=rev
Author: matzon
Date: 2010-04-13 07:14:51 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
(possible) fix for headless environment issue with awt on linux
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java 2010-04-12 23:22:08 UTC (rev 3321)
+++ trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java 2010-04-13 07:14:51 UTC (rev 3322)
@@ -32,6 +32,7 @@
package org.lwjgl.test;
import org.lwjgl.Sys;
+import java.awt.Toolkit;
/**
* <br>
@@ -43,13 +44,19 @@
*/
public class NativeTest {
+ public void invokeSys() {
+ Sys.getVersion();
+ }
+
/**
* Entry point for test
*
* @param args ignored
*/
public static void main(String[] args) {
- Sys.getVersion();
+ // try to "load" awt - work around for headless issue on linux
+ Toolkit.getDefaultToolkit();
+ new NativeTest().invokeSys();
System.out.println("OK");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-12 23:22:14
|
Revision: 3321
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3321&view=rev
Author: matzon
Date: 2010-04-12 23:22:08 +0000 (Mon, 12 Apr 2010)
Log Message:
-----------
forcefull check of version match when building
Modified Paths:
--------------
trunk/LWJGL/build.xml
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2010-04-12 19:04:27 UTC (rev 3320)
+++ trunk/LWJGL/build.xml 2010-04-12 23:22:08 UTC (rev 3321)
@@ -315,6 +315,29 @@
</echo>
</target>
+ <macrodef name="version-check">
+ <attribute name="platform"/>
+ <sequential>
+ <java classname="org.lwjgl.test.NativeTest" logError="false" resultproperty="nativetest.res" outputproperty="nativetest.out" errorproperty="nativetest.err" fork="true">
+ <jvmarg value="-Djava.library.path=libs/@{platform}"/>
+ <classpath>
+ <pathelement path="${lwjgl.bin}"/>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </java>
+
+ <fail message="Unable to load native library: ${nativetest.err}">
+ <condition>
+ <not>
+ <equals arg1="OK" arg2="${nativetest.out}"/>
+ </not>
+ </condition>
+ </fail>
+
+ <echo message="Successfully executed NativeTest"/>
+ </sequential>
+ </macrodef>
+
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code" depends="-initialize">
<javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core">
@@ -359,6 +382,7 @@
<copy todir="${lwjgl.lib}/windows">
<fileset dir="${lwjgl.bin}/lwjgl" includes="lwjgl*.dll"/>
</copy>
+ <version-check platform="windows"/>
</target>
<!-- Compiles LWJGL on Linux platforms -->
@@ -367,6 +391,7 @@
<copy todir="${lwjgl.lib}/linux">
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
</copy>
+ <version-check platform="linux"/>
</target>
<!-- Compiles LWJGL on solaris platforms -->
@@ -376,12 +401,14 @@
<copy todir="${lwjgl.lib}/solaris">
<fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
</copy>
+ <version-check platform="solaris"/>
</target>
<!-- Compiles LWJGL on Mac platforms -->
<target name="-compile_native_macosx" if="lwjgl.platform.macosx">
<ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/>
<copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/>
+ <version-check platform="macosx"/>
</target>
<target name="repack200" description="Pack200-repack a jar file">
Added: trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/NativeTest.java 2010-04-12 23:22:08 UTC (rev 3321)
@@ -0,0 +1,55 @@
+/*
+ * 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 org.lwjgl.Sys;
+
+/**
+ * <br>
+ * Simple test that just checks that the native library loads
+ *
+ * @author Brian Matzon <br...@ma...>
+ * @version $Revision: 2983 $
+ * $Id: SysTest.java 2983 2008-04-07 18:36:09Z matzon $
+ */
+public class NativeTest {
+
+ /**
+ * Entry point for test
+ *
+ * @param args ignored
+ */
+ public static void main(String[] args) {
+ Sys.getVersion();
+ System.out.println("OK");
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-12 19:04:33
|
Revision: 3320
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3320&view=rev
Author: matzon
Date: 2010-04-12 19:04:27 +0000 (Mon, 12 Apr 2010)
Log Message:
-----------
always build the native file with the latest version
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2010-04-11 18:00:27 UTC (rev 3319)
+++ trunk/LWJGL/build.xml 2010-04-12 19:04:27 UTC (rev 3320)
@@ -256,6 +256,12 @@
</javah>
</target>
+ <target name="touch-version">
+ <touch file="${lwjgl.src.native}/windows/org_lwjgl_opengl_Display.c"/>
+ <touch file="${lwjgl.src.native}/linux/org_lwjgl_opengl_Display.c"/>
+ <touch file="${lwjgl.src.native}/macosx/org_lwjgl_opengl_Display.m"/>
+ </target>
+
<target name="version-mismatch">
<loadfile srcfile="${lwjgl.src}/java/org/lwjgl/WindowsSysImplementation.java" property="lwjgl.java.windows.version">
<filterchain>
@@ -325,7 +331,7 @@
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
</target>
- <target name="compile_native" depends="headers, version-mismatch" description="Compiles the native files">
+ <target name="compile_native" depends="headers, touch-version, version-mismatch" description="Compiles the native files">
<condition property="lwjgl.platform.windows">
<os family="windows" />
</condition>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-11 18:00:33
|
Revision: 3319
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3319&view=rev
Author: matzon
Date: 2010-04-11 18:00:27 +0000 (Sun, 11 Apr 2010)
Log Message:
-----------
tagging 2.4
Added Paths:
-----------
tags/lwjgl2.4/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2010-04-11 08:27:48
|
Revision: 3318
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3318&view=rev
Author: matzon
Date: 2010-04-11 08:27:41 +0000 (Sun, 11 Apr 2010)
Log Message:
-----------
quickie update to build system to output the JNI_VERSION when building
Modified Paths:
--------------
trunk/LWJGL/build.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2010-04-10 18:07:50 UTC (rev 3317)
+++ trunk/LWJGL/build.xml 2010-04-11 08:27:41 UTC (rev 3318)
@@ -256,6 +256,59 @@
</javah>
</target>
+ <target name="version-mismatch">
+ <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/WindowsSysImplementation.java" property="lwjgl.java.windows.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="JNI_VERSION ="/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/LinuxSysImplementation.java" property="lwjgl.java.linux.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="JNI_VERSION ="/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <loadfile srcfile="${lwjgl.src}/java/org/lwjgl/MacOSXSysImplementation.java" property="lwjgl.java.macosx.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="JNI_VERSION ="/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <loadfile srcfile="${lwjgl.src.native}/windows/org_lwjgl_WindowsSysImplementation.h" property="lwjgl.native.windows.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="#define org_lwjgl_WindowsSysImplementation_JNI_VERSION"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <loadfile srcfile="${lwjgl.src.native}/linux/org_lwjgl_LinuxSysImplementation.h" property="lwjgl.native.linux.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="#define org_lwjgl_LinuxSysImplementation_JNI_VERSION"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <loadfile srcfile="${lwjgl.src.native}/macosx/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="#define org_lwjgl_MacOSXSysImplementation_JNI_VERSION"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+ <echo>
+ lwjgl.java.windows.version = ${lwjgl.java.windows.version}
+ lwjgl.native.windows.version = ${lwjgl.native.windows.version}
+ lwjgl.java.linux.version = ${lwjgl.java.linux.version}
+ lwjgl.native.linux.version = ${lwjgl.native.linux.version}
+ lwjgl.java.macosx.version = ${lwjgl.java.macosx.version}
+ lwjgl.native.macosx.version = ${lwjgl.native.macosx.version}
+ </echo>
+ </target>
+
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code" depends="-initialize">
<javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core">
@@ -272,7 +325,7 @@
<javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
</target>
- <target name="compile_native" depends="headers" description="Compiles the native files">
+ <target name="compile_native" depends="headers, version-mismatch" description="Compiles the native files">
<condition property="lwjgl.platform.windows">
<os family="windows" />
</condition>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-04-10 18:07:57
|
Revision: 3317
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3317&view=rev
Author: kappa1
Date: 2010-04-10 18:07:50 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
fix infinite focus loop when using Display.setParent() + JWS + Linux.
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-04-09 23:57:40 UTC (rev 3316)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2010-04-10 18:07:50 UTC (rev 3317)
@@ -846,7 +846,7 @@
if (parent_focus) {
setInputFocusUnsafe(current_window);
}
- else {
+ else if (xembedded) {
setInputFocusUnsafe(0);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-04-09 23:57:47
|
Revision: 3316
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3316&view=rev
Author: spasi
Date: 2010-04-09 23:57:40 +0000 (Fri, 09 Apr 2010)
Log Message:
-----------
Added @NoErrorCheck on vertex data methods.
The debug build will now track Begin/End pairs and never call GetError inside them.
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-generator.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java
trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java
Modified: trunk/LWJGL/platform_build/build-generator.xml
===================================================================
--- trunk/LWJGL/platform_build/build-generator.xml 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/platform_build/build-generator.xml 2010-04-09 23:57:40 UTC (rev 3316)
@@ -22,7 +22,7 @@
<!-- Proxy target to generate it all -->
<target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
- <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
+ <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references" description="Generates java and native source"/>
<!-- Generate OpenAL -->
<target name="generate-openal" depends="generators" description="Generates java and native source for AL">
@@ -96,7 +96,7 @@
</apply>
</target>
- <!-- Generate context capabilities -->
+ <!-- Generate references -->
<target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
@@ -110,7 +110,7 @@
</apply>
</target>
- <!-- Generate context capabilities -->
+ <!-- Generate context capabilities -->
<target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
<apply executable="apt" parallel="true">
<arg value="-nocompile"/>
@@ -124,4 +124,20 @@
<fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
</apply>
</target>
+
+ <!-- Generate context capabilities [DEBUG] -->
+ <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-Ageneratechecks"/>
+ <arg value="-Acontextspecific"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ </apply>
+ </target>
</project>
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/StateTracker.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -32,14 +32,28 @@
package org.lwjgl.opengl;
final class StateTracker {
- private final ReferencesStack references_stack;
+ private ReferencesStack references_stack;
private final StateStack attrib_stack;
+ private boolean insideBeginEnd;
+
StateTracker() {
- references_stack = new ReferencesStack();
attrib_stack = new StateStack(0);
}
+ /** This is called after getting function addresses. */
+ void init() {
+ references_stack = new ReferencesStack();
+ }
+
+ static void setBeginEnd(ContextCapabilities caps, boolean inside) {
+ caps.tracker.insideBeginEnd = inside;
+ }
+
+ boolean isBeginEnd() {
+ return insideBeginEnd;
+ }
+
static void popAttrib(ContextCapabilities caps) {
caps.tracker.doPopAttrib();
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Util.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -49,6 +49,8 @@
*
*/
public static void checkGLError() throws OpenGLException {
+ if ( ContextCapabilities.DEBUG && GLContext.getCapabilities().tracker.isBeginEnd() ) // Do not call GetError inside a Begin/End pair.
+ return;
int err = GL11.glGetError();
if ( err != GL11.GL_NO_ERROR ) {
throw new OpenGLException(err);
Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextCapabilitiesGenerator.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -59,9 +59,10 @@
private final static String EXTENSION_PREFIX = "GL_";
private final static String CORE_PREFIX = "Open";
- public static void generateClassPrologue(PrintWriter writer, boolean context_specific) {
+ public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) {
writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {");
- writer.println("\tfinal StateTracker tracker;");
+ writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";");
+ writer.println("\tfinal StateTracker tracker = new StateTracker();");
writer.println("\tfinal IntBuffer scratch_int_buffer = BufferUtils.createIntBuffer(16);");
writer.println();
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-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/java/org/lwjgl/util/generator/ContextGeneratorProcessorFactory.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -74,7 +74,7 @@
}
public Collection<String> supportedOptions() {
- return unmodifiableCollection(Arrays.asList("-Acontextspecific"));
+ return unmodifiableCollection(Arrays.asList("-Acontextspecific", "-Ageneratechecks"));
}
public void roundComplete(RoundCompleteEvent event) {
@@ -99,15 +99,16 @@
public void process() {
Map<String, String> options = env.getOptions();
+ boolean generate_error_checks = options.containsKey("-Ageneratechecks");
boolean context_specific = options.containsKey("-Acontextspecific");
try {
- generateContextCapabilitiesSource(context_specific);
+ generateContextCapabilitiesSource(context_specific, generate_error_checks);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
- private void generateContextCapabilitiesSource(boolean context_specific) throws IOException {
+ private void generateContextCapabilitiesSource(boolean context_specific, boolean generate_error_checks) throws IOException {
PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null);
writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */");
writer.println();
@@ -120,7 +121,7 @@
writer.println("import java.util.HashSet;");
writer.println("import java.nio.IntBuffer;");
writer.println();
- ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific);
+ ContextCapabilitiesGenerator.generateClassPrologue(writer, context_specific, generate_error_checks);
DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class);
Collection<TypeDeclaration> interface_decls = filter.filter(env.getSpecifiedTypeDeclarations());
for (TypeDeclaration typedecl : interface_decls) {
@@ -179,7 +180,7 @@
if (Utils.isFinal(interface_decl))
ContextCapabilitiesGenerator.generateInitializer(writer, interface_decl);
}
- writer.println("\t\ttracker = new StateTracker();");
+ writer.println("\t\ttracker.init();");
writer.println("\t}");
writer.println("}");
writer.close();
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_program.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -79,30 +79,43 @@
*/
int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869;
+ @NoErrorCheck
void glVertexAttrib1sARB(@GLuint int index, short x);
+ @NoErrorCheck
void glVertexAttrib1fARB(@GLuint int index, float x);
+ @NoErrorCheck
void glVertexAttrib1dARB(@GLuint int index, double x);
+ @NoErrorCheck
void glVertexAttrib2sARB(@GLuint int index, short x, short y);
+ @NoErrorCheck
void glVertexAttrib2fARB(@GLuint int index, float x, float y);
+ @NoErrorCheck
void glVertexAttrib2dARB(@GLuint int index, double x, double y);
+ @NoErrorCheck
void glVertexAttrib3sARB(@GLuint int index, short x, short y, short z);
+ @NoErrorCheck
void glVertexAttrib3fARB(@GLuint int index, float x, float y, float z);
+ @NoErrorCheck
void glVertexAttrib3dARB(@GLuint int index, double x, double y, double z);
+ @NoErrorCheck
void glVertexAttrib4sARB(@GLuint int index, short x, short y, short z, short w);
+ @NoErrorCheck
void glVertexAttrib4fARB(@GLuint int index, float x, float y, float z, float w);
+ @NoErrorCheck
void glVertexAttrib4dARB(@GLuint int index, double x, double y, double z, double w);
+ @NoErrorCheck
void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -87,30 +87,43 @@
int GL_FLOAT_MAT3_ARB = 0x8B5B;
int GL_FLOAT_MAT4_ARB = 0x8B5C;
+ @NoErrorCheck
void glVertexAttrib1sARB(@GLuint int index, short v0);
+ @NoErrorCheck
void glVertexAttrib1fARB(@GLuint int index, float v0);
+ @NoErrorCheck
void glVertexAttrib1dARB(@GLuint int index, double v0);
+ @NoErrorCheck
void glVertexAttrib2sARB(@GLuint int index, short v0, short v1);
+ @NoErrorCheck
void glVertexAttrib2fARB(@GLuint int index, float v0, float v1);
+ @NoErrorCheck
void glVertexAttrib2dARB(@GLuint int index, double v0, double v1);
+ @NoErrorCheck
void glVertexAttrib3sARB(@GLuint int index, short v0, short v1, short v2);
+ @NoErrorCheck
void glVertexAttrib3fARB(@GLuint int index, float v0, float v1, float v2);
+ @NoErrorCheck
void glVertexAttrib3dARB(@GLuint int index, double v0, double v1, double v2);
+ @NoErrorCheck
void glVertexAttrib4sARB(@GLuint int index, short v0, short v1, short v2, short v3);
+ @NoErrorCheck
void glVertexAttrib4fARB(@GLuint int index, float v0, float v1, float v2, float v3);
+ @NoErrorCheck
void glVertexAttrib4dARB(@GLuint int index, double v0, double v1, double v2, double v3);
+ @NoErrorCheck
void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -47,98 +47,136 @@
int GL_UNSIGNED_INT_2_10_10_10_REV = GL12.GL_UNSIGNED_INT_2_10_10_10_REV;
int GL_INT_2_10_10_10_REV = 0x8D9F;
+ @NoErrorCheck
void glVertexP2ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
void glVertexP3ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
void glVertexP4ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
void glTexCoordP1ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glTexCoordP2ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glTexCoordP3ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glTexCoordP4ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
void glNormalP3ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@StripPostfix("coords")
void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
void glColorP3ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
void glColorP4ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
@StripPostfix("color")
void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
@StripPostfix("color")
void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
void glSecondaryColorP3ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
@StripPostfix("color")
void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@StripPostfix("value")
void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -45,38 +45,55 @@
int GL_VERTEX_STREAM6_ATI = 0x8773;
int GL_VERTEX_STREAM7_ATI = 0x8774;
+ @NoErrorCheck
void glVertexStream2fATI(@GLenum int stream, float x, float y);
+ @NoErrorCheck
void glVertexStream2dATI(@GLenum int stream, double x, double y);
+ @NoErrorCheck
void glVertexStream2iATI(@GLenum int stream, int x, int y);
+ @NoErrorCheck
void glVertexStream2sATI(@GLenum int stream, short x, short y);
+ @NoErrorCheck
void glVertexStream3fATI(@GLenum int stream, float x, float y, float z);
+ @NoErrorCheck
void glVertexStream3dATI(@GLenum int stream, double x, double y, double z);
+ @NoErrorCheck
void glVertexStream3iATI(@GLenum int stream, int x, int y, int z);
+ @NoErrorCheck
void glVertexStream3sATI(@GLenum int stream, short x, short y, short z);
+ @NoErrorCheck
void glVertexStream4fATI(@GLenum int stream, float x, float y, float z, float w);
+ @NoErrorCheck
void glVertexStream4dATI(@GLenum int stream, double x, double y, double z, double w);
+ @NoErrorCheck
void glVertexStream4iATI(@GLenum int stream, int x, int y, int z, int w);
+ @NoErrorCheck
void glVertexStream4sATI(@GLenum int stream, short x, short y, short z, short w);
+ @NoErrorCheck
void glNormalStream3bATI(@GLenum int stream, byte x, byte y, byte z);
+ @NoErrorCheck
void glNormalStream3fATI(@GLenum int stream, float x, float y, float z);
+ @NoErrorCheck
void glNormalStream3dATI(@GLenum int stream, double x, double y, double z);
+ @NoErrorCheck
void glNormalStream3iATI(@GLenum int stream, int x, int y, int z);
+ @NoErrorCheck
void glNormalStream3sATI(@GLenum int stream, short x, short y, short z);
void glClientActiveVertexStreamATI(@GLenum int stream);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -83,55 +83,75 @@
int GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904;
int GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905;
+ @NoErrorCheck
void glVertexAttribI1iEXT(@GLuint int index, int x);
+ @NoErrorCheck
void glVertexAttribI2iEXT(@GLuint int index, int x, int y);
+ @NoErrorCheck
void glVertexAttribI3iEXT(@GLuint int index, int x, int y, int z);
+ @NoErrorCheck
void glVertexAttribI4iEXT(@GLuint int index, int x, int y, int z, int w);
+ @NoErrorCheck
void glVertexAttribI1uiEXT(@GLuint int index, @GLuint int x);
+ @NoErrorCheck
void glVertexAttribI2uiEXT(@GLuint int index, @GLuint int x, @GLuint int y);
+ @NoErrorCheck
void glVertexAttribI3uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z);
+ @NoErrorCheck
void glVertexAttribI4uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI1ivEXT(@GLuint int index, @Check("1") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI2ivEXT(@GLuint int index, @Check("2") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI3ivEXT(@GLuint int index, @Check("3") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4ivEXT(@GLuint int index, @Check("4") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI1uivEXT(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI2uivEXT(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI3uivEXT(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4uivEXT(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4bvEXT(@GLuint int index, @Check("4") @Const ByteBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4svEXT(@GLuint int index, @Check("4") @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4ubvEXT(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4usvEXT(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -50,6 +50,7 @@
int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F;
int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510;
+ @NoErrorCheck
void glVertexWeightfEXT(float weight);
void glVertexWeightPointerEXT(@GLsizei int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL11.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -764,9 +764,11 @@
@NoErrorCheck
@DeprecatedGL
+ @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, true);")
void glBegin(@GLenum int mode);
@DeprecatedGL
+ @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, false);")
void glEnd();
@NoErrorCheck
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -296,30 +296,43 @@
// ----------------------[ ARB_vertex_program ]----------------------
// ------------------------------------------------------------------
+ @NoErrorCheck
void glVertexAttrib1s(@GLuint int index, short x);
+ @NoErrorCheck
void glVertexAttrib1f(@GLuint int index, float x);
+ @NoErrorCheck
void glVertexAttrib1d(@GLuint int index, double x);
+ @NoErrorCheck
void glVertexAttrib2s(@GLuint int index, short x, short y);
+ @NoErrorCheck
void glVertexAttrib2f(@GLuint int index, float x, float y);
+ @NoErrorCheck
void glVertexAttrib2d(@GLuint int index, double x, double y);
+ @NoErrorCheck
void glVertexAttrib3s(@GLuint int index, short x, short y, short z);
+ @NoErrorCheck
void glVertexAttrib3f(@GLuint int index, float x, float y, float z);
+ @NoErrorCheck
void glVertexAttrib3d(@GLuint int index, double x, double y, double z);
+ @NoErrorCheck
void glVertexAttrib4s(@GLuint int index, short x, short y, short z, short w);
+ @NoErrorCheck
void glVertexAttrib4f(@GLuint int index, float x, float y, float z, float w);
+ @NoErrorCheck
void glVertexAttrib4d(@GLuint int index, double x, double y, double z, double w);
+ @NoErrorCheck
void glVertexAttrib4Nub(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
void glVertexAttribPointer(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL30.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -129,55 +129,75 @@
int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
+ @NoErrorCheck
void glVertexAttribI1i(@GLuint int index, int x);
+ @NoErrorCheck
void glVertexAttribI2i(@GLuint int index, int x, int y);
+ @NoErrorCheck
void glVertexAttribI3i(@GLuint int index, int x, int y, int z);
+ @NoErrorCheck
void glVertexAttribI4i(@GLuint int index, int x, int y, int z, int w);
+ @NoErrorCheck
void glVertexAttribI1ui(@GLuint int index, @GLuint int x);
+ @NoErrorCheck
void glVertexAttribI2ui(@GLuint int index, @GLuint int x, @GLuint int y);
+ @NoErrorCheck
void glVertexAttribI3ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z);
+ @NoErrorCheck
void glVertexAttribI4ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI1iv(@GLuint int index, @Check("1") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI2iv(@GLuint int index, @Check("2") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI3iv(@GLuint int index, @Check("3") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4iv(@GLuint int index, @Check("4") @Const IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI1uiv(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI2uiv(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI3uiv(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4uiv(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4bv(@GLuint int index, @Check("4") @Const ByteBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4sv(@GLuint int index, @Check("4") @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4ubv(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribI4usv(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL33.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -244,135 +244,173 @@
*/
int GL_INT_2_10_10_10_REV = 0x8D9F;
+ @NoErrorCheck
@DeprecatedGL
void glVertexP2ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
void glVertexP3ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
void glVertexP4ui(@GLenum int type, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
void glTexCoordP1ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glTexCoordP2ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glTexCoordP3ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glTexCoordP4ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
void glNormalP3ui(@GLenum int type, @GLuint int coords);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("coords")
void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords);
+ @NoErrorCheck
@DeprecatedGL
void glColorP3ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
@DeprecatedGL
void glColorP4ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("color")
void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("color")
void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
@DeprecatedGL
void glSecondaryColorP3ui(@GLenum int type, @GLuint int color);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("color")
void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color);
+ @NoErrorCheck
@DeprecatedGL
void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value);
+ @NoErrorCheck
@DeprecatedGL
@StripPostfix("value")
void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value);
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_half_float.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -46,66 +46,91 @@
*/
int GL_HALF_FLOAT_NV = 0x140B;
+ @NoErrorCheck
void glVertex2hNV(@GLhalf short x, @GLhalf short y);
+ @NoErrorCheck
void glVertex3hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z);
+ @NoErrorCheck
void glVertex4hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w);
+ @NoErrorCheck
void glNormal3hNV(@GLhalf short nx, @GLhalf short ny, @GLhalf short nz);
+ @NoErrorCheck
void glColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue);
+ @NoErrorCheck
void glColor4hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue, @GLhalf short alpha);
+ @NoErrorCheck
void glTexCoord1hNV(@GLhalf short s);
+ @NoErrorCheck
void glTexCoord2hNV(@GLhalf short s, @GLhalf short t);
+ @NoErrorCheck
void glTexCoord3hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r);
+ @NoErrorCheck
void glTexCoord4hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q);
+ @NoErrorCheck
void glMultiTexCoord1hNV(@GLenum int target, @GLhalf short s);
+ @NoErrorCheck
void glMultiTexCoord2hNV(@GLenum int target, @GLhalf short s, @GLhalf short t);
+ @NoErrorCheck
void glMultiTexCoord3hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r);
+ @NoErrorCheck
void glMultiTexCoord4hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q);
+ @NoErrorCheck
void glFogCoordhNV(@GLhalf short fog);
+ @NoErrorCheck
void glSecondaryColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
void glVertexWeighthNV(@GLhalf short weight);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
void glVertexAttrib1hNV(@GLuint int index, @GLhalf short x);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
void glVertexAttrib2hNV(@GLuint int index, @GLhalf short x, @GLhalf short y);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
void glVertexAttrib3hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
void glVertexAttrib4hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
@StripPostfix("attribs")
void glVertexAttribs1hvNV(@GLuint int index, @AutoSize("attribs") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
@StripPostfix("attribs")
void glVertexAttribs2hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 1") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
@StripPostfix("attribs")
void glVertexAttribs3hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " / 3") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
@Optional(reason = "AMD does not expose this (last driver checked: 10.3)")
+ @NoErrorCheck
@StripPostfix("attribs")
void glVertexAttribs4hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 2") @GLsizei int n, @Const @GLhalf ShortBuffer attribs);
}
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java 2010-04-08 22:53:45 UTC (rev 3315)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_vertex_program.java 2010-04-09 23:57:40 UTC (rev 3316)
@@ -241,65 +241,90 @@
@GLfloat
@GLdouble Buffer buffer);
+ @NoErrorCheck
void glVertexAttrib1sNV(@GLuint int index, short x);
+ @NoErrorCheck
void glVertexAttrib1fNV(@GLuint int index, float x);
+ @NoErrorCheck
void glVertexAttrib1dNV(@GLuint int index, double x);
+ @NoErrorCheck
void glVertexAttrib2sNV(@GLuint int index, short x, short y);
+ @NoErrorCheck
void glVertexAttrib2fNV(@GLuint int index, float x, float y);
+ @NoErrorCheck
void glVertexAttrib2dNV(@GLuint int index, double x, double y);
+ @NoErrorCheck
void glVertexAttrib3sNV(@GLuint int index, short x, short y, short z);
+ @NoErrorCheck
void glVertexAttrib3fNV(@GLuint int index, float x, float y, float z);
+ @NoErrorCheck
void glVertexAttrib3dNV(@GLuint int index, double x, double y, double z);
+ @NoErrorCheck
void glVertexAttrib4sNV(@GLuint int index, short x, short y, short z, short w);
+ @NoErrorCheck
void glVertexAttrib4fNV(@GLuint int index, float x, float y, float z, float w);
+ @NoErrorCheck
void glVertexAttrib4dNV(@GLuint int index, double x, double y, double z, double w);
+ @NoErrorCheck
void glVertexAttrib4ubNV(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs1svNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs1fvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const FloatBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs1dvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const DoubleBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs2svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs2fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const FloatBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs2dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const DoubleBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs3svNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs3fvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const FloatBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs3dvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const DoubleBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs4svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const ShortBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs4fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const FloatBuffer v);
+ @NoErrorCheck
@StripPostfix("v")
void glVertexAttribs4dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const DoubleBuffer v);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2010-04-08 22:53:51
|
Revision: 3315
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3315&view=rev
Author: kappa1
Date: 2010-04-08 22:53:45 +0000 (Thu, 08 Apr 2010)
Log Message:
-----------
Example on how to allow Space Invader Test Application to work as an applet with minimal code change.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java
Modified: trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java 2010-04-07 20:06:59 UTC (rev 3314)
+++ trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/Game.java 2010-04-08 22:53:45 UTC (rev 3315)
@@ -167,6 +167,9 @@
/** Mouse movement on x axis */
private int mouseX;
+
+ /** Is this an application or applet */
+ private static boolean isApplication = false;
/**
* Construct our game and set it running.
@@ -210,13 +213,15 @@
public void initialize() {
// initialize the window beforehand
try {
- setDisplayMode();
- Display.setTitle(WINDOW_TITLE);
- Display.setFullscreen(fullscreen);
- Display.create();
-
+ setDisplayMode();
+ Display.setTitle(WINDOW_TITLE);
+ Display.setFullscreen(fullscreen);
+ Display.create();
+
// grab the mouse, dont want that hideous cursor when we're playing!
- Mouse.setGrabbed(true);
+ if (isApplication) {
+ Mouse.setGrabbed(true);
+ }
// enable textures since we're going to use these for our sprites
GL11.glEnable(GL11.GL_TEXTURE_2D);
@@ -426,6 +431,10 @@
// update window contents
Display.update();
}
+
+ // clean up
+ soundManager.destroy();
+ Display.destroy();
}
/**
@@ -542,7 +551,7 @@
}
// if escape has been pressed, stop the game
- if (Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) {
+ if ((Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) && isApplication) {
Game.gameRunning = false;
}
}
@@ -579,6 +588,7 @@
* @param argv The arguments that are passed into our game
*/
public static void main(String argv[]) {
+ isApplication = true;
System.out.println("Use -fullscreen for fullscreen mode");
new Game((argv.length > 0 && argv[0].equalsIgnoreCase("-fullscreen"))).execute();
System.exit(0);
@@ -587,10 +597,8 @@
/**
*
*/
- private void execute() {
+ public void execute() {
gameLoop();
- soundManager.destroy();
- Display.destroy();
}
/**
Added: trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java 2010-04-08 22:53:45 UTC (rev 3315)
@@ -0,0 +1,104 @@
+package org.lwjgl.examples.spaceinvaders;
+
+
+import java.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Canvas;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengl.Display;
+
+public class GameApplet extends Applet {
+
+ /** The Canvas where the LWJGL Display is added */
+ Canvas display_parent;
+
+ /** Thread which runs the main game loop */
+ Thread gameThread;
+
+ /** The Game instance */
+ Game game;
+
+ /**
+ * Once the Canvas is created its add notify method will call this method to
+ * start the LWJGL Display and game loop in another thread.
+ */
+ public void startLWJGL() {
+ gameThread = new Thread() {
+ public void run() {
+
+ try {
+ Display.setParent(display_parent);
+
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ // start game
+ game = new Game(false);
+ game.execute();
+ }
+ };
+ gameThread.start();
+ }
+
+
+ /**
+ * Tell game loop to stop running, after which the LWJGL Display will be destoryed.
+ * The main thread will wait for the Display.destroy() to complete
+ */
+ private void stopLWJGL() {
+ Game.gameRunning = false;
+ try {
+ gameThread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void start() {
+
+ }
+
+ public void stop() {
+
+ }
+
+ /**
+ * Applet Destroy method will remove the canvas, before canvas is destroyed it will notify
+ * stopLWJGL() to stop main game loop and to destroy the Display
+ */
+ public void destroy() {
+ remove(display_parent);
+ super.destroy();
+ System.out.println("Clear up");
+ }
+
+ /**
+ * initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop
+ * in another thread. It will also stop the game loop and destroy the display on canvas removal when
+ * applet is destroyed.
+ */
+ public void init() {
+ setLayout(new BorderLayout());
+ try {
+ display_parent = new Canvas() {
+ public final void addNotify() {
+ super.addNotify();
+ startLWJGL();
+ }
+ public final void removeNotify() {
+ stopLWJGL();
+ super.removeNotify();
+ }
+ };
+ display_parent.setSize(getWidth(),getHeight());
+ add(display_parent);
+ display_parent.setFocusable(true);
+ display_parent.requestFocus();
+ display_parent.setIgnoreRepaint(true);
+ setVisible(true);
+ } catch (Exception e) {
+ System.err.println(e);
+ throw new RuntimeException("Unable to create display");
+ }
+ }
+}
\ 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: <ka...@us...> - 2010-04-07 20:07:05
|
Revision: 3314
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3314&view=rev
Author: kappa1
Date: 2010-04-07 20:06:59 +0000 (Wed, 07 Apr 2010)
Log Message:
-----------
fix corrupt lzma.jar which caused signjar task to remove entries in the manifest file.
Modified Paths:
--------------
trunk/LWJGL/libs/lzma.jar
Modified: trunk/LWJGL/libs/lzma.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-04-07 12:06:16
|
Revision: 3313
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3313&view=rev
Author: spasi
Date: 2010-04-07 12:06:10 +0000 (Wed, 07 Apr 2010)
Log Message:
-----------
More glGetActive changes.
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-07 11:59:33 UTC (rev 3312)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java 2010-04-07 12:06:10 UTC (rev 3313)
@@ -151,14 +151,14 @@
@OutParameter @GLenum @Constant("sizeType, sizeType.position() + 1") IntBuffer type,
@OutParameter @GLcharARB ByteBuffer name);
- /** Overloads glGetActiveAttribARB. This version returns only the uniform name. */
+ /** Overloads glGetActiveAttribARB. This version returns only the attrib name. */
@Alternate(value = "glGetActiveAttribARB", javaAlt = true)
@GLreturn(value = "name", maxLength = "maxLength")
void glGetActiveAttribARB(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength,
@OutParameter @GLsizei @Constant("name_length, 0, APIUtils.getBufferInt(), 0, APIUtils.getBufferInt(), 1") IntBuffer length,
@OutParameter @GLcharARB ByteBuffer name);
- /** Overloads glGetActiveAttribARB. This version returns only the uniform size. */
+ /** Overloads glGetActiveAttribARB. This version returns only the attrib size. */
@Alternate(value = "glGetActiveAttribARB", javaAlt = true)
@GLreturn(value = "size")
void glGetActiveAttribSizeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength,
@@ -167,7 +167,7 @@
@OutParameter @GLenum @Constant("size, 1") IntBuffer type, // Reuse size buffer and ignore
@OutParameter @GLcharARB @Constant("APIUtils.getBufferByte(0), 0") ByteBuffer name);
- /** Overloads glGetActiveAttribARB. This version returns only the uniform type. */
+ /** Overloads glGetActiveAttribARB. This version returns only the attrib type. */
@Alternate(value = "glGetActiveAttribARB", javaAlt = true)
@GLreturn(value = "type")
void glGetActiveAttribTypeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength,
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-07 11:59:33 UTC (rev 3312)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/GL20.java 2010-04-07 12:06:10 UTC (rev 3313)
@@ -404,29 +404,39 @@
@OutParameter @GLenum @Check("1") IntBuffer type,
@OutParameter @GLchar ByteBuffer name);
+ /** Overloads glGetActiveAttrib. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */
@Alternate("glGetActiveAttrib")
@GLreturn(value = "name", maxLength = "maxLength")
void glGetActiveAttrib2(@GLuint int program, @GLuint int index, @GLsizei int maxLength,
@OutParameter @GLsizei @Constant("name_length, 0") IntBuffer length,
- @OutParameter @Check("1") IntBuffer size,
- @OutParameter @GLenum @Check("1") IntBuffer type,
+ @OutParameter @Check("2") IntBuffer sizeType,
+ @OutParameter @GLenum @Constant("sizeType, sizeType.position() + 1") IntBuffer type,
@OutParameter @GLchar ByteBuffer name);
+ /** Overloads glGetActiveAttrib. This version returns only the attrib name. */
@Alternate(value = "glGetActiveAttrib", javaAlt = true)
+ @GLreturn(value = "name", maxLength = "maxLength")
+ void glGetActiveAttrib(@GLuint int program, @GLuint int index, @GLsizei int maxLength,
+ @OutParameter @GLsizei @Constant("name_length, 0, APIUtils.getBufferInt(), 0, APIUtils.getBufferInt(), 1") IntBuffer length,
+ @OutParameter @GLchar ByteBuffer name);
+
+ /** Overloads glGetActiveAttribARB. This version returns only the attrib size. */
+ @Alternate(value = "glGetActiveAttrib", javaAlt = true)
@GLreturn(value = "size")
void glGetActiveAttribSize(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int maxLength,
@OutParameter @GLsizei @Constant("null, 0") IntBuffer length,
@OutParameter IntBuffer size,
@OutParameter @GLenum @Constant("size, 1") IntBuffer type, // Reuse size buffer and ignore
- @GLchar @Constant("APIUtils.getBufferByte(0), 0") ByteBuffer name);
+ @OutParameter @GLchar @Constant("APIUtils.getBufferByte(0), 0") ByteBuffer name);
+ /** Overloads glGetActiveAttrib. This version returns only the attrib type. */
@Alternate(value = "glGetActiveAttrib", javaAlt = true)
@GLreturn(value = "type")
void glGetActiveAttribType(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int maxLength,
@OutParameter @GLsizei @Constant("null, 0") IntBuffer length,
@OutParameter @Constant("type, 1") IntBuffer size, // Reuse type buffer and ignore
@OutParameter @GLenum IntBuffer type,
- @GLchar @Constant("APIUtils.getBufferByte(0), 0") ByteBuffer name);
+ @OutParameter @GLchar @Constant("APIUtils.getBufferByte(0), 0") ByteBuffer name);
int glGetAttribLocation(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|