Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

Edge 3.987 Landscape problem


Edge 3.987 Landscape problem

Postby fella » Oct 6, 2010 @ 10:17am

Hi.
I have just installed the new edge lib release and I have a lot of problems with the Opengl support on landscape mode.

First af all, with the old edgelib versions, we must initialize & customise openGL with the following code :
Code: Select all





ecd.dsp->Perspective2D(480,320,false);
...
glLoadIdentity();
glTranslate(.0049f,0,0);
glRotate(90.0f,0,0,0f,1,0f);
5 lines; 1 keywds; 12 nums; 29 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  

Now, on my 3G iPhone device I must initialize & customise OpenGL with this code to center my screen :
Code: Select all





ecd.dsp->Perspective2D(480,320,false);
...
glLoadIdentity();
glTranslate(0.00122f,-0.00122f,0);
/*No glRotate(...); */
5 lines; 1 keywds; 7 nums; 22 ops; 0 strs; 1 coms    Syntactic Coloring v0.4 - Dan East  


But... with this init the screen coordinates seems to be bad :
If I blit a centred texture all is ok but if I am closer to the edge of the screen, the coordinates seem to become increasingly inaccurate (texture is out of the screen).

So, can you help me ? And can you think to notify such changes in your release notes / documents to avoid us having to grope how to fix these regressions :? .

Thanks a lot.
Fella
fella
pm Member
 
Posts: 8
Joined: Apr 22, 2009 @ 11:50am


Re: Edge 3.987 Landscape problem

Postby edge » Oct 7, 2010 @ 8:10pm

Hi Fella.

Try to set config->orientation to DOR_LANDSCAPE in the OnDisplayConfig callback of your framework. Remove all calls to rotate/translate and see if it works. Also, we recommend using the display GetWidth and GetHeight calls to pass to the Perspective2D function.

Johan
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron