Closed Douglasdc3 closed 3 years ago
I can't reproduce this in any scenario - do you have anything else going on?
Thanks for the reply, I did a bit more digging based on what is different with the above code used and the project setup.
I found that batch.begin()
was called then the above render
method was called one extra step was performed which isn't in the above example. A viewport with stage, the LibGDX stage calls batch begin on another batch instance which seems to be causing issues. Once the UI viewport was disabled the above example works as expected.
Not sure if this is bug or intended I'll close this issue as the issue is resolved.
Version: 2.5.0 libgdx: 1.10.0 lwjgl: 3.2.3
When using shape drawer in combination with orthographic camera it does not use the projection matrix for the first 125 objects.
With the example code below it draws 124 rectangles on the bottom left hand corner of the screen and draws one rectangle on the center of the screen.
From debugging it looks like projection is not applied in first 125 objects than some sort of cache is flushed which applies the projection matrix to the next draws.
The expected result should be either none of the draw calls use the projection matrix or all calls use the projection matrix.
Happy to help debug / fix this issue if someone can help me pinpoint the cause.