data container

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.

looked more into it, looks like its a modes or pre-defined type right? there any place I can find more info on this? I found a vague reference to it in: http://www.openframeworks.cc/tutorials/firstSteps/001-My-first-particle-system.html

OF_IMAGE_COLOR can be found in ofConstants.h. It defines the image type.
GL_RGB is a #define in glew.h