私はC++プログラミングの2学期を修了しており、私の出力を盛り上げたいと思っています。私はC++にかなり精通していますが、非常に新しいです。 http://openframeworks.cc/ofBook/chapters/shaders.html#addingtexturesエラー:クラス "ofTexture"にメンバー "getTextureReference"がありません
このセクションでは、エラーが発生しています(私はVisual Studioを使用しています):私は、クラス "ofTexture"にはメンバ "getReferenceTexture"がありません。
#include "ofApp.h"
void ofApp::setup() {
// setup
plane.mapTexCoordsFromTexture(img.getTextureReference());
}
void ofApp::draw() {
// bind our texture. in our shader this will now be tex0 by default
// so we can just go ahead and access it there.
img.getTextureReference().bind();
// start our shader, in our OpenGL3 shader this will automagically set
// up a lot of matrices that we want for figuring out the texture matrix
// and the modelView matrix
shader.begin();
// get mouse position relative to center of screen
float mousePosition = ofMap(mouseX, 0, ofGetWidth(), plane.getWidth(), -plane.getWidth(), true);
shader.setUniform1f("mouseX", mousePosition);
ofPushMatrix();
ofTranslate(ofGetWidth()/2, ofGetHeight()/2);
plane.draw();
ofPopMatrix();
shader.end();
img.getTextureReference().unbind();
}
私はtheTexture.hと.cppファイルを開いていましたが、getTextureReferenceというメンバーはありません。私はoFのサイトとフォーラムを閲覧し、Stack Exchangeを見て、Google検索をしましたが、回避策や別の機能があるかどうかを知るためにこの呼び出しが何をすべきかを明確に把握していません電話してください。 ofTexture :: getTextureReferenceが別のものに置き換えられましたか?ありがとう!