Closed Namaneo closed 2 years ago
Hey, quick update on this one: I just tested those modifications with all available GFX (as I finally could get my hand on an OSX device). Everything is working as expected, with the same behavior across platforms.
Well, I've gone a little further on the tests regarding the bottom-to-top tranformation.
While this is working correctly using MTY_WindowDrawQuad
, it does not when using MTY_RendererDrawQuad
with a viewport size that does not match the window size.
I tried to find a elegant workaround, but I felt like it was safer to let the user perform its own calculations based on the GFX in use.
This part has been reverted, let me know if there's a solution I haven't seen!
Addressed in #51.
Back with a proposal this time: I need to draw multiple quads in a single loop iteration (the game frame and buttons for a virtual controller), drawn at different positions of the viewport.
As far as I've seen, there were two ways to implement that:
MTY_RenderDesc
to describe the image to be drawn as a layer, i.e. as a new element of the end frame that will not trigger any clearing of the rendering target.MTY_RenderClear
with itsWindow
version, and disabling all implicit clearing.I chose to go for the first solution as it seemed to be less invasive on the code-base, and does not break any existing usage if the library (excluding a required
matoya.h
update on the end projects).Also, as OpenGL is the only one with a bottom-left origin, I transform the image positions used with this GFX to make it top-left instead.
What do you think? :slightly_smiling_face: