I have a running implementation of SDL_GL_MULTISAMPLEBUFFERS,
SDL_GL_MULTISAMPLESAMPLES and SDL_GL_SWAP_CONTROL in my game engine.
However as some graphic drivers / cards do not support it, setting those
values, might end in “Could not find matching GLX visual”.
So currently I am looking for a “clean” way to find out if these
attributes are supported or not.
I had some approached, but none I am satisfied with:
I could query the GL extensions to see if GL_SWAP_BUFFERS and
ARB_MULTISAMPLE is supported. But reading the GL extensions normally
only work after I have called SDL_SetVideoMode while I would need to set
the Attributes before to get them to work. Also I do not know if the GL
extensions really would make sure the SDL attributes DO work.
I could just after “could not find matching GLX visual” just fallback,
disable those values as sorta Fallback and init video again.
Both solutions would always mean to call SDL_SetVideoMode twice… I
don’t know but that does not really satisfy me. Anyone knows another way?
I posted a sort of related question 20 minutes ago. I also run
SDL_SetVideoMode() twice in these cases. Either because it returned an
error or because checking the attributes with SDL_GL_GetAttribute after
SDL_SetVideoMode() returns an attribute value (not return value!) of 0.
Oliver
zico wrote:> Hello SDL users and developers
I have a running implementation of SDL_GL_MULTISAMPLEBUFFERS,
SDL_GL_MULTISAMPLESAMPLES and SDL_GL_SWAP_CONTROL in my game engine.
However as some graphic drivers / cards do not support it, setting those
values, might end in “Could not find matching GLX visual”.
So currently I am looking for a “clean” way to find out if these
attributes are supported or not.
I had some approached, but none I am satisfied with:
I could query the GL extensions to see if GL_SWAP_BUFFERS and
ARB_MULTISAMPLE is supported. But reading the GL extensions normally
only work after I have called SDL_SetVideoMode while I would need to set
the Attributes before to get them to work. Also I do not know if the GL
extensions really would make sure the SDL attributes DO work.
I could just after “could not find matching GLX visual” just fallback,
disable those values as sorta Fallback and init video again.
Both solutions would always mean to call SDL_SetVideoMode twice… I
don’t know but that does not really satisfy me. Anyone knows another way?