Hi Julian,
Thank you for your answer.
This is the rendering code:
void clear_surface(SDL_Surface* surface, Uint8 r, Uint8 g, Uint8 b)
{
Uint32 color = SDL_MapRGB(surface->format, r, g, b);
SDL_FillRect(surface, NULL, color);
}
void render()
{
clear_surface(backbuffer, 0, 0, (Uint8)(rand()%256));
SDL_BlitSurface(backbuffer, NULL, screen, NULL);
SDL_UpdateRect(screen, 0, 0, 0, 0);
}
I do not see white flashes, but approximately the first half of the window
(it is a SWSURFACE displayed in windowed mode) is filled with another
shade of blue than the other half.
Any suggestions?
Thanks,
TimOn Thu, 15 Jan 2004 09:44:45 +0100, Julien Pauty wrote:
Tim M. wrote:
Hi,
Is it possible to set up SDL with double buffering and hardware
surfaces in windowed mode on Windows? Manipulating the surface and
calling SDL_Flip(…) results in flicker when in windowded mode, in
fullscreen mode it looks beautiful.
Thanks,
-Tim
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Hardware surfaces are not available in windowed mode (except on Amiga
IIRC). OTOH, they are available in fullscreen mode on Windows (via
directx).
For the flicker problem, are you seeing “white flashes” on the screen ?
Maybe you just loose frames in windowed mode, which is not surprising
if you redraw the whole screen.
Julien
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl