gpu: dispatch compute after scene draw
This moves the compute shaders to run immediately after scene draw, instead of in the draw() callback, which happens much later. All models in the scene have been queued by the time, but since it is so early in the ui drawing, it gives a few more ms for the compute to run before the result needs to be used to draw the next frame.
This commit is contained in:
@@ -52,7 +52,21 @@ public interface DrawCallbacks
|
||||
|
||||
boolean drawFace(Model model, int face);
|
||||
|
||||
/**
|
||||
* Called before the scene is drawn
|
||||
* @param cameraX
|
||||
* @param cameraY
|
||||
* @param cameraZ
|
||||
* @param cameraPitch
|
||||
* @param cameraYaw
|
||||
* @param plane
|
||||
*/
|
||||
void drawScene(int cameraX, int cameraY, int cameraZ, int cameraPitch, int cameraYaw, int plane);
|
||||
|
||||
/**
|
||||
* Called after the scene has been drawn
|
||||
*/
|
||||
void postDrawScene();
|
||||
|
||||
void animate(Texture texture, int diff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user