[SDL] opengl buffer state
Rhythmic Fistman
rfistman at gmail.com
Fri Mar 30 15:54:36 PDT 2007
> From: "Ryan C. Gordon" <icculus at icculus.org>
>
> > Is there any SDL way of asking for only 1 buffer?
>
> SDL_GL_SetAttribute() can be used to select double/single buffering, but
> in OpenGL, you really don't want to do a dirty rectangle thing...clear
> the color buffer every frame, redraw the whole scene and swap buffers.
Thanks, SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0) does the trick, in the
sense that the resulting image is complete. I didn't actually want opengl,
I just wanted vbl syncing, hence this experiment, which was a failure:
there's still tearing, and the image suffers the positioning bug of the
other mail.
Not sure what to do, I don't really want to translate all the sprite
drawing code to opengl, it's a bit of a pain as there's a stack of bit fiddling.
RF.
--
felix: lightweight threads, HOFs and game scripting.
svn co https://svn.sourceforge.net/svnroot/felix/felix/trunk felix
More information about the SDL
mailing list