SDL_Flip flickers badly

Hi,
This is a small problem of mine but I am asking for you guys to solve
it completely cause its taking me a lot of time.

I tried using SDL_Flip while SDL_DOUBLEBUF set while initiating the
video.

The traditional method is ->

INITIALIZE VIDEO WITH flags HAVING SDL_DOUBLEBUF

WHILE (SOME CONDITION)
{

DO SOME OPRATION ON SOME SURFACE
SDL_BlitSurface ON TO ANOTHER SURFACE

    USE SDL_Flip TO FLIP THE SCREEN BACKBUFFER

}

Please tell me if I am doing the right thing. If I am, where is the
problem?? Probably I haven’t understood the concept behind SDL_Flip.
But this is what the documentation teaches at the most.

Thanks,
Nayan

Please tell me if I am doing the right thing. If I am, where is the
problem?? Probably I haven’t understood the concept behind SDL_Flip.
But this is what the documentation teaches at the most.

I don’t understand what’s your problem? SDL_Flip work slow or don’t work?On Tue, 19 Aug 2003, Nayan Choudhary wrote:


Dmitry A. Lohansky

Do you have a SDL_HWSURFACE flag in SDL_SetVideoMode?

Regards,
Gerald> -----Original Message-----

From: Nayan Choudhary [mailto:nayanchoudhary at yahoo.com]
Sent: Wednesday, 20 August 2003 8:59 AM
To: sdl at libsdl.org
Subject: [SDL] SDL_Flip flickers badly

Hi,
This is a small problem of mine but I am asking for you guys to solve
it completely cause its taking me a lot of time.

I tried using SDL_Flip while SDL_DOUBLEBUF set while initiating the
video.

The traditional method is ->

INITIALIZE VIDEO WITH flags HAVING SDL_DOUBLEBUF

WHILE (SOME CONDITION)
{

DO SOME OPRATION ON SOME SURFACE
SDL_BlitSurface ON TO ANOTHER SURFACE

    USE SDL_Flip TO FLIP THE SCREEN BACKBUFFER

}

Please tell me if I am doing the right thing. If I am, where is the
problem?? Probably I haven’t understood the concept behind SDL_Flip.
But this is what the documentation teaches at the most.

Thanks,
Nayan


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Do you really need to Flip the entire screen surface? Can’t you
Just UPDATE the rectangle that has changed? That would be faster, or
at least the flicker would be conditioned to the area been updated.

Good Luck.

Juan Ignacio Carniglia - Programmer - Buenos Aires, Argentina.>

On Tue, 19 Aug 2003, Nayan Choudhary wrote:

Please tell me if I am doing the right thing. If I am, where is the
problem?? Probably I haven’t understood the concept behind
SDL_Flip.
But this is what the documentation teaches at the most.

I don’t understand what’s your problem? SDL_Flip work slow or
don’t work?


Dmitry A. Lohansky


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

SDL tells me that I don’t have hardware support for surface. May be
its true coz I have Intel i740 (too old for games ;-)) graphics card
(AGP, 8MB Video-Ram … but SDL tells me 14MB???)

I didn’t set SDL_HWSURFACE flag in SDL_SetVideoMode because of this
reason. Won’t SDL_Flip work?

SDL tells me that I don’t have support for doublebuffer
SDL_DOUBLEBUF, so SDL_Flip will be just like SDL_UpdateRect… but I
tried setting the flag with SDL_DOUBLEBUF and then used SDL_Flip, it
caused flickering. When I didn’t set SDL_DOUBLEBUF and used
SDL_Flip, everything was okay! Can’t I still use SDL_Flip? How does
it work exactly???

The thing is I want to learn about functions. Please somebody answer
my questions. I need to learn so badly!!! :expressionless:

Thanks.
Nayan

— In libsdl at yahoogroups.com, “Gerald Kaszuba” wrote:> Do you have a SDL_HWSURFACE flag in SDL_SetVideoMode?

Regards,
Gerald

-----Original Message-----
From: Nayan Choudhary [mailto:nayanchoudhary at y…]
Sent: Wednesday, 20 August 2003 8:59 AM
To: sdl at l…
Subject: [SDL] SDL_Flip flickers badly

Hi,
This is a small problem of mine but I am asking for you guys to
solve

it completely cause its taking me a lot of time.

I tried using SDL_Flip while SDL_DOUBLEBUF set while initiating
the

video.

The traditional method is ->

INITIALIZE VIDEO WITH flags HAVING SDL_DOUBLEBUF

WHILE (SOME CONDITION)
{

DO SOME OPRATION ON SOME SURFACE
SDL_BlitSurface ON TO ANOTHER SURFACE

    USE SDL_Flip TO FLIP THE SCREEN BACKBUFFER

}

Please tell me if I am doing the right thing. If I am, where is
the

problem?? Probably I haven’t understood the concept behind
SDL_Flip.

But this is what the documentation teaches at the most.

Thanks,
Nayan


SDL mailing list
SDL at l…
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at l…
http://www.libsdl.org/mailman/listinfo/sdl

SDL tells me that I don’t have hardware support for surface. May be
its true coz I have Intel i740 (too old for games ;-)) graphics card
(AGP, 8MB Video-Ram … but SDL tells me 14MB???)

What platform are you running on? What video drivers do you have?

I didn’t set SDL_HWSURFACE flag in SDL_SetVideoMode because of this
reason. Won’t SDL_Flip work?

SDL tells me that I don’t have support for doublebuffer
SDL_DOUBLEBUF, so SDL_Flip will be just like SDL_UpdateRect… but I
tried setting the flag with SDL_DOUBLEBUF and then used SDL_Flip, it
caused flickering. When I didn’t set SDL_DOUBLEBUF and used
SDL_Flip, everything was okay! Can’t I still use SDL_Flip? How does
it work exactly???

The thing is I want to learn about functions. Please somebody answer
my questions. I need to learn so badly!!! :expressionless:

Check out Bob’s new article about hardware surfaces:
http://linux.oreillynet.com/pub/a/linux/2003/08/07/sdl_anim.html

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment