The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Vincent gives upside down mirror image output!!!

I was working some OpenGL ES code on the Nokia v2.0 Open GL SDK, I based how did my Open GL code on on the Example3D game from Nokia, all worked fine upto this point.

I then made a build of the project under the UIQ SDK using the Vincent OpenGL ES implementation, I got this working only to find the whole display was an upside down mirror image of how it appeared under the S60 SDK.

To check it wasn't just me doing something silly I ported the Nokia Example3D project over to the UIQ SDK and sure enough exactly the same problem.

Going back to the original version I had noticed the Y-Axis did seem to be wrong way up, increasing the y-position of an object moved it down the screen.

Trying to understand what's going on here I've been looking at the example (and my code copied from it) uses glLoadMatrixx. The second and third columns all seem to be negated, why is this being done? I can't really get my head around all the complications here, trying something as obvious as making the main 3 columns non-negative, or all negative doesn't give any sensible result, the code I'm looking at is as follows from CPolygonObject.cpp.

Re: Vincent gives upside down mirror image output!!!

It's negating elements in your matrix? I don't know what's going on there, I am skeptical about this claim. That would be bad behavior regardless of the correctness of the result. However it this is your app code doing this it's completely misleading information, it's up to you to understand your own app.

Nothing should be reversing user specified matrices, it should be handled internally probably by the back end rasterization or the internal viewport transformation if that's fixed, you should see no platform to platform difference looking at the matrices (again unless this is your app in which case you should be fixing your code not posting).

One test would be to loadidentity model and projection matrices and then move an object on screen with a simple viewport (yea take a good look at your viewport call and make sure it's legal).

Regardless of native screen Y addressing (often +y = down), OpenGL +Y should be oriented up so implementations which do this do the right thing.

One possibility is that it's working and the issue is physical display orientation of the devices you're using, assuming that the platform has some concept of diaplay orientation.

Start with figuring out whether +y is up and +x points to the right with identity matrices and then you will know for sure which implementation is correct.

Re: Vincent gives upside down mirror image output!!!

AFAIK this is an artifact inherited from the Windows Mobile version that has not been addressed yet. For Windows Mobile, the bitmap is set up such as increasing y-coordinates go up on the screen. (I.e. bitmap coordinates are the same as GL coordinates)

I'd assume that the blitting code in eglSwapBuffers has not been set up correctly in the current Symbian build.

So Symbian support is still work in progress, which is why there are no 'official' builds available yet.

Re: Vincent gives upside down mirror image output!!!

hm,

If you're creating a DIB section selected into an offscreen DC for the back buffer in your Windows Mobile version, you can set the BITMAPINFOHEADER::biHeight to a negative value when creating the DIB section and that will create the more common "top-down" DIB (origin at upper-left corner).