summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-22 02:19:46 +0200
committerSven Gothel <[email protected]>2011-08-22 02:19:46 +0200
commit762d74fe6780217e4726c3afd7bce3551a4a5709 (patch)
tree5612bc950672a44f26a7b580a6b6283ca6c65fb6 /src/demos
parent8dbb09541973d33168430eac5eae092b99b1c106 (diff)
Adapt to latest jogl commit 6c346d98f04e2355210960fe9ffde47432f04d62
Diffstat (limited to 'src/demos')
-rwxr-xr-xsrc/demos/es2/perftst/PerfTextLoad.java2
-rwxr-xr-xsrc/demos/es2/perftst/PerfUniLoad.java2
-rwxr-xr-xsrc/demos/es2/perftst/PerfVBOLoad.java14
-rwxr-xr-xsrc/demos/readbuffer/ReadBuffer2Screen.java8
4 files changed, 13 insertions, 13 deletions
diff --git a/src/demos/es2/perftst/PerfTextLoad.java b/src/demos/es2/perftst/PerfTextLoad.java
index 670f4c9..5cf3631 100755
--- a/src/demos/es2/perftst/PerfTextLoad.java
+++ b/src/demos/es2/perftst/PerfTextLoad.java
@@ -129,7 +129,7 @@ public class PerfTextLoad extends PerfModule {
t2[i][j][k] = System.currentTimeMillis();
- gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, vertices.getElementNumber());
+ gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, vertices.getElementCount());
t3[i][j][k] = System.currentTimeMillis();
}
diff --git a/src/demos/es2/perftst/PerfUniLoad.java b/src/demos/es2/perftst/PerfUniLoad.java
index 99621ee..0d686c2 100755
--- a/src/demos/es2/perftst/PerfUniLoad.java
+++ b/src/demos/es2/perftst/PerfUniLoad.java
@@ -107,7 +107,7 @@ public class PerfUniLoad extends PerfModule {
t1[i][j] = System.currentTimeMillis();
- gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices.getElementNumber());
+ gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices.getElementCount());
t2[i][j] = System.currentTimeMillis();
}
diff --git a/src/demos/es2/perftst/PerfVBOLoad.java b/src/demos/es2/perftst/PerfVBOLoad.java
index fcfaff0..512a542 100755
--- a/src/demos/es2/perftst/PerfVBOLoad.java
+++ b/src/demos/es2/perftst/PerfVBOLoad.java
@@ -103,7 +103,7 @@ public class PerfVBOLoad extends PerfModule {
t2[i][j] = System.currentTimeMillis();
- gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices[j].getElementNumber());
+ gl.glDrawArrays(GL.GL_LINE_STRIP, 0, vertices[j].getElementCount());
if(numObjs>1) {
vertices[j].enableBuffer(gl, false);
@@ -127,10 +127,10 @@ public class PerfVBOLoad extends PerfModule {
colors[0].enableBuffer(gl, false);
}
- int verticesElements = vertices[0].getElementNumber() * numObjs;
- int verticesBytes = verticesElements * vertices[0].getComponentSize()* vertices[0].getComponentNumber();
- int colorsElements = colors[0].getElementNumber() * colors.length;
- int colorsBytes = colorsElements * colors[0].getComponentSize()* colors[0].getComponentNumber();
+ int verticesElements = vertices[0].getElementCount() * numObjs;
+ int verticesBytes = verticesElements * vertices[0].getComponentSizeInBytes()* vertices[0].getComponentCount();
+ int colorsElements = colors[0].getElementCount() * colors.length;
+ int colorsBytes = colorsElements * colors[0].getComponentSizeInBytes()* colors[0].getComponentCount();
dt = 0;
for(int i=1; i<loops; i++) {
@@ -139,8 +139,8 @@ public class PerfVBOLoad extends PerfModule {
System.out.println("");
System.out.println("Loops "+loops+", useVBO "+useVBO+", objects "+numObjs+", type "+getTypeName(dataType)+
- ", vertices p.o. "+vertices[0].getElementNumber()+
- ", colors p.o. "+colors[0].getElementNumber()+
+ ", vertices p.o. "+vertices[0].getElementCount()+
+ ", colors p.o. "+colors[0].getElementCount()+
",\n total elements "+(verticesElements+colorsElements)+
", total bytes "+(verticesBytes+colorsBytes)+", total time: "+dt +
"ms, fps(-1): "+(((loops-1)*1000)/dt)+
diff --git a/src/demos/readbuffer/ReadBuffer2Screen.java b/src/demos/readbuffer/ReadBuffer2Screen.java
index cc120f2..fd7f5b5 100755
--- a/src/demos/readbuffer/ReadBuffer2Screen.java
+++ b/src/demos/readbuffer/ReadBuffer2Screen.java
@@ -64,9 +64,9 @@ public class ReadBuffer2Screen extends ReadBufferBase {
float f_edge = 1f;
if(null==readTextureVertices) {
- //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex",
+ //readTextureVertices = GLArrayDataClient.createFixed(gl, GLPointerFunc.GL_VERTEX_ARRAY,
// 2, GL.GL_FLOAT, true, 4);
- readTextureVertices = GLArrayDataServer.createFixed(GLPointerFunc.GL_VERTEX_ARRAY, "mgl_Vertex",
+ readTextureVertices = GLArrayDataServer.createFixed(GLPointerFunc.GL_VERTEX_ARRAY,
2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
readTextureVertices.setEnableAlways(enableBufferAlways);
readTextureVertices.setVBOEnabled(enableBufferVBO);
@@ -144,7 +144,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
if(null!=readTextureCoords) {
readTextureCoords.enableBuffer(gl, true);
}
- gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementNumber());
+ gl.glDrawArrays(GL.GL_TRIANGLE_STRIP, 0, readTextureVertices.getElementCount());
/**
if(null!=readTextureCoords) {
readTextureCoords.enableBuffer(gl, false);
@@ -156,7 +156,7 @@ public class ReadBuffer2Screen extends ReadBufferBase {
void updateTextureCoords(GL gl, boolean force) {
if(force || null==readTextureCoords) {
- readTextureCoords = GLArrayDataServer.createFixed(GLPointerFunc.GL_TEXTURE_COORD_ARRAY, "mgl_MultiTexCoord0",
+ readTextureCoords = GLArrayDataServer.createFixed(GLPointerFunc.GL_TEXTURE_COORD_ARRAY,
2, GL.GL_FLOAT, true, 4, GL.GL_STATIC_DRAW);
readTextureCoords.setEnableAlways(enableBufferAlways);
readTextureCoords.setVBOEnabled(enableBufferVBO);