Hi, Colleagues. Please help to solve the problem of creating a model of a book with pages. Page model is ready and even its physics, but I can not understand how to" draw () " on each page to bind the texture on both sides
Blockquote
void ofApp::draw() {
//ofRect(0,0,479,630);
//cam.begin();
ofEnableDepthTest();
for(int i =0; i<4; i++){
ofPushMatrix();
if(!staticImage){
ofTranslate(numVertexX / 2 + 560 , 100);
tex[i].bind();
mesh.draw();
tex[i].unbind();
img[i+1].draw(0,0);
}
else{
ofTranslate(numVertexX / 2 + 560 , 100);
tex1.draw(0, 0);
tex2.draw(0,0);
}
ofPopMatrix();
if(img[i+1].height == mouseX|| img[i+1].width == mouseY){
cout << "img i+1!!!"<< endl;
ofPushMatrix();
if(!staticImage){
ofTranslate(numVertexX / 2 + 560 , 100);
img[i+1].bind();
mesh.draw();
img[i+1].unbind();
img[i+2].draw(0,0);
}
else{
ofTranslate(numVertexX / 2 + 560 , 100);
tex1.draw(0, 0);
tex2.draw(0,0);
}
ofPopMatrix();
}
}
Blockquote
There example of my code.