[SDL] Re: Flags viwth OpenGL

Darrell Walisser dwaliss1 at purdue.edu
Mon Jan 29 10:26:04 PST 2001


On Mon, 29 Jan 2001, Marco Iannaccone wrote:

> Are you sure SDL_DOUBLEBUF is ignored?

Yes. To set GL context to be double-buffered use

SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

I understand the confusion on your part, regarding the example in the
docs:


if ( (screen=SDL_SetVideoMode(640, 480, 16, SDL_OPENGL | SDL_DOUBLEBUF))
== NULL ) {
  fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError());
  SDL_Quit();
  return;
}

I don't know why SDL_DOUBLEBUF is specified. It doesn't do anything in
this case, as far as I know. The double buffers are setup by GLX/WGL etc,,
not by SDL.






More information about the SDL mailing list