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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user