summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-01-12 00:51:20 +0000
committerKenneth Russel <[email protected]>2009-01-12 00:51:20 +0000
commit612955ad82326024f5cb99d9fe4175dce78caa27 (patch)
tree941c15a6eb8f1c17b739e7a9b73feebedb7d40e9
parentc5cb640a428bf9b6d398616dc542ea529a2036d2 (diff)
Fixed ArgumentIsString directive for glProgramStringARB (now
glProgramString) and updated demos. Added FIXME to gl-ignore-gl2_es12-special.cfg about definitions that it seems should be in the GL interface (such as the GL_ARB_imaging definitions) as they are replicated in the GL2ES1 and GL2ES2 interfaces. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@315 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java3
-rw-r--r--src/demos/vertexProgRefract/VertexProgRefract.java4
-rw-r--r--src/demos/vertexProgWarp/VertexProgWarp.java2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index bf6f980..42fb785 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -1817,8 +1817,7 @@ public class Water {
int target,
String programBuffer) {
- ByteBuffer bb = BufferUtil.newByteBuffer(programBuffer.getBytes());
- gl.glProgramString(target, GL2.GL_PROGRAM_FORMAT_ASCII, programBuffer.length(), bb);
+ gl.glProgramString(target, GL2.GL_PROGRAM_FORMAT_ASCII, programBuffer.length(), programBuffer);
int[] errPos = new int[1];
gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION, errPos, 0);
diff --git a/src/demos/vertexProgRefract/VertexProgRefract.java b/src/demos/vertexProgRefract/VertexProgRefract.java
index 757534f..ce1c975 100644
--- a/src/demos/vertexProgRefract/VertexProgRefract.java
+++ b/src/demos/vertexProgRefract/VertexProgRefract.java
@@ -285,7 +285,7 @@ public class VertexProgRefract extends Demo {
vtxProg = vtxProgTmp[0];
gl.glBindProgram(GL2.GL_VERTEX_PROGRAM, vtxProg);
gl.glProgramString(GL2.GL_VERTEX_PROGRAM, GL2.GL_PROGRAM_FORMAT_ASCII, transformRefract.length(),
- BufferUtil.newByteBuffer(transformRefract.getBytes()));
+ transformRefract);
gl.glProgramEnvParameter4f(GL2.GL_VERTEX_PROGRAM, 0, 0.0f, 0.0f, 0.0f, 1.0f); // eye position
@@ -580,7 +580,7 @@ public class VertexProgRefract extends Demo {
gl.glBindProgram(GL2.GL_FRAGMENT_PROGRAM, fragProg);
gl.glProgramString(GL2.GL_FRAGMENT_PROGRAM, GL2.GL_PROGRAM_FORMAT_ASCII,
- combineFragProg.length(), BufferUtil.newByteBuffer(combineFragProg.getBytes()));
+ combineFragProg.length(), combineFragProg);
int[] errPos = new int[1];
gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION, errPos, 0);
if (errPos[0] >= 0) {
diff --git a/src/demos/vertexProgWarp/VertexProgWarp.java b/src/demos/vertexProgWarp/VertexProgWarp.java
index 7bbb4b3..43a7183 100644
--- a/src/demos/vertexProgWarp/VertexProgWarp.java
+++ b/src/demos/vertexProgWarp/VertexProgWarp.java
@@ -196,7 +196,7 @@ public class VertexProgWarp extends Demo {
programs[i] = vtxProgTmp[0];
gl.glBindProgram(GL2.GL_VERTEX_PROGRAM, programs[i]);
gl.glProgramString(GL2.GL_VERTEX_PROGRAM, GL2.GL_PROGRAM_FORMAT_ASCII, programTexts[i].length(),
- BufferUtil.newByteBuffer(programTexts[i].getBytes()));
+ programTexts[i]);
}
gl.glProgramEnvParameter4f(GL2.GL_VERTEX_PROGRAM, 0, 0.0f, 0.0f, 1.0f, 0.0f); // light position/direction