Sketch 2015-04-25
void ofApp::setupAnim() {
current = 0;
max = 80;
for(int i = 0; i < max; i++) {
glitches.push_back(templateGlitch);
glitches.at(glitches.size()-1).allocate(width, height);
}
ofSetColor(ofColor::white);
}
void ofApp::drawAnim() {
if(ofGetFrameNum() % 5 == 0) {
ofClear(255,255,255);
} else {
ofEnableBlendMode(OF_BLENDMODE_MULTIPLY);
glitches.at(ofGetFrameNum()%max).draw(0, 0);
ofDisableBlendMode();
}
}
Accessing chunks of memory that you're not supposed to access