In the docs, SetVideoMode has a listing of the flags it can accept for
initialization. It seems, from discussion on this board, that some of these
flags may be mutually exclusive, though this is not apparent in the
Can someone give a run-down of which flags are not allowed in combination
with one another or which result in non-intuitive behavior? I’m guessing
that several are completely discarded if combined with SDL_OPENGL, for
Flag docs are reproduced below, to save some clicking.
SDL_SWSURFACE Create the video surface in system memory
SDL_HWSURFACE Create the video surface in video memory
SDL_ASYNCBLIT Enables the use of asynchronous updates of the display
surface. This will usually slow down blitting on single CPU machines, but
may provide a speed increase on SMP systems.
SDL_ANYFORMAT Normally, if a video surface of the requested bits-per-pixel
(bpp) is not available, SDL will emulate one with a shadow surface. Passing
SDL_ANYFORMAT prevents this and causes SDL to use the video surface,
regardless of its pixel depth.
SDL_HWPALETTE Give SDL exclusive palette access. Without this flag you may
not always get the the colors you request with SDL_SetColors or
SDL_DOUBLEBUF Enable hardware double buffering; only valid with
SDL_HWSURFACE. Calling SDL_Flip will flip the buffers and update the screen.
All drawing will take place on the surface that is not displayed at the
moment. If double buffering could not be enabled then SDL_Flip will just
perform a SDL_UpdateRect on the entire screen.
SDL_FULLSCREEN SDL will attempt to use a fullscreen mode. If a hardware
resolution change is not possible (for whatever reason), the next higher
resolution will be used and the display window centered on a black
SDL_OPENGL Create an OpenGL rendering context. You should have previously
set OpenGL video attributes with SDL_GL_SetAttribute.
SDL_OPENGLBLIT Create an OpenGL rendering context, like above, but allow
normal blitting operations. The screen (2D) surface may have an alpha
channel, and SDL_UpdateRects must be used for updating changes to the screen
SDL_RESIZABLE Create a resizable window. When the window is resized by the
user a SDL_VIDEORESIZE event is generated and SDL_SetVideoMode can be called
again with the new size.
SDL_NOFRAME If possible, SDL_NOFRAME causes SDL to create a window with no
title bar or frame decoration. Fullscreen modes automatically have this flag