How to use the SDL_GL_GetAttribute(SDLGLattr attr, int *value)?

hi,

I would like to know how to use the SDL_GL_GetAttribute(SDLGLattr attr, int
*value) function.

I did try this: (OpenGL under SDL)

int colorDepth = 6;
SDL_Init…;
SDL_GL_SetAttribute…;
SDL_SetVideoMode…;

fprintf(stdout, “support: %d\n”, SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE,
&colorDepth);

I did get (null) but I don’t know if it is a 555 or 565 ?

thanks

Laurent_________________________________________________________________
T?l?chargez MSN Explorer gratuitement ? l’adresse
http://explorer.msn.fr/intl.asp.

Well, the interesting “return” is actually the argument that you pass
by reference. That is, colorDepth. The call will write the value into
that variable.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Thursday 11 April 2002 00:18, atelier3w Laurent wrote:

hi,

I would like to know how to use the SDL_GL_GetAttribute(SDLGLattr attr,
int *value) function.

I did try this: (OpenGL under SDL)

int colorDepth = 6;
SDL_Init…;
SDL_GL_SetAttribute…;
SDL_SetVideoMode…;

fprintf(stdout, “support: %d\n”, SDL_GL_GetAttribute(SDL_GL_GREEN_SIZE,
&colorDepth);

I did get (null) but I don’t know if it is a 555 or 565 ?