iphone sdk 3.0 - OpenGL ES 2.0 equivalent of glOrtho()? -


In my iphone app, I have to project 3D scenes in the 2D coordinates of the screen for some calculations. My objects are known through different rotation, translation and scaling. So I thought that I had to multiply in the corner with the modelView matrix, then I have to multiply it with the orthogonal projection matrix.

First of all, am on the right track?

I model view matrix but requires projection matrix. Is ES Globe () equivalent in ES 2.0?

  mat4 projection metrics = mat4 (2.0 / 768.0, 0.0, 0.0, -1.0, 0.0 , 2.0 / 1024.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0); Gl_Position = position; Gl_Position * = Rotation matrix; Gl_Position.x - = translateX; Gl_Position.y - = translateY; Gl_Position * = projection matrix;  

For a certain resolution (in my case 1024x768 for the iPad) I used this matrix and everything works like attraction :) here to complete your details What is required in your matrix:


Comments