PDA

View Full Version : impossible to change stencil buffer size



Paulius
12-07-2005, 08:20 AM
if different stencil size is specified the second time with SDL_GL_SetAttribute then SDL_SetVideoMode fails

SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
surface:= SDL_SetVideoMode(640, 480, 32, SDL_OPENGL or SDL_DOUBLEBUF);
SDL_FreeSurface(surface);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0);
surface:= SDL_SetVideoMode(640, 480, 32, SDL_OPENGL or SDL_DOUBLEBUF);

Anybody else experience this?

technomage
12-07-2005, 09:03 AM
try the code here

http://www.cerebral-bicycle.co.uk/viewdoc.asp?doc=307&date=Y

I had similar problems a while back, and you have to get it exactly right otherwise it just doesn't work.

Dean

technomage
12-07-2005, 09:04 AM
Sorry completely miss read the issue. I'll test this and see if I get the same problem.

Dean

Paulius
19-07-2005, 08:46 AM
Anybody tried it?

Paulius
19-07-2005, 06:50 PM
Hmm?¢_¬¶this topic looks like a counter argument to those that say that PGD is too SDL-centric :wink:
Anyway dug through SDL?¢_Ts source and found out that it never actually destroys the old window, so for this to work it?¢_Ts needed to kill Video subsystem and initialize again.

technomage
20-07-2005, 10:31 PM
Hi Paulius

sorry, this was on my to do list, we just got hit with some major overtime at my day job.

glad you found out the issue, it's good to know. :D

Dean

Paulius
14-01-2006, 12:33 AM
More sdl weirdness with trying to make proper mode switching, seems after running full screen when switching to windowed mode and reseting video subsystem SetVideoMode passes ok, but no window gets created, windowed->windowed, full->full and windowed->full goes ok, anyone else get this?
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL or SDL_FULLSCREEN)
SDL_QuitSubSystem(SDL_INIT_VIDEO) ;
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);
:think:

Paulius
18-01-2006, 10:38 PM
Can?¢_~t pinpoint where exactly there?¢_Ts a bug in sld with SDL_OPENGL flag, but using SDL_SetVideoMode without it seems to go over the issue.
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL or SDL_FULLSCREEN)
SDL_SetVideoMode(640, 480, 32, 0);
SDL_QuitSubSystem(SDL_INIT_VIDEO) ;
SDL_InitSubSystem(SDL_INIT_VIDEO);
SDL_SetVideoMode(640, 480, 32, SDL_OPENGL);