extend ofTexture
- Add ofxTBTexture to your project and include ofxTBTexture.h
- ofxTBTexture() : tex(_tex) {};
- ofxTBTexture(ofTexture &tex) : tex(tex) {}
Example:
ofFbo fbo;
/* some code for fbo */
ofxTBTexture tex(fbo.getTextureReference());
- ofxTBTexture &operator=(const ofTexture &tex)
Example:
ofImage image;
image.loadImage("foo.png");
ofxTBTexture tex;
tex = img.getTextureReference();
- void draw(const ofPoint ps[4], const ofPoint tps[4], int n = 4);
- void draw(const ofPoint ps[4], const ofRectangle &r, int n = 4);
- void draw(const ofPoint &p1, const ofPoint &p2, const ofPoint &p3, const ofPoint &p4, const ofRectangle &r, int n = 4);
TODO
- void drawCircle(const ofPoint ¢er, float radius);
TODO
- void drawTriangleFan(const ofPoint * const ps, const ofPoint * const tps, int vertexNum);
TODO
- inline const ofTexture &getRawOfTexture() const;
Get original ofTexture
Example:
ofFbo fbo;
/* some code for fbo */
ofxTBTexture tex(fbo.getTextureReference());
ofTexture tex2 = tex.getRawOfTexture();
MIT License.
- ISHII 2bit [bufferRenaiss co., ltd.]
- ishii[at]buffer-renaiss.com
Please create new issue, if there is a problem. And please throw pull request, if you have a cool idea!!