#include "viewport.h" viewport::viewport() { //ctor } viewport::viewport(int _w,int _h,int _ox,int _oy) { setup(_w,_h,_ox,_oy); } void viewport::setup(int _w,int _h,int _ox,int _oy) { w=_w; h=_h; ox=_ox; oy=_oy; rb1.allocate(w,h,GL_RGB); rb2.allocate(w,h,GL_RGB); seed=ofRandom(1.0f); } void viewport::drawport(vpcontrol &control){ rb1.begin(); //can be done with texture offset? int startx=((w-(w*control.fscale))/2)+control.xshift; while (startx>0) startx-=(w*control.fscale); int starty=((h-(h*control.fscale))/2)+control.yshift; while (starty>0) starty-=(h*control.fscale); for (int i=startx;i