diff options
-rw-r--r-- | MainWindow.cpp | 4 | ||||
-rw-r--r-- | MainWindow.h | 2 | ||||
-rw-r--r-- | TrollTron.cpp | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/MainWindow.cpp b/MainWindow.cpp index 6742ea6..d1a2e27 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -66,9 +66,9 @@ void MainWindow::onRenderScene() { glutSwapBuffers();
}
-void MainWindow::init(int *argcp, char **argv, uint displayMode){
+void MainWindow::init(int *argcp, char **argv){
glutInit(argcp, argv);
- glutInitDisplayMode(displayMode);
+ glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
}
void MainWindow::create(std::string name, int x, int y, int width, int height)
diff --git a/MainWindow.h b/MainWindow.h index a846f43..bfcee28 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -26,7 +26,7 @@ public: static MainWindow &getInstance();
public:
- void init(int *argcp, char **argv, uint displayMode);
+ void init(int *argcp, char **argv);
void create(std::string name, int x, int y, int width, int height);
void startLoop();
diff --git a/TrollTron.cpp b/TrollTron.cpp index 3b0592b..dae504e 100644 --- a/TrollTron.cpp +++ b/TrollTron.cpp @@ -2,13 +2,12 @@ #include <iostream>
#include "MainWindow.h"
-#include <GL/freeglut.h>
int main(int argc, char **argv) {
// init GLUT and create window
MainWindow& mainWindow = MainWindow::getInstance();
- mainWindow.init(&argc, argv, GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
+ mainWindow.init(&argc, argv);
// This will define the size and position, in pixel, of the window, originally. It can be moved and resized.
mainWindow.create("Troll Tron", 100, 100, 320, 320);
|