void Draw(void)
{
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  glLoadIdentity();

  gluLookAt(estado.camera.eye.x,estado.camera.eye.y,estado.camera.eye.z, \
            estado.camera.center.x,estado.camera.center.y,estado.camera.center.z,\
            estado.camera.up.x,estado.camera.up.y,estado.camera.up.z);

  // ... chamada das rotinas auxiliares de desenho ...


  glColor3f(0.5f,0.5f,0.5f);
  desenhaChao(RAIO_ROTACAO+5);

  glPushMatrix();
    //....    
    desenhaTanque(modelo.tanque);

  glPopMatrix();
  
  glFlush();
  if (estado.doubleBuffer)
    glutSwapBuffers();
}
Beispiel #2
0
void createDisplayLists(int janelaID)
{
	modelo.labirinto[janelaID]=glGenLists(2);
	glNewList(modelo.labirinto[janelaID], GL_COMPILE);
	glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT );
	glPopAttrib();
	glEndList();

	modelo.chao[janelaID]=modelo.labirinto[janelaID]+1;
	glNewList(modelo.chao[janelaID], GL_COMPILE);
	glPushAttrib(GL_COLOR_BUFFER_BIT | GL_CURRENT_BIT | GL_ENABLE_BIT );
	desenhaChao(CHAO_DIMENSAO,modelo.texID[janelaID][ID_TEXTURA_CHAO]);
	glPopAttrib();
	glEndList();
}
Beispiel #3
0
void OnDraw()
{
	// clear the screen & depth buffer
	glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);

	EspecificaParametrosVisualizacao();
	desenhaChao();

	desenhaBezier();
	desenhaBSpline();
	desenhaHermite();

	desenhaPontosDeControle();
	desenhaNomes();

	glutSwapBuffers();
}