multiple cameras vs multiple images from same camera


i am exploring the ofVideoGrabber class. I am thinking on two different situations, one where i would render two different cameras, and the second where I would have few copies of the stream from the same camera rendered on to the window.

For the first I guess I need to have different instances of the ofVideoGrabber. So each instance of ofVideoGrabber correspont to a different device.

For the second after checking the examples I think I should do copies of the texture of the stream and render them separately, something like this

void testApp::update(){
if ( vidGrabber.isFrameNew() )
videoTexture.loadData(vidGrabber.getPixels(), camWidth, camHeight, GL_RGB);

void testApp::draw(){
videoTexture.draw(camWidth + 20, 20, camWidth, camHeight);

is this correct or is there a more appropiated way to achieve the same?


for the second you just need to draw the videograbber several times.

great. thanks!