was looking at some tutorials for data containers and was a bit confused on the part of allocate. Can’t find any info on OF_IMAGE_COLOR and what it does.
assuming this is allocating 640px by 480px of memory for pixels1.
same for GL_RGB, no idea what it does or what it’s there for.
then there is the whole set bit, why are we setting it to 0?
void ofApp::setup(){
pixels1.allocate(640,480,OF_IMAGE_COLOR)
pixels1.set(0);
pixels2 = pixels1;
pixels2.setColor(10,10,ofColor(255,255,255);
tex1.allocate(640,480,GL_RGB);
tex2.allocate(640,480,GL_RGB);
tex1.loadData(pixels1);
tex2.loadData(pixels2);
}
void ofApp::draw(){
tex1.draw(0,0);
tex2.draw(660,0);
}
could anyone elaborate on this example? sorry for all the questions, want to make sure I understand it.