Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am using a third party rendering API, Marmalade, on top of OpenGL code and I cannot get my matrices correct. One of the API's authors states this:

We're right handed by default, and we treat y as up by convention. Since IwGx's coordinate system has (0,0) as the top left, you typically need a 180 degree rotation around Z in your view matrix. I think the viewer does this by default.

In my OpenGL app I have access to the view and projection matrices separately. How can I convert them to fit the criteria used by my third party rendering API?

I don't understand what they mean to rotate 180 degrees around Z, is that in the view matrix itself or something in the camera before making the view matrix. Any code would be helpful, thanks.

share|improve this question
    
I wanted to edit your title into something more meaningful, but I have no idea what you're asking for. OpenGL has right-handed axes already and conventionally Y points upwards (I think). –  Jonathan Hobbs Nov 12 '12 at 22:42
    
Well the API I need to use requires Y down and Z Positive I think. I am just trying to somehow convert my view matrix how they say to do it. Sorry if its a bit confusing, I am really confused myself, just trying to get this thing to work :( –  King Snail Nov 12 '12 at 22:57
    
What is the API you're referring to? –  Jonathan Hobbs Nov 12 '12 at 23:10
    
Its marmalade mobile phone API. It uses its own coordinate system and matrices are 3x3 + vec3. –  King Snail Nov 12 '12 at 23:14
    
I've done some editing. I found the topic you were referring to - it was just a Marmalade developer responding to someone's lwGx issues. If you don't use lwGx, their comment about rotation isn't necessarily relevant to you. –  Jonathan Hobbs Nov 12 '12 at 23:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.