1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
void AppTest::draw(){
glBegin(GL_QUADS);
glColor3ub(255, 0, 0);
glVertex3d(10.0, 10.0, 0.0);
glVertex3d(10.0, -10.0, 0.0);
glVertex3d(-10.0, -10.0, 0.0);
glVertex3d(-10.0, 10.0, 0.0);
glEnd();
glTranslated(0.0, 0.0, 2.0);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, p_textureTerre);
gluQuadricDrawStyle(p_params, GLU_FILL);
gluQuadricTexture(p_params, GL_TRUE);
glColor3ub(255, 255, 255);
gluSphere(p_params, 1.0, 20, 20);
glDisable(GL_TEXTURE_2D);
glTranslated(5.0, 5.0, 5.0);
glColor3ub(0, 0, 255);
gluSphere(p_params, 1.0, 20, 20);
}
|