Converting DirectX to OpenGL

Started by
2 comments, last by HappyDude 21 years, 3 months ago
I wrote a small program in DirectX and am now trying to write an equivalent one in OpenGL... I converted everything, and it works... kinda... my problem is that my OpenGL version seems to have flipped all my textures horizontally and vertically, and my left-right movement seems to have been inverted as well... it looks like my vertex coordinates are flipped horizontally when they''re displayed, but their vertical components seem to be the same. Is there a difference in the coordinate systems of OpenGL & DirectX that I''m missing which is causing these problems?
Advertisement
Since OpenGL uses a right handed system, the z-coordinate goes in the opposite direction. You also have to define triangle vertices in a counter-clockwise order instead of clockwise so they face the right way.

------------------------------
BASIC programmers don''t die, they just GOSUB and don''t return.
------------------------------BASIC programmers don't die, they just GOSUB and don't return.
for textures d3d uses 0,0 as topleft, gl uses 0,0 as bottom left
Exactly what I needed, thanks.

This topic is closed to new replies.

Advertisement