summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp2
-rw-r--r--src/mapUtils.cpp31
-rw-r--r--src/testApp.cpp12
-rw-r--r--src/viewpoint.cpp5
4 files changed, 40 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 57716da..9527ea6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,7 +17,7 @@
int main( ){
ofAppGlutWindow window;
- ofSetupOpenGL(&window, 800,400, OF_WINDOW); // <-------- setup the GL context
+ ofSetupOpenGL(&window, 1600,480, OF_FULLSCREEN); // <-------- setup the GL context
glutIgnoreKeyRepeat(1);
glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF); //these don't work!!!
printf("key repeat ignore: %i\n",glutDeviceGet(GLUT_DEVICE_IGNORE_KEY_REPEAT));
diff --git a/src/mapUtils.cpp b/src/mapUtils.cpp
index c6a1955..3787bf4 100644
--- a/src/mapUtils.cpp
+++ b/src/mapUtils.cpp
@@ -84,10 +84,33 @@ void drawBoard(float x,float y,float z) {
for (int j=0;j<4;j++) {
cx=((i%2)*16)+(j*32)-56;
cz=(i*16)-56;
- glVertex3f(cx+8, 0, cz-8);
- glVertex3f(cx+8, 0, cz+8);
- glVertex3f(cx-8, 0, cz+8);
- glVertex3f(cx-8, 0, cz-8);
+ if ((i==7)&&(j==3)) { //draw special square
+ glVertex3f(cx+8, 0, cz-8);
+ glVertex3f(cx+8, 0, cz+8);
+ glVertex3f(cx+4, 0, cz+4);
+ glVertex3f(cx+4, 0, cz-4);
+
+ glVertex3f(cx+4, 0, cz+4);
+ glVertex3f(cx+8, 0, cz+8);
+ glVertex3f(cx-8, 0, cz+8);
+ glVertex3f(cx-4, 0, cz+4);
+
+ glVertex3f(cx-4, 0, cz-4);
+ glVertex3f(cx-4, 0, cz+4);
+ glVertex3f(cx-8, 0, cz+8);
+ glVertex3f(cx-8, 0, cz-8);
+
+ glVertex3f(cx+8, 0, cz-8);
+ glVertex3f(cx+4, 0, cz-4);
+ glVertex3f(cx-4, 0, cz-4);
+ glVertex3f(cx-8, 0, cz-8);
+ }
+ else {
+ glVertex3f(cx+8, 0, cz-8);
+ glVertex3f(cx+8, 0, cz+8);
+ glVertex3f(cx-8, 0, cz+8);
+ glVertex3f(cx-8, 0, cz-8);
+ }
}
}
glEnd();
diff --git a/src/testApp.cpp b/src/testApp.cpp
index b93f4be..e7921d4 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -23,7 +23,7 @@ void testApp::setup(){
//ofDisableArbTex();
- texture.loadMovie("gradblend01.mov");
+ texture.loadMovie("stripey2.mov");
texture.play();
mode=CALIBRATE;
@@ -65,8 +65,10 @@ void testApp::draw(){
}
views[i].end();
}
- ofSetHexColor(0xFFFFFF);
- ofDrawBitmapString("fps: "+ofToString(ofGetFrameRate(), 2), 10, 15);
+ if (mode==CALIBRATE) {
+ ofSetHexColor(0xFFFFFF);
+ ofDrawBitmapString("fps: "+ofToString(ofGetFrameRate(), 2), 10, 15);
+ }
}
//--------------------------------------------------------------
@@ -92,6 +94,10 @@ void testApp::keyPressed(int key){
case '3':
activeView=1;
break;
+ case 'p':
+ saveSettings();
+ printf("saved settings.xml\n");
+ break;
}
diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp
index 2b7cd7a..a61b235 100644
--- a/src/viewpoint.cpp
+++ b/src/viewpoint.cpp
@@ -1,5 +1,5 @@
#include "viewpoint.h"
-#define DEBUG 1
+#define DEBUG 0
void viewpoint::setup(map<string,string>&settings){
//setup(float w, float h, float x, float y) {
@@ -23,7 +23,7 @@ void viewpoint::setup(map<string,string>&settings){
vars[4].set('u','n',ofToFloat(settings["lat"]),10,1.0,3.0);
vars[5].set('j','h',ofToFloat(settings["lng"]),10,1.0,3.0);
vars[6].set('o','l',ofToFloat(settings["dolly"]),10,1.0,3.0);
- vars[7].set('q','a',0,ofToFloat(settings["distort"]),1.0,3.0);
+ vars[7].set('q','a',ofToFloat(settings["distort"]),.00001,1.0,3.0);
light.enable();
light.setDirectional();
@@ -41,6 +41,7 @@ double viewpoint::getSetting(const string& setting){
if (setting=="lng") return vars[5].getVal();
if (setting=="dolly") return vars[7].getVal();
if (setting=="distort") return vars[7].getVal();
+ return 0.0;
}
//--------------------------------------------------------------
void viewpoint::setLight(){