Tearing


crow_riot

Well-Known Member
Joined
Sep 21, 2009
Messages
1,763
Location
.at
sorry if it bugs someone to talk about tearing again...

I'm doing stuff with OpenGL on my Wiz. I've read somewhere in the forums that if using OpenGL then the tearing should be non-existent. But i still face the tearing issues. It's not much, but noticable (as usual). I dont use notaz(?) display timing stuff atm because i don't know if it's really necessary...

any input about this would be helpful :)
 
crow_riot said:
sorry if it bugs someone to talk about tearing again...

I'm doing stuff with OpenGL on my Wiz. I've read somewhere in the forums that if using OpenGL then the tearing should be non-existent. But i still face the tearing issues. It's not much, but noticable (as usual). I dont use notaz(?) display timing stuff atm because i don't know if it's really necessary...

any input about this would be helpful :)

The idea is to change the screen mode to it's native 240x320 and use OpenGL to do any necessary rotation.

If you have the screen rotated, it'll tear, regardless of how you draw to the framebuffer.
 
Last edited by a moderator:
ah! that's not that difficult to achieve. thanks for the info - i just didn't get that out of the other threads.

...

just returned home and tried that. it's perfect now. had to change some lines in pickle's wizGLES init API and fix my scenetree, but that's all and was not that difficult. thanks for help B)
 
I wonder - would a wrapper be possible?
A launcher, that opens up a 240x320 framebuffer, launches an app (or a game), uses OpenGL to rotate the framebuffer of the game and puts that on its own framebuffer.
This would be a tearing fix for nearly ALL games at once... anybody know if that would work? It shouldn't slow down things too much, if it's using OpenGL.

However, this would only work with games that are NOT using OpenGL (well, which is the majority of the games right now).
 
EvilDragon said:
I wonder - would a wrapper be possible?
A launcher, that opens up a 240x320 framebuffer, launches an app (or a game), uses OpenGL to rotate the framebuffer of the game and puts that on its own framebuffer.
This would be a tearing fix for nearly ALL games at once... anybody know if that would work? It shouldn't slow down things too much, if it's using OpenGL.

However, this would only work with games that are NOT using OpenGL (well, which is the majority of the games right now).

If that would work, I don't know why no one has done it yet.

Nice video 'bout the Wiz, by the way.
 
Last edited by a moderator:
EvilDragon said:
I wonder - would a wrapper be possible?
A launcher, that opens up a 240x320 framebuffer, launches an app (or a game), uses OpenGL to rotate the framebuffer of the game and puts that on its own framebuffer.
This would be a tearing fix for nearly ALL games at once... anybody know if that would work? It shouldn't slow down things too much, if it's using OpenGL.

However, this would only work with games that are NOT using OpenGL (well, which is the majority of the games right now).
Might work but you would likely get a performance hit. From what has been said doing it with open GL would be sloooooooooooooooooooooow.

To make it work you would probably have to go to the metal and bang the Pollux hardware directly.
 
Last edited by a moderator:
EvilDragon said:
I wonder - would a wrapper be possible?
A launcher, that opens up a 240x320 framebuffer, launches an app (or a game), uses OpenGL to rotate the framebuffer of the game and puts that on its own framebuffer.
This would be a tearing fix for nearly ALL games at once... anybody know if that would work? It shouldn't slow down things too much, if it's using OpenGL.

However, this would only work with games that are NOT using OpenGL (well, which is the majority of the games right now).

I was thinking about a supporting lib that people should use instead of direct fb access that manages that using gl. the wrapper is a nice idea, i could help on the opengl side, but my knowledge about linux internals to achieve the rest is non-existant :)

about the speed issue, i have not checked 'eglCreatePixmapSurface' yet, if it is supported by the hardware. that would be a nice thing to have and may reduce speed impact.
 
Last edited by a moderator:
crow_riot, that's great that you got it to work. Could you share your work? I would like to get into opengl development on the wiz, so a starting base would be nice :)
 
u9i said:
crow_riot, that's great that you got it to work. Could you share your work? I would like to get into opengl development on the wiz, so a starting base would be nice :)
i'm planning to release sources when they are in a releasable state :)

first u need to have the opengl lib installed on your wiz from here: http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,23,132

then i'm just using wizGLES from Pickle's wiz3d_devel.zip pack from here: http://dl.openhandhelds.org/cgi-bin/wiz.cgi?0,0,0,0,46,188

the changes on wizGLES are minimal (i dont have the code here, so i'm just talking from what i remember :) ): force 240x320 mode (using ioctl) and swap width/height parameters in the swap function accordingly.

what you have then is a 90degree rotated framebuffer. to change to 'widescreen' again, you need to adjust the modelview matrices of the objects you draw ( hint: glRotatef(-90,0,0,1) )... the projection matrix also needs to be adjusted to have the correct aspect (240.f/320.f)...
 
Last edited by a moderator:
just that it's not misleading - u dont need to change anything within wizGLES to get it working! i just made the changes to have no tearing...
 
About eglCreatePixmapSurface, I would be interested in knowing if this works or not. I tried to get pbuffers working myself but it didn't seem to be supported. I could do all the steps required and then I'd get a error return code (can't remember which function), yet glGetError was set to GL_SUCCESS and the pbuffer didn't work... sorry don't remember all the details, but having a surface you could render to other than the backbuffer would be great (very important key feature for me).
 
trentg said:
About eglCreatePixmapSurface, I would be interested in knowing if this works or not. I tried to get pbuffers working myself but it didn't seem to be supported. I could do all the steps required and then I'd get a error return code (can't remember which function), yet glGetError was set to GL_SUCCESS and the pbuffer didn't work... sorry don't remember all the details, but having a surface you could render to other than the backbuffer would be great (very important key feature for me).

you need to check eglgeterror ... which returns 0x3004 ... which means EGL_BAD_ATTRIBUTE... which is bogus, because i dont pass a bad attribute. so no success yet for eglCreatePBufferSurface... :(
 
Last edited by a moderator:
Oh, that's what I meant, eglGetError... you can actually get the function to return error but eglGetError returns success...

Sorry I seem to have lost my code from when I was messing with this.
 
trentg said:
Oh, that's what I meant, eglGetError... you can actually get the function to return error but eglGetError returns success...

Sorry I seem to have lost my code from when I was messing with this.

it's somewhere here in the forum. your way didn't work for me either, so i went my own ... which also doesnt work :)
i've send some words to tonyhan - maybe he's allowed to hand over some samples. i just gave it a try, i dont expect anything other than no answer... :)
 
Last edited by a moderator:
Back
Top