ofxHapPlayer
ofxHapPlayer copied to clipboard
partial textures
Sometimes you only want a part of the frame in a texture. We should vend textures with parts of the frame.
for now I just added this subsection function in to the addon.
void ofxHapPlayer::drawSubsection(float x, float y, float w, float h,float sx, float sy, float sw, float sheight){
ofTexture *t = getTexture();
if (t->isAllocated())
{
ofShader *sh = getShader();
if (sh)
{
sh->begin();
}
t->drawSubsection( x, y, 0, w, h, sx, sy, sw, sheight);
if (sh)
{
sh->end();
}
}
}
Not sure what it does to the performance though.