hi,
I need some help about OpenGL under SDL.
how to know if my graphics card is a 555 or 565 in 16 bits ?
see ->
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); // or SDL_GL_GREEN_SIZE, 6
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
Thanks alot.
Laurent_________________________________________________________________
T?l?chargez MSN Explorer gratuitement ? l’adresse
http://explorer.msn.fr/intl.asp.
hi,
I need some help about OpenGL under SDL.
how to know if my graphics card is a 555 or 565 in 16 bits ?
see ->
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); // or SDL_GL_GREEN_SIZE, 6
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
Pick the most bits, and you’ll get what the card has:
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
If you need to know what you actually got, use the GetAttribute() call.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
Actually Sam, I think that will fail in 16 bit mode. The GL attributes
are intended to be smallest-acceptable, not largest-available. To use
whatever you have, you should set all four of the above to 1.On Mon, Apr 08, 2002 at 10:48:10AM -0700, Sam Lantinga wrote:
I need some help about OpenGL under SDL.
how to know if my graphics card is a 555 or 565 in 16 bits ?
see ->
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 ); // or SDL_GL_GREEN_SIZE, 6
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
Pick the most bits, and you’ll get what the card has:
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
If you need to know what you actually got, use the GetAttribute() call.
–
Joseph Carter Sanity is counterproductive
- Culus thinks we should go to trade shows and see how many people we
can kill by throwing debian cds at them
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020408/b8646d4c/attachment.pgp
Actually Sam, I think that will fail in 16 bit mode. The GL attributes
are intended to be smallest-acceptable, not largest-available. To use
whatever you have, you should set all four of the above to 1.
Interesting, I was under the impression it was the other way around.
Any GL gurus who can shed some light on the subject?
Where’s Daniel when you need him, eh?
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
man glXChooseVisual says:
GLX_RED_SIZE Must be followed by a nonnegative
minimum size specification. If this
value is zero, the smallest avail?
able red buffer is preferred. Oth?
erwise, the largest available red
buffer of at least the minimum size
is preferred.
The same applies to the other sizes.On Mon, Apr 08, 2002 at 09:05:24PM -0700, Sam Lantinga wrote:
Actually Sam, I think that will fail in 16 bit mode. The GL attributes
are intended to be smallest-acceptable, not largest-available. To use
whatever you have, you should set all four of the above to 1.
Interesting, I was under the impression it was the other way around.
Any GL gurus who can shed some light on the subject?
Where’s Daniel when you need him, eh?
–
Joseph Carter Crazy in the coconut
Ben: Do you solumly swear to read you debian email once a day and
do not permit people to think you are MIA?
Culus: i do so swear
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020408/3b595181/attachment.pgp
Joseph Carter said:----------------------------------
man glXChooseVisual says:
GLX_RED_SIZE Must be followed by a nonnegative
minimum size specification. If this
value is zero, the smallest avail?
able red buffer is preferred. Oth?
erwise, the largest available red
buffer of at least the minimum size
is preferred.
The same applies to the other sizes.
Joseph is correct. By specifying zero, you request the smallest available
color component size; but specifying anything else you request the largest
color component size that is equal to or less than the size you specified.
I checked the Blue book (OGL Reference Manual.)
-Blake