Bonjour,
J'utilise des coordonnées réelles pour dessiner des polygones. Le prolème que j'arrive pas à afficher ces polygones. Voilà le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //Clear The Screen And The Depth Buffer gl.glLoadIdentity(); // Reset The Current Modelview Matrix gl.glTranslatef(723936.743f, 146310.999f, 45.719f); // Move Right 1.5 Units And Into The Screen 7.0 gl.glRotatef(rquad,1.0f,1.0f,1.0f); // Rotate The Quad On The X axis ( NEW ) gl.glBegin(GL_QUADS); // Draw A Quad gl.glColor3f(0.0f,1.0f,0.0f); // Set The Color To Blue gl.glVertex3f( 723936.743f, 146310.999f, 45.719f); // Top Right Of The Quad (Top) gl.glVertex3f(723906.414f, 146331.310f, 45.962f); // Top Left Of The Quad (Top) gl.glVertex3f(723904.008f, 146342.015f, 43.725f); // Bottom Left Of The Quad (Top) gl.glVertex3f( 723948.246f, 146312.876f, 43.645f); // Bottom Right Of The Quad (Top) gl.glEnd(); // Done Drawing The Quad rtri+=0.2f; // Increase The Rotation Variable For The Triangle ( NEW ) rquad-=0.15f; // Decrease The Rotation Variable For The Quad ( NEW
Partager