Problem with SDL_GL_SetAttribute()

I I set the buffer depth, at any depth I have no problem. If I try to set
the components individually, at bit depths different than 32, I always
usually get only 8 bit for any of them, and the app runs very slowly, vith
uncorrect colors. If for instance I set 8 bit for R, G and, B, and 0 for A,
that should be the defaultt (this is set when I directly det 24) and the set
the video mode to 24, they’re all correcly set, but the app runs slowly.
The only case when the app is ok is at 32 bit (but I can’t set, for
instance, 6, 6, 6, 6, they’re alla set to 8 ).
I tried under Windows 2000, and the same value are set in fulscreen or in
window mode (but in this case there’s no performance loss and uncorrect
color…).–
Marco Iannaccone
marciann at tin.it
ICQ UIN: 18748121 MetalCoder

"I bei film drammatici fanno sentire intelligenti anche gli stupidi, i bei
film comici fanno tornare bambini anche le persone intelligenti.
Peccato che sia pi? facile trovare stupidi che vogliono sembrare
intelligenti che persone intelligenti col coraggio di saper tornare bambini"
Stan Laurel

SDL_GL_SetAttribute sets a value to the MINUMUM desired one. This means
that when you set 6 to RGB then you tell the driver that you want RGB >=6
and the driver gives you 8 which is ok, since maybe this is the
accelerated value for you. I do not know that video card you use but on my
Geforce I pass 5 to RGB and I get R:5 G:6 B:5.
Whatever bpp desktop I have I usually pass always 16 to depth buffer and
5 to RGB and the driver increases these values if needed. I would also
recommend not setting the alpha buffer unless you want to use it.
I onyl set depth, RGB and double buffering (maybe stencil too). I leave
all the other values unset.On Thu, 10 May 2001, metalboy wrote:

I I set the buffer depth, at any depth I have no problem. If I try to set
the components individually, at bit depths different than 32, I always
usually get only 8 bit for any of them, and the app runs very slowly, vith
uncorrect colors. If for instance I set 8 bit for R, G and, B, and 0 for A,
that should be the defaultt (this is set when I directly det 24) and the set
the video mode to 24, they’re all correcly set, but the app runs slowly.
The only case when the app is ok is at 32 bit (but I can’t set, for
instance, 6, 6, 6, 6, they’re alla set to 8 ).
I tried under Windows 2000, and the same value are set in fulscreen or in
window mode (but in this case there’s no performance loss and uncorrect
color…).


Marco Iannaccone
marciann at tin.it
ICQ UIN: 18748121 MetalCoder

"I bei film drammatici fanno sentire intelligenti anche gli stupidi, i bei
film comici fanno tornare bambini anche le persone intelligenti.
Peccato che sia pi? facile trovare stupidi che vogliono sembrare
intelligenti che persone intelligenti col coraggio di saper tornare bambini"
Stan Laurel