Double buffering problems with SDL + OpenGL

Hi,
I have been trying to write a simple program, under
X that uses SDL and OpenGL with double buffering.
My first question is: Below, does 0 mean enable?

SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 0 );

If so, when I attempt to use double buffering I get
the following error.

“Couldn’t find matching GLX visual”

Now I did a search on Google with the error string but
nothing specific showed up. Except to check glXinfo
for direct rendering ( which says no) and see if
glXgears ran OK (which it does).
Also I can use GLUT to run double buffered programs

Any one had a similar problem? I would be very
grateful for any assistance

thanks

Laurie__________________________________________________
It’s Samaritans’ Week. Help Samaritans help others.
Call 08709 000032 to give or donate online now at http://www.samaritans.org/support/donations.shtm

The Zero is disable, true==1, false==0

The “Couldn’t find matching GLX visual” almost always happens when
you’re requesting a display surface with a bit depth different than the
X server’s. If X is running at 16 bpp and you request 32 or 24 you’ll
end up with this error.

The best thing to do is call SDL_SetVideoMode with a bpp of 0, like
this:

SDL_SetVideoMode(800,600,0,SDL_OPENGL)

which will inherit whatever bit depth the X server’s running at.On Mon, 2003-05-26 at 09:51, Laurie Still wrote:

Hi,
I have been trying to write a simple program, under
X that uses SDL and OpenGL with double buffering.
My first question is: Below, does 0 mean enable?

SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 0 );

If so, when I attempt to use double buffering I get
the following error.

“Couldn’t find matching GLX visual”

Now I did a search on Google with the error string but
nothing specific showed up. Except to check glXinfo
for direct rendering ( which says no) and see if
glXgears ran OK (which it does).
Also I can use GLUT to run double buffered programs

Any one had a similar problem? I would be very
grateful for any assistance

thanks

Laurie


It’s Samaritans’ Week. Help Samaritans help others.
Call 08709 000032 to give or donate online now at http://www.samaritans.org/support/donations.shtm


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Jimmy <@Jimmy>
Jimmy’s World.org
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030526/f761b8a0/attachment.pgp

Hi All,
Thanks Jimmy for clearing that up, the confusion
arose because when double buffering is enabled my
animation flickers badly.
On reflection it doesn’t look like it would if
there were no double buffering, i.e where objects
dissapear at a certain point down the screen.
I’m beginning to think that it might be my monitor
which is an LCD screen.
Anyway thanks again.

Laurie__________________________________________________
It’s Samaritans’ Week. Help Samaritans help others.
Call 08709 000032 to give or donate online now at http://www.samaritans.org/support/donations.shtm