Closed dusk125 closed 3 years ago
Hi. Thank you for the PR, but I found an issue with drawing text on the screen.
On the first screenshot you can see my game using the current release of Pixel (v0.10.0).
On the second screenshot there is my game using the version of Pixel from your PR (with TrianglesClipped
).
As you can see, my debug console got off screen for some reason. I use pixel/text
for writing to it and drawing its contents each frame. Here's the code:
is the text on the right side of the play area not draw with pixel/text
?
@cebarks Yeah, it's drawn with pixel/text
too but moved not as much for some reason.
I've got the same kind of behaviours, that was introduced by the PR #252 related to anchors. That only happens with text rendering.
In my case, it broke my text centering system, while from my understanding, with the default anchor it should have changed nothing.
@zergon321 out of curiosity, had you tested after the anchor changes and before these changes? I'm trying to figure out if this issue is in Triangles changes or anchors. Thanks
@dusk125 I did more research. Nevermind, your PR works fine. What's really faulty is the latest version of Pixel which I downloaded using git clone
(don't know which commit introduces the issue though). The version 0.10.0 that can be obtained from Google mirrors via go get
works fine too. I think your PR even fixes the issue with the moved text.
But what really concerns me is that I get slightly less FPS when the code from your PR is being used (depending on the situation, there is 10-100 FPS decrease in average). Is there a way to optimize it?
@zergon321 I re-reviewed the gl triangles changes, and nothing stands out to me as to why you'd be getting fewer frames. I'm going to take a look at previous merges to see if I can find anything that might point to a performance loss.
This new triangle type replaces the first pass at clipping rectangles in favor for a shader-based approach that works better with pixelui's (imgui's) rendering.