+ if (bpp >= 32)
+ {
+ 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);
+ SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 24);
+ SDL_GL_SetAttribute (SDL_GL_STENCIL_SIZE, 8);
+ }
+ else
+ {
+ SDL_GL_SetAttribute (SDL_GL_RED_SIZE, 1);
+ SDL_GL_SetAttribute (SDL_GL_GREEN_SIZE, 1);
+ SDL_GL_SetAttribute (SDL_GL_BLUE_SIZE, 1);
+ SDL_GL_SetAttribute (SDL_GL_DEPTH_SIZE, 16);
+ }