summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/src/main.cpp16
-rw-r--r--gui/src/ofApp.cpp2
2 files changed, 12 insertions, 6 deletions
diff --git a/gui/src/main.cpp b/gui/src/main.cpp
index 3e4c327..dc65931 100644
--- a/gui/src/main.cpp
+++ b/gui/src/main.cpp
@@ -1,7 +1,7 @@
#include "ofMain.h"
#include "ofApp.h"
-
+#define PREVIEW_WINDOW
//========================================================================
int main(int argc, char *argv[]){
@@ -24,27 +24,32 @@ int main(int argc, char *argv[]){
#ifdef GPU_ALGORITHM
settings.setGLVersion(3,2); //doesn't support gluLookat
+#else
+ settings.setGLVersion(2,1);
#endif //GPU_ALGORITHM
- settings.width = 1024;
- settings.height = 576;
+ settings.width = 1920;
+ settings.height = 1080;
settings.setPosition(ofVec2f(1700,0));
settings.resizable = true;
//settings.decorated = false; //doesn't suppress FS title bar
shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
+ mainWindow->setVerticalSync(false);
// share OpenGL resources with other windows
settings.shareContextWith = mainWindow;
settings.decorated = true;
+#ifdef PREVIEW_WINDOW
settings.width = 800;
settings.height = 450;
settings.setPosition(ofVec2f(1400,0));
settings.resizable = true;
shared_ptr<ofAppBaseWindow> previewWindow = ofCreateWindow(settings);
previewWindow->setVerticalSync(false);
+#endif
- settings.width = 1600;
+ settings.width = 2400;
settings.height = 400;
settings.setPosition(ofVec2f(0,700));
settings.resizable = true;
@@ -59,8 +64,9 @@ int main(int argc, char *argv[]){
ofAddListener(mainWindow->events().draw,mainApp.get(),&ofApp::drawOutput);
ofAddListener(mainWindow->events().windowResized,mainApp.get(),&ofApp::outputWindowResized);
ofAddListener(mainWindow->events().keyPressed,mainApp.get(),&ofApp::outputKeyPressed);
-
+#ifdef PREVIEW_WINDOW
ofAddListener(previewWindow->events().draw,mainApp.get(),&ofApp::drawOutput);
+#endif
ofRunApp(guiWindow, mainApp);
ofRunMainLoop();
diff --git a/gui/src/ofApp.cpp b/gui/src/ofApp.cpp
index d28fe70..a5c80ad 100644
--- a/gui/src/ofApp.cpp
+++ b/gui/src/ofApp.cpp
@@ -57,7 +57,7 @@ void ofApp::setup(){
//mClient.set("","Simple Server");
- ofSetFrameRate(60); // if vertical sync is off, we can go a bit fast... this caps the framerate at 60fps.
+ ofSetFrameRate(30); // if vertical sync is off, we can go a bit fast... this caps the framerate at 60fps.
}