openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.97k stars 2.55k forks source link

ofTexture setAnchorPercent() not working! #5281

Open Spacechild1 opened 8 years ago

Spacechild1 commented 8 years ago

When trying to draw a texture in a Fbo, setAnchorPercent() doesn't have the desired effect. setAnchorPoint(), however, works as expected

// draw texture into fbo
        fbo.begin();
        ofClear(255, 0);
        ofPushMatrix();
        ofTranslate(fbo.getWidth()/2, fbo.getHeight()/2);

        tex.setAnchorPoint(0.5, 0.5);
        // tex.setAnchorPoint(tex.getWidth()/2, tex.getHeight()/2);
        ofSetColor(255);
        tex.draw(0, 0);
        ofPopMatrix();
        fbo.end();
arturoc commented 8 years ago

in which platform is this?

Spacechild1 commented 8 years ago

Ah,sorry! OF 0.9.3, windows 7 64bit, msys2+qtcreator