[SDL] Re: direct access to video memory
Randi J. Relander
rjrelander at users.sourceforge.net
Wed Jan 24 06:30:10 PST 2001
Alexander Chemeris wrote:
> Gautier Portet wrote:
> > if you call SDL_SetVideoMode with SDL_FULLSCREEN only
> > (NOT SDL_DOUBLEBUF) you DO have direct video memory
> > access (at least under win/dx)
> This is extraction from my code:
> SDL_Surface *video;
> video = SDL_GetVideoSurface();
> So, cursor DIDN'T show on the screen.
> But, after adding
> it did.
Shouldn't that be SDL_FULLSCREEN|SDL_HWSURFACE for direct access? Just using
SDL_FULLSCREEN implies SDL_SWSURFACE and causes a shadow surface to be
created. Blits go to the shadow and then update transfers shadow to screen.
BTW, this is non-portable since direct access to the screen is not available
on some (many?) platforms.
Generic Armored Combat System
More information about the SDL