Opengl Without Tearing


Jan-Nik

Active Member
Joined
Jan 5, 2009
Messages
539
Location
Germany
I'm using the following package to create an OpenGL game for the Wiz: http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,46,188

Unfortunate it still has tearing. How can I fix that?


BTW: I heard that GPH is working on their own replacement for wizGLES. Any news on that?
 
Initialize your display in portrait mode. Not sure how that particular package does that. That means having a 240x320 display. Then after doing all the initialization for the screen, set a viewport, a projection (orthographic for 2d game), then modify the projection with glRotate and glTranslate calls (90 degrees rotate on x axis, 240 pixels translation on the x axis, this all assumes you're using a 240x320 orthographic projection). Hope this helps.
 
Jan-Nik said:
I'm using the following package to create an OpenGL game for the Wiz: http://dl.openhandhe...?0,0,0,0,46,188

Unfortunate it still has tearing. How can I fix that?


BTW: I heard that GPH is working on their own replacement for wizGLES. Any news on that?

Its already on the lastest image, i have the source and intend to release a new 3d dev pack....sometime ;-)
 
Last edited by a moderator:
as the others said, the display must be initialized properly first (in it's native 240x320 mode). i've a modified version of wizGLES.h/cpp inside the tissueGL virtual framebuffer. source can be downloaded here: http://crow.riot.org/wiz/tissueGL-src.tgz

as trentg notices, you need of course rotate your view by 90 degree in z (opengl z axis points to the user, -z away). if you're using opengl stack i think it might be sufficient to call glRotate(90,0,0,1) (or was it glRotate(-90,0,0,1) :)) at the very beginning to setup you your initial rotation ( somewhere right after glMatrixMode(GL_MODELVIEW); glLoadIdentity(); )

keep in mind that your aspect is not 320/240 then but 240/320...
 
crow_riot said:
as the others said, the display must be initialized properly first (in it's native 240x320 mode). i've a modified version of wizGLES.h/cpp inside the tissueGL virtual framebuffer. source can be downloaded here: http://crow.riot.org/wiz/tissueGL-src.tgz

as trentg notices, you need of course rotate your view by 90 degree in z (opengl z axis points to the user, -z away). if you're using opengl stack i think it might be sufficient to call glRotate(90,0,0,1) (or was it glRotate(-90,0,0,1) :) ) at the very beginning to setup you your initial rotation ( somewhere right after glMatrixMode(GL_MODELVIEW); glLoadIdentity(); )

keep in mind that your aspect is not 320/240 then but 240/320...
Thanks! I will try that.

Its already on the lastest image, i have the source and intend to release a new 3d dev pack....sometime ;-)
Do you think you will release in the next weeks? Or could you send me the source since I want to start to work on a game for the Pandora Angst Coding Competition?
 
Last edited by a moderator:
Jan-Nik said:
Its already on the lastest image, i have the source and intend to release a new 3d dev pack....sometime ;-)
Do you think you will release in the next weeks? Or could you send me the source since I want to start to work on a game for the Pandora Angst Coding Competition?
Yes i will make effort to.
 
Last edited by a moderator:
(Asking as OpenGl programmer, not OpenGL ES) Why not rotating (90°) the projection matrix only once at programm start?

Edit: I miss trentg post ... getting old
 
Back
Top