I haven’t been able to piece together this simple exercise: put the video grabber output on a plane.
I have a minimal example. The result is that the plane is the color of the pixel in the top-left corner of the video.
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
plane.set(ofGetWidth() / 2, ofGetHeight() / 2);
// nothing I put here seems to help
plane.setResolution(200, 200);
vg.initGrabber(ofGetWidth(), ofGetHeight());
}
//--------------------------------------------------------------
void ofApp::update(){
vg.update();
}
//--------------------------------------------------------------
void ofApp::draw(){
vg.bind();
plane.draw();
vg.unbind();
}
I’m sure I’m missing something basic; but, I’ve tried many variations here. Thanks for any help.