Esempio n. 1
0
void CALLBACK Paint(void)
{
	GLfloat torus_diffuse[]={0.7,0.7,0.0,1.0};
	GLfloat cube_diffuse[]={0.0,0.7,0.7,1.0};
	GLfloat sphere_diffuse[]={0.7,0.0,0.7,1.0};
	GLfloat octa_diffuse[]={0.7,0.4,0.4,1.0};

	glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

	glShadeModel(GL_SMOOTH);
	glPushMatrix();
	glRotatef(3.0,1.0,0.0,0.0);
	glPushMatrix();
	glTranslatef(-0.80,0.35,0.0);
	glRotatef(100.0,1.0,0.0,0.0);
	glMaterialfv(GL_FRONT,GL_DIFFUSE,torus_diffuse);
	auxSolidTorus(0.275,0.85);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(-0.75,-0.50,0.0);
	glRotatef(45.0,0.0,0.0,1.0);
	glRotatef(45.0,1.0,0.0,0.0);
	glMaterialfv(GL_FRONT,GL_DIFFUSE,cube_diffuse);
	auxSolidCube(1.5);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.75,0.60,0.0);
	glRotatef(30.0,1.0,0.0,0.0);
	glMaterialfv(GL_FRONT,GL_DIFFUSE,sphere_diffuse);
	auxSolidSphere(1.0);
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.70,-0.90,0.25);
	glMaterialfv(GL_FRONT,GL_DIFFUSE,octa_diffuse);
	auxSolidOctahedron(1.0);
	glPopMatrix();

	auxCreateFont();
	auxDrawStr("OpenGL Auxillary Library");

	glPopMatrix();

	glFlush();
}
Esempio n. 2
0
void displayObjects(void) 
{
    GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
    GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
    GLfloat sphere_diffuse[] = { 0.7, 0.0, 0.7, 1.0 };
    GLfloat octa_diffuse[] = { 0.7, 0.4, 0.4, 1.0 };
    
    glPushMatrix ();
    glTranslatef (0.0, 0.0, -5.0); 
    glRotatef (30.0, 1.0, 0.0, 0.0);

    glPushMatrix ();
    glTranslatef (-0.80, 0.35, 0.0); 
    glRotatef (100.0, 1.0, 0.0, 0.0);
    glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse);
    auxSolidTorus (0.275, 0.85);
    glPopMatrix ();

    glPushMatrix ();
    glTranslatef (-0.75, -0.50, 0.0); 
    glRotatef (45.0, 0.0, 0.0, 1.0);
    glRotatef (45.0, 1.0, 0.0, 0.0);
    glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse);
    auxSolidCube (1.5);
    glPopMatrix ();

    glPushMatrix ();
    glTranslatef (0.75, 0.60, 0.0); 
    glRotatef (30.0, 1.0, 0.0, 0.0);
    glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse);
    auxSolidSphere (1.0);
    glPopMatrix ();

    glPushMatrix ();
    glTranslatef (0.70, -0.90, 0.25); 
    glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse);
    auxSolidOctahedron (1.0);
    glPopMatrix ();

    glPopMatrix ();
}
Esempio n. 3
0
CEE3DINPROC_API void _stdcall CeE3DSolidOctahedron(GLdouble a) {
	auxSolidOctahedron(a); 
}