Landscape and Portrait modes with SDL and OpenGL ES |
Landscape and Portrait modes with SDL and OpenGL ES |
Scott Percival
Guest
|
The SDL output makes sense; the image on the Portrait screen is the same as the Landscape one, but scaled vertically, with the viewport obscuring most of the left and right hand sides. I would check the middleware you're using to set the projection matrix; you're probably going to have to do more than just set the aspect ratio to get the effect you're looking for.
On 20 July 2014 05:31, Alexander Chaliovski wrote:
|
|||||||||||||
|
Landscape and Portrait modes with SDL and OpenGL ES |
Alexander Chaliovski
Guest
|
I am out of options I was trying to compensate with the Camera field of view but I couldn't get the ratio properly. Is there an SDL function that can help for this. Maybe I can do something like crop to fit ?
|
|||||||||||
|
Landscape and Portrait modes with SDL and OpenGL ES |
Scott Percival
Guest
|
Not really. SDL has minimal interaction with OpenGL, mostly from the window-management side of things. The issue you're having is caused by the projection matrix set up by your Camera object middleware, which is responsible for mapping the field-of-view in world space to normalized screen coordinates. Perhaps if you can tell us what middleware you're using, the initial setup of your m_pCamera object (cropped out in your original post), and a diagram of how you want things to look on screen, we might be able to assist.
On 20 July 2014 17:00, Alexander Chaliovski wrote:
|
|||||||||||||
|