Screen Tearing (fw 2.0.0, Sdl Hw Libs)


yaustar

UK GP32 & GP2X Owner
Joined
Oct 18, 2003
Messages
2,714
Location
UK
Website
Visit site
In my game Dance2x the screen seems to tear in game. I have no idea why or how to fix it. The source is here if you would to take a look at it. Any help will appreciative.
 
yaustar posted on Aug 27 2006 at 06:19 AM said:
In my game Dance2x the screen seems to tear in game. I have no idea why or how to fix it. The source is here if you would to take a look at it. Any help will appreciative.

Quick question... I have noticed you are using SDL_GP2X_WaitForBlank, is this your own function or part of the new SDL? I tried adding your header in but I guess I need the missing lib? :blink: I am guessing that this will solve my problem because when I pause my game I get a perfect display, because it's just flipping after adding some text - no blits. :blink:
 
Last edited by a moderator:
yaustar posted on Aug 27 2006 at 05:23 PM said:
Do you mean SDL_GP2X_WaitForBlitter()? It is part of the SDL/SDL_gp2x.h file in the HW libs. I see if I can find it again.

Header files are from here: http://www.gp32x.de/board/index.php?showt...mp;#entry411784

Thanks, I got it from Alex but it's make no difference at all. Can I confirm that someone here has FW 2.0 and the HW libs working? As in, working with HW surfaces actually on?

If I set it to SW it's fine. I have double buffering enabled, do my blits, then SDL_GP2X_WaitForBlitter, then the SDL_Flip(screen). Do I need more than one surface?? Presumably my backbuffer (screen) is 640 x 240 in size even though I set it to 320 x 240, and the flipping chain is all handled automatically? There is nothing special I need to do after blit, wait for blit, flip?
 
Last edited by a moderator:
Gadget posted on Aug 27 2006 at 07:33 AM said:
Thanks, I got it from Alex but it's make no difference at all. Can I confirm that someone here has FW 2.0 and the HW libs working? As in, working with HW surfaces actually on?
What problems are you having? So far I have besides the slight tearing I haven't had any other problems with the HW libs and HW surfaces.
 
Last edited by a moderator:
yaustar posted on Aug 27 2006 at 08:46 PM said:
Gadget posted on Aug 27 2006 at 07:33 AM said:
Thanks, I got it from Alex but it's make no difference at all. Can I confirm that someone here has FW 2.0 and the HW libs working? As in, working with HW surfaces actually on?
What problems are you having? So far I have besides the slight tearing I haven't had any other problems with the HW libs and HW surfaces.

Well, this is really weird and I am sure it's something to do with VBlank.

I am getting mid vblank display, so it's like 1 complete correctly blitted frame, overlayed by a half drawn frame. It flickers like mad when there is a lot of blittering going on, but not as visible when theres little on screen.

To test something I created a 2nd back buffer. So have 'screen' and 'back'. Now I do all my blits to 'back', and just before I am ready to flip I blit 'back' to the 'screen' (320 x 240), then call SDL_GP2X_WaitForBlitter, then flip, and that WORKS???? The problem is I am having double up on blits now. I am doing a full 320 x 240 additional blit for every frame I want to display. What the hell is going on here? Am I doing something wrong or is this VBlank pissing me off?
 
Last edited by a moderator:
Can you upload or PM a copy of your game using double buffers (aka screwed up version) so I can see what the effect is. In return I send you my just built Dance2x gpe.
 
yaustar posted on Aug 27 2006 at 09:20 PM said:
Can you upload or PM a copy of your game using double buffers (aka screwed up version) so I can see what the effect is. In return I send you my just built Dance2x gpe.

Thanks for the offer! Sorted it now, see the other thread for details. :eek:
 
Last edited by a moderator:
Back
Top