Hello,
I have a problem with multisampling. This is what I do:
Before calling “SDL_SetVideoMode(… SDL_OPENGL)” I set the appropriate
OpenGl-attributes like this:
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
After video mode is set using the call mentioned above I say
glEnable(GL_MULTISAMPLE_ARB);
From then on all my rendering appears smooth, just like I expected it.
Accordingly quering various states gives me:
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, …) --> 1
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, …) --> 4
glGet(SDL_SAMPLE_BUFFERS_ARB, …) --> 1
glGet(SDL_SAMPLES_ARB, …) --> 4
Well, no problems so far.
When I try to do this in fullscreen mode, i.e. calling
SDL_SetVideoMode(… SDL_OPENGL | SDL_FULLSCREEN);
I see the well-known jagged edges, what means I don’t have multisampling.
States then are:
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, …) --> 1 ???
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, …) --> 4 ???
glGet(SDL_SAMPLE_BUFFERS_ARB, …) --> 0 !!!
glGet(SDL_SAMPLES_ARB, …) --> 0 !!!
Furthermore, I am not able to achieve multisampling in windowed mode any more
after having tried the fullscreen multisampling.
After restarting X multisampling in windowed mode is possible again.
When I start in windowed mode and switch to fullscreen mode later using
SDL_WM_ToggleFullScreen(…) I even get multisampling in fullscreen mode, but
only once. After quiting the program and starting again no multisampling is
available until restarting X.
Any ideas?
BTW: It’s a linux system with an NVIDIA GeForce3 using the NVIDIA drivers in
the version 1.0-5341.
Thanks in advance,
Christian
P.S. Sorry for the long mail …