Partage
  • Partager sur Facebook
  • Partager sur Twitter

exercice opengl c++

28 novembre 2008 à 8:50:15


BONJOUR


Dans cet exemple de code je ne comprends pas l'utilité de
glEnable(GL_POLYGON_STIPPLE);

void JeuElement::AppliquerTexture(GLuint & nom,char *fichier,float x1,float y1,float x2,float y2,float x3,float y3,float x4,float y4)
{

glPushMatrix ();
glEnable(GL_TEXTURE_2D);
glEnable(GL_POLYGON_STIPPLE);
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
glBindTexture(GL_TEXTURE_2D,nom);

glBegin (GL_QUADS);
glTexCoord2f(0.0f, 0.0f);
glVertex2f (x1, y1);
glTexCoord2f(1.0f, 0.0f);
glVertex2f (x2, y2);
glTexCoord2f(1.0f, 1.0f);
glVertex2f (x3, y3);
glTexCoord2f(0.0f, 1.0f);
glVertex2f (x4, y4);
glEnd ();
glDisable(GL_TEXTURE_2D);
glDisable(GL_POLYGON_STIPPLE);
glPopMatrix
}
  • Partager sur Facebook
  • Partager sur Twitter
28 novembre 2008 à 9:34:32

GL_POLYGON_STIPPLE sert à remplir d'un motif un polygone je crois...
  • Partager sur Facebook
  • Partager sur Twitter