//---------------------------------------------------------- void ofGLRenderer::draw(ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh){ if(image.isUsingTexture()){ ofTexture& tex = image.getTextureReference(); if(tex.bAllocated()) { tex.drawSubsection(x,y,z,w,h,sx,sy,sw,sh); } else { ofLogWarning() << "ofGLRenderer::draw(): texture is not allocated"; } } }
//---------------------------------------------------------- void ofGLRenderer::draw(const ofShortImage & image, float x, float y, float z, float w, float h, float sx, float sy, float sw, float sh) const{ if(image.isUsingTexture()){ const ofTexture& tex = image.getTextureReference(); if(tex.bAllocated()) { tex.bind(); draw(tex.getMeshForSubsection(x,y,z,w,h,sx,sy,sw,sh),false,true,false); tex.unbind(); } else { ofLogWarning("ofGLRenderer") << "draw(): texture is not allocated"; } } }