OpenGL texture coordinates are mirrored when GLM_FORCE_LEFT_HANDED is defined

My engine uses a left-handed coordinate system (y up z forward), so I am defining GLM_FORCE_LEFT_HANDED. However, I have found an issue that all textures are mirrored on the x axis. I tried fixing it by flipping the image on load, and while the image does render correctly after that, the uv coords become aligned to the bottom right instead of the bottom left.

GLM_FORCE_LEFT_HANDED on: Left handed coordinates show the image as flipped

GLM_FORCE_LEFT_HANDED off: Right handed show image correctly

1 answer

  • answered 2022-01-24 00:28 Sprocket Creations

    Alright I figured it out. It was actually my mesh that was the culprit. Not GLM_FORCE_LEFT_HANDED or OpenGL.

    Each individual face was backward, with the 0,0 uv coordinate in the bottom right corner and 1,1 in the top left. After fixing the mesh the problem has gone away.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum