@cuinjune wrote:
I just figured out if I call
ofDisableArbTex()
after loading an image, the image’s texture is not correctly bound to shapes.First, Here’s my code that works
//-------------------------------------------------------------- void ofApp::setup(){ ofDisableArbTex(); ofEnableDepthTest(); image.load("background.jpg"); } //-------------------------------------------------------------- void ofApp::update(){ } //-------------------------------------------------------------- void ofApp::draw(){ image.draw(0, 0, 300, 200); image.bind(); ofTranslate(400, 300); ofRotateXDeg(60); ofDrawBox(200); image.unbind(); }
This is the screenshot when I run the code.
However, if I load an image before calling
ofDisableArbTex()
,//-------------------------------------------------------------- void ofApp::setup(){ image.load("background.jpg"); ofDisableArbTex(); ofEnableDepthTest(); }
The image is not correctly bound to the box shape.
Is this an intended behavior? Or would this be a bug that should be fixed?
Posts: 2
Participants: 2