This commit is contained in:
rnentjes
2014-01-17 12:42:42 +01:00
parent a06e470ee1
commit b2809fe52b
2 changed files with 200 additions and 73 deletions

View File

@@ -113,7 +113,6 @@ public class Renderer implements GLEventListener {
@Override
public void dispose(GLAutoDrawable drawable) {
explosionComputeHandler.dispose();
}
private long lastDelta = System.nanoTime();
@@ -128,8 +127,6 @@ public class Renderer implements GLEventListener {
@Override
public void display(GLAutoDrawable drawable) {
//logger.info("display+" + System.currentTimeMillis());
calculateCurrentDelta();
GL4 gl = drawable.getGL().getGL4();
@@ -159,24 +156,6 @@ public class Renderer implements GLEventListener {
gl.glClearColor(0.1f, 0.0f, 0.1f, 1f);
gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT);
timer.start("getCount");
/*
timer.start("BindBuffer");
gl.glBindBuffer(GL4.GL_ATOMIC_COUNTER_BUFFER, atomicHandle);
timer.stop("BindBuffer");
// again we map the buffer to userCounters, but this time for read-only access
timer.start("MapBufferRange");
ByteBuffer last = gl.glMapBufferRange(GL4.GL_ATOMIC_COUNTER_BUFFER, 0, 4, GL4.GL_MAP_READ_BIT);
timer.stop("MapBufferRange");
particleCount = last.getInt();
timer.start("UnmapBuffer");
gl.glUnmapBuffer(GL4.GL_ATOMIC_COUNTER_BUFFER);
timer.stop("UnmapBuffer");
*/
timer.stop("getCount");
timer.start("compute");
explosionComputeHandler.execute(delta);