[SDL] SDL_GL_SetAttribute problem.
Lazy Foo'
lazyfoo at gmail.com
Wed Jan 3 21:54:24 PST 2007
According to the Doc Wiki, SDL_GL_SetAttribute() should be called before
SDL_SetVideoMode().
The attributes I'm trying to set is the color size:
//Set Colors
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );
In windows, it doesn't seem to care if I set the colors before or after. On
Linux the program will crash if I don't set the colors -after- calling
SDL_SetVideoMode().
So what's going on here?
More information about the SDL
mailing list