SDL_Surface spec flags

Hi,

I am beginner into SDL programming, and so I am wondering how to use spec flags SDL_PREALLOC and
SDL_HWACCEL with SDL_Surface…

  • Are they accessible read only ? Which function use they ?
  • How to set them ? They are not listed in SDL_SetVideoMode function…

Thanks a lot to all of you for your future answers.
Behess

Plus simple, plus fiable, plus rapide : d?couvrez le nouveau Caramail - http://www.caramail.lycos.fr

Beno?t Silliard wrote:

Hi,

I am beginner into SDL programming, and so I am wondering how to use spec flags SDL_PREALLOC and
SDL_HWACCEL with SDL_Surface…

  • Are they accessible read only ? Which function use they ?

Yes, they are read only.
SDL_PREALLOC means to SDL the memory containing the pixels should not be
freed when the surface is freed
SDL_HWACCEL means that the blit that just happened with this surface ase
source used hardware acceleration

  • How to set them ? They are not listed in SDL_SetVideoMode function…

You shouldn’t set them yourself, if you do, nasty things can happen :slight_smile:

Stephane