- added the ability to toggle hardware acceleration and full screen anti-aliasing via ini settings

- added video card info screen to options menu
This commit is contained in:
Mark Vejvoda
2010-07-11 07:38:08 +00:00
parent 472abf62f2
commit 61b77fe645
13 changed files with 172 additions and 9 deletions

View File

@@ -345,7 +345,7 @@ void Window::destroy() {
SDL_PushEvent(&event);
}
void Window::setupGraphicsScreen(int depthBits, int stencilBits) {
void Window::setupGraphicsScreen(int depthBits, int stencilBits, bool hardware_acceleration, bool fullscreen_anti_aliasing) {
static int newDepthBits = depthBits;
static int newStencilBits = stencilBits;
if(depthBits >= 0)
@@ -353,7 +353,13 @@ void Window::setupGraphicsScreen(int depthBits, int stencilBits) {
if(stencilBits >= 0)
newStencilBits = stencilBits;
//SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
if(fullscreen_anti_aliasing == true) {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 16);
}
if(hardware_acceleration == true) {
SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
}
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 1);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 1);