vid_isfullscreen = true;
}
- 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);
SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
+ 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);
+ }
screen = SDL_SetVideoMode(width, height, bpp, flags);
if (screen == NULL)