Kenect.draw() whole window

I’m trying to get the Kinect RGB to draw over the whole window frame but can only get it working for a specific size right now, when i resize the window it stays the same dimensions starting at 0,0 point. Is there a way to implement kinect.draw() to take in the window size? or to resize the image to fit the window size?

draw() functions usually have a few versions.

draw(x, y); // draws the image at a location and uses its "true" size
draw(x, y, width, height); // draws the image at a location and stretches "width" by "height"

So, try:

kinect.draw(0, 0, ofGetWidth(), ofGetHeight());
1 Like

Perfect. Thanks you very much!

is there a way to do this with drawWireframe() as well?

That’s a bit different, since you’re drawing vertices in space instead of a raw image. You can:

  • Draw into an ofFbo at the native size of your wireframe stuff, and then draw that fullscreen
  • use ofScale() to scale the drawing to the size of the window ( wrapped in ofPushMatrix() and ofPopMatrix() )
1 Like