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.

  • \$\begingroup\$ 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). \$\endgroup\$ – doppelgreener Nov 12 '12 at 22:42
  • \$\begingroup\$ 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 :( \$\endgroup\$ – King Snail Nov 12 '12 at 22:57
  • \$\begingroup\$ What is the API you're referring to? \$\endgroup\$ – doppelgreener Nov 12 '12 at 23:10
  • \$\begingroup\$ Its marmalade mobile phone API. It uses its own coordinate system and matrices are 3x3 + vec3. \$\endgroup\$ – King Snail Nov 12 '12 at 23:14
  • \$\begingroup\$ 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. \$\endgroup\$ – doppelgreener Nov 12 '12 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.