summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos')
-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