diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-01-05 00:02:13 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-01-05 00:02:13 +0000 |
| commit | 7641fad8ebc4ba0e6412fcb7a556a705c0a6ea2c (patch) | |
| tree | 5eb40687deac0089d9c054cf62a0fcb3bc2ba50f /src/viewpoint.cpp | |
| parent | 16cc03c435982383627dd01341656d0371ca1f2b (diff) | |
viewport objectified
Diffstat (limited to 'src/viewpoint.cpp')
| -rw-r--r-- | src/viewpoint.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp index daca64f..225ad0f 100644 --- a/src/viewpoint.cpp +++ b/src/viewpoint.cpp @@ -2,7 +2,7 @@ #define DEBUG 0 void viewpoint::setup(float w, float h, float x, float y) { - window=ofRectangle(w,h,x,y); + window=ofRectangle(x,y,w,h); distortFactor=0.0; renderFBO.allocate(window.width,window.height,GL_RGB); @@ -21,7 +21,7 @@ void viewpoint::setup(float w, float h, float x, float y) { vars[4].set('u','n',0.0,10,1.0,3.0); vars[5].set('j','h',0.0,10,1.0,3.0); vars[6].set('o','l',1000.0,10,1.0,3.0); - vars[7].set('q','a',0,1,1.0,3.0); + vars[7].set('q','a',0,.000001,1.0,3.0); light.enable(); light.setDirectional(); @@ -55,9 +55,9 @@ void viewpoint::end(){ //ofSetColor(I_fade1,I_fade1,I_fade1); int gridX=50; int gridY=50; - int xStep=ofGetWidth()/2; - int yStep=ofGetHeight()/2; - ofTranslate(ofGetWidth()/2,ofGetHeight()/2); + int xStep=window.width/2; + int yStep=window.height/2; + ofTranslate(window.x+xStep,window.y+yStep); //todo: distort texcoords instead of vertex coords for (float i = -1; i < 1.001; i+=(2.0f/gridY)){ |
