1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
// void Mickey(x1 ,y1 ,width1 ,level)
void Mickey( float x , float y , float width , int level )
{
/*
float x, y, width;
width=width1;
x=x1;
y=y1;
*/
if(level >= 1)
{
glBegin(GL_QUADS); // Draw A Quad
glColor3f(0.25f,0.25f,0.25f);
glVertex3f(x, y, 0.0f); // Top Left
glVertex3f(x + width, y, 0.0f); // Top Right
glVertex3f(x + width, y-width, 0.0f); // Bottom Right
glVertex3f(x, y-width, 0.0f); // Bottom Left
glEnd(); // Done Drawing The Quad
Mickey(x - (0.5 * width), y + (0.5 * width), width, level--); //Left Ear
Mickey(x + width , y + (0.5 * width), width, level--); //Right Ear
}
}
|