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:
1 parent
c3664e6e03
commit
5e9c100236
2 files changed
+9
No files matched your search
@@ -32,6 +32,7 @@ int main(int argc, char * argv[])
|
|||||||
int width = DEFAULT_WIDTH;
|
int width = DEFAULT_WIDTH;
|
||||||
int height = DEFAULT_HEIGHT;
|
int height = DEFAULT_HEIGHT;
|
||||||
bool windowed = false;
|
bool windowed = false;
|
||||||
|
bool multisample = true;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
start = true;
|
start = true;
|
||||||
@@ -58,6 +59,10 @@ int main(int argc, char * argv[])
|
|||||||
? argv[i] + 2
|
? argv[i] + 2
|
||||||
: argv[++i] );
|
: argv[++i] );
|
||||||
}
|
}
|
||||||
|
else if (!strcmp("+m", argv[i]))
|
||||||
|
{
|
||||||
|
multisample = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* make the SDL window appear in the top-left corner of the screen */
|
/* 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);
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
|
|
||||||
/* Enable multisampling */
|
/* Enable multisampling */
|
||||||
|
if (multisample)
|
||||||
|
{
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
|
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
|
||||||
|
}
|
||||||
|
|
||||||
int sdlMode = SDL_HWSURFACE | SDL_OPENGL;
|
int sdlMode = SDL_HWSURFACE | SDL_OPENGL;
|
||||||
if (!windowed)
|
if (!windowed)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define SIZE 5
|
#define SIZE 5
|
||||||
|
|||||||
Reference in new issue
Block a user