PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Edge 3.987 Landscape problem

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:

ecd.dsp->Perspective2D(480,320,false);
...
glLoadIdentity();
glTranslate(.0049f,0,0);
glRotate(90.0f,0,0,0f,1,0f);

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

ecd.dsp->Perspective2D(480,320,false);
...
glLoadIdentity();
glTranslate(0.00122f,-0.00122f,0);
/*No glRotate(...); */


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
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