gpu: fix camera position

The position returned by getCameraX/Y/Z are not yet updated when this is
called, causing it to be from the previous frame's camera position.

This was introduced in 0fc1a94088 when the
uniform code was copied from draw.
This commit is contained in:
Adam
2021-01-09 21:32:47 -05:00
parent 266fee2067
commit 359b909d8e

View File

@@ -793,9 +793,9 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
.put(client.getCenterX())
.put(client.getCenterY())
.put(client.getScale())
.put(client.getCameraX2())
.put(client.getCameraY2())
.put(client.getCameraZ2());
.put(cameraX)
.put(cameraY)
.put(cameraZ);
uniformBuffer.flip();
gl.glBufferSubData(gl.GL_UNIFORM_BUFFER, 0, uniformBuffer.limit() * Integer.BYTES, uniformBuffer);