Hi I was trying to achieve a kinetic typographic effect by drawing type in a fbo, and draw subsections of it using for loops with an offest, but somehow it was moving the fbo as a whole. my code is below:
int gridX = 10;
int gridY = 10;
int gridW = round(fbo.getWidth()/gridX);
int gridH = round(fbo. getHeight()/gridY);
fbo.begin();
ofClear(255,255,255,255);
ofBackground(255);
ofSetColor(0);
texts.drawStringAsShapes(“A”,fbo.getWidth()/2-texts.stringWidth(“A”)/2,fbo.getHeight()/2+texts.stringHeight(“A”)/2);
fbo.end();
for (int i = 0; i< gridX ; i++){
for (int p = 0; p< gridY ; p++){
int wave = round(sin(ofGetFrameNum())*100);
int x = gridW*i+wave;
int y = gridH*p;
int w= gridW;
int h= gridH;
fbo.getTexture().drawSubsection(x, y, w, h,x,y);
}
}
I’ve attached the visual I want to achieve below. Thanks in advance!!