void display (void) {
   // this code executes whenever the window is redrawn (when opened,
   //   moved, resized, etc.
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

   // set the viewing transform
   setUpView();
	
   // set up light source
   setUpLight();
   // start drawing objects
	drawt1Text();
   drawTank1();
	drawTank2();
   //drawCone();
	drawGround();
	drawSheet1();

	if (bulletflag1 == 1)
	{
		drawBullet1();
	}
	if (bulletflag2 == 1)
	{
		drawBullet2();
	}

   glutSwapBuffers();
}
void display (void) {
   // this code executes whenever the window is redrawn (when opened,
   //   moved, resized, etc.
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   
   // set the viewing transform
   setUpView();

	setUpLight();

   // start drawing objects
	glEnable(GL_DEPTH_TEST);
	drawFish();
	glDisable(GL_DEPTH_TEST);
   drawBubbles();

   glutSwapBuffers();
}
void display (void) {
   // this code executes whenever the window is redrawn (when opened,
   //   moved, resized, etc.
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

   // set the viewing transform
   setUpView();

   // set up light source
   setUpLight();

   // start drawing objects
   setUpModelTransform();

   drawMounts();

   glutSwapBuffers();
}
예제 #4
0
void display (void) {
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

   setUpView();
   setUpLight();
   setUpModelTransform();

   if (trackballMove) {
      glPushMatrix();
      glLoadIdentity();
      glRotatef(angle, axis[0], axis[1], axis[2]);
      glMultMatrixf((GLfloat *) trackballXform);
      glGetFloatv(GL_MODELVIEW_MATRIX, trackballXform);
      glPopMatrix();
   }

   glPushMatrix();
   glMultMatrixf((GLfloat *) objectXform);
   drawObjs();
   glPopMatrix();

   glutSwapBuffers();
}