added +m command-line option to disable multisampling
git-svn-id: svn://anubis/dwscr/trunk@104 5bef9df8-b654-44bb-925b-0ff18baa8f8c
This commit is contained in:
parent
c3664e6e03
commit
5e9c100236
12
dwscr.cc
12
dwscr.cc
@ -32,6 +32,7 @@ int main(int argc, char * argv[])
|
||||
int width = DEFAULT_WIDTH;
|
||||
int height = DEFAULT_HEIGHT;
|
||||
bool windowed = false;
|
||||
bool multisample = true;
|
||||
|
||||
#ifdef DEBUG
|
||||
start = true;
|
||||
@ -58,6 +59,10 @@ int main(int argc, char * argv[])
|
||||
? argv[i] + 2
|
||||
: argv[++i] );
|
||||
}
|
||||
else if (!strcmp("+m", argv[i]))
|
||||
{
|
||||
multisample = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* make the SDL window appear in the top-left corner of the screen */
|
||||
@ -82,8 +87,11 @@ int main(int argc, char * argv[])
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
|
||||
/* Enable multisampling */
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
|
||||
if (multisample)
|
||||
{
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
|
||||
}
|
||||
|
||||
int sdlMode = SDL_HWSURFACE | SDL_OPENGL;
|
||||
if (!windowed)
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
using namespace std;
|
||||
|
||||
#define SIZE 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user