mirror of
https://github.com/glest/glest-source.git
synced 2025-09-27 07:59:00 +02:00
- 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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user