diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-01-12 13:11:28 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-01-12 13:11:28 +0000 |
| commit | 1641253a1f8f6c5e7e7efa676c27e24c82893dfb (patch) | |
| tree | 91e0404c771093e6aab5e9bf9d3bd1e21c9a4407 /src/testApp.cpp | |
| parent | 6eb389d8c8b9a6f75e291d359a7708d2944a156d (diff) | |
fixed gymbal lock, light on-off
Diffstat (limited to 'src/testApp.cpp')
| -rw-r--r-- | src/testApp.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testApp.cpp b/src/testApp.cpp index ab0987b..37717fa 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -29,6 +29,8 @@ void testApp::setup(){ mode=CALIBRATE; loadSettings(); + + light=true; } //-------------------------------------------------------------- @@ -41,6 +43,8 @@ void testApp::draw(){ for (int i=0;i<numViews;i++) { views[i].setLight(); } + if (light) glEnable(GL_LIGHTING); + else glDisable(GL_LIGHTING); for (int i=0;i<numViews;i++) { views[i].begin(); ofSetColor(255, 255, 255, 255); @@ -98,6 +102,10 @@ void testApp::keyPressed(int key){ saveSettings(); printf("saved settings.xml\n"); break; + case '/': + light=!light; + printf(light?"LIGHT ON\n":"LIGHT OFF\n"); + break; } |
