[SDL] Question about Pointer to Display Surface
Adrian Hey
ahey at eptools.demon.co.uk
Wed Feb 4 02:19:55 PST 2004
Hello,
Some functions in the SDL api only seem to make sense for the display
surface, but to take a pointer to a surface as argument (usually
called "screen"). I'm thinking of functions like SDL_UpdateRect(s) and
SDL_Flip,SDL_WM_ToggleFullScreen
Am I right in thinking that..
There is only one display surface.
The SDL_GetVideoSurface returns a pointer to that surface.
This pointer is always the same as that returned by
the last SDL_SetVideoMode.
This pointer (and only this pointer) is what should be
supplied as argument to SDL_UpdateRect(s), SDL_Flip, etc..
The only reason I have doubts about this is that if the above
statements are true then SDL should already know what the current
display surface is, so the screen argument seems superfluous. But
I guess it's there for a reason, so one or more of the above
statements might be false :-(
Also, is the pointer always the same (so I can reuse it again and
again), or might it change (in which case I guess I have to call
SDL_GetVideoSurface each time I need it)?
Thanks
--
Adrian Hey
More information about the SDL
mailing list