Voila le rendu de test :
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glBindTexture(GL_TEXTURE_2D, textures[0].texID);
glTranslatef(0.0f,0.0f,-9);
//objets opaques
glPushMatrix();
glEnable(GL_DEPTH_TEST);
glDisable(GL_BLEND);
glRotatef(yrot,0.0f,1.0f,0.0f);
glTranslatef(0.0f,0.0f,-5);
box();
glEnable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
glPopMatrix();
//au cas ou on enleve le blending
if(!blend){
glDisable(GL_BLEND);//s il est remi a un moment
glEnable(GL_DEPTH_TEST);
}
//objets transparents
glPushMatrix();
glRotatef(xrot,1.0f,0.0f,0.0f);
glRotatef(yrot,0.0f,1.0f,0.0f);
box();
glPopMatrix();
glPushMatrix();
glRotatef(yrot,0.0f,1.0f,0.0f);
glTranslatef(0.0f,0.0f,+5);
box();
glPopMatrix();
Et comment on fait pour les screen shots, la syntaxe demande un lien web???
j'essaie avec mon chemin:
on verra bien
[img]D:\marc\tutorials\lesson08\Lesson08\Data\shot.jpg[/img]
[img]D:\marc\tutorials\lesson08\Lesson08\Data\shot2.jpg[/img]