Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <math.h>
- #include <GL/glut.h>
- //--------------------------------- Definir cores
- #define BLUE 0.0, 0.0, 1.0, 1.0
- #define RED 1.0, 0.0, 0.0, 1.0
- #define YELLOW 1.0, 1.0, 0.0, 1.0
- #define GREEN 0.0, 1.0, 0.0, 1.0
- #define WHITE 1.0, 1.0, 1.0, 1.0
- #define BLACK 0.0, 0.0, 0.0, 1.0
- #define PI 3.14159
- //================================================================================
- //===========================================================Variaveis e constantes
- //------------------------------------------------------------ Sistema Coordenadas + objectos
- GLint wScreen=800, hScreen=600; //.. janela (pixeis)
- GLfloat xC=5.0, yC=5.0, zC=5.0; //.. Mundo (unidades mundo)
- //------------------------------------------------------------ Observador
- GLfloat rVisao=200, aVisao=(0.5*PI) + 3.2, incVisao=0.05;
- GLfloat obsP[] ={rVisao*cos(aVisao), 3.0, rVisao*sin(aVisao)};
- GLfloat angZoom=90;
- GLfloat incZoom=3;
- GLdouble tx=0;
- GLdouble ty=0;
- GLdouble tz=0;
- GLdouble Upx=0;
- GLdouble Upy=1;
- GLdouble Upz=0;
- //=========================================================== FACES
- GLboolean frenteVisivel=1;
- static GLuint vert_ordem[48][4];
- static GLuint faces[]= {0,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,28,29,30,
- 31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,
- 67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,
- 103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,
- 131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,
- 161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191};
- //ESCADAS
- static GLfloat vertices[] =
- {
- -50.000000, 0.000000, 0.000000, 50.000000, 0.000000, 0.000000, 50.000000, 12.000000, 0.000000, -50.000000, 12.000000, 0.000000, -50.000000, 12.000000, 20.000000, 50.000000, 12.000000, 20.000000, 50.000000, 12.000000, 0.000000, -50.000000, 12.000000, 0.000000, -50.000000, 12.000000, 20.000000, 50.000000, 12.000000, 20.000000, 50.000000, 24.000000, 20.000000, -50.000000, 24.000000, 20.000000, -50.000000, 24.000000, 40.000000, 50.000000, 24.000000, 40.000000, 50.000000, 24.000000, 20.000000, -50.000000, 24.000000, 20.000000, -50.000000, 24.000000, 40.000000, 50.000000, 24.000000, 40.000000, 50.000000, 36.000000, 40.000000, -50.000000, 36.000000, 40.000000, -50.000000, 36.000000, 60.000000, 50.000000, 36.000000, 60.000000, 50.000000, 36.000000, 40.000000, -50.000000, 36.000000, 40.000000, -50.000000, 36.000000, 60.000000, 50.000000, 36.000000, 60.000000, 50.000000, 48.000000, 60.000000, -50.000000, 48.000000, 60.000000, -50.000000, 48.000000, 80.000000, 50.000000, 48.000000, 80.000000, 50.000000, 48.000000, 60.000000, -50.000000, 48.000000, 60.000000, -50.000000, 48.000000, 80.000000, 50.000000, 48.000000, 80.000000, 50.000000, 60.000000, 80.000000, -50.000000, 60.000000, 80.000000, -50.000000, 60.000000, 100.000000, 50.000000, 60.000000, 100.000000, 50.000000, 60.000000, 80.000000, -50.000000, 60.000000, 80.000000, -50.000000, 60.000000, 100.000000, 50.000000, 60.000000, 100.000000, 50.000000, 72.000000, 100.000000, -50.000000, 72.000000, 100.000000, -50.000000, 72.000000, 120.000000, 50.000000, 72.000000, 120.000000, 50.000000, 72.000000, 100.000000, -50.000000, 72.000000, 100.000000, -50.000000, 72.000000, 140.000000, 50.000000, 72.000000, 140.000000, 50.000000, 72.000000, 120.000000, -50.000000, 72.000000, 120.000000, -50.000000, 72.000000, 160.000000, 50.000000, 72.000000, 160.000000, 50.000000, 72.000000, 140.000000, -50.000000, 72.000000, 140.000000, -50.000000, 72.000000, 180.000000, 50.000000, 72.000000, 180.000000, 50.000000, 72.000000, 160.000000, -50.000000, 72.000000, 160.000000, -50.000000, 72.000000, 200.000000, 50.000000, 72.000000, 200.000000, 50.000000, 72.000000, 180.000000, -50.000000, 72.000000, 180.000000
- };
- static GLfloat normais[] =
- {
- 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000,
- };
- static GLfloat cores [] = {0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 1.000000, 0.000000,
- };
- //================================================================================
- //=========================================================================== INIT
- void inicializa(void)
- {
- glClearColor(BLACK); //………………………………………………………………………………Apagar
- glEnable(GL_DEPTH_TEST); //………………………………………………………………………………Profundidade
- glShadeModel(GL_SMOOTH); //………………………………………………………………………………Interpolacao de cores
- //glEnable(GL_CULL_FACE); //………………………………………………………………………………Faces visiveis
- //glCullFace(GL_BACK); //………………………………………………………………………………Mostrar so as da frente
- glVertexPointer(3, GL_FLOAT, 0, vertices); //………………………………………Vertex arrays
- glEnableClientState(GL_VERTEX_ARRAY);
- glNormalPointer(GL_FLOAT, 0, normais);
- glEnableClientState(GL_NORMAL_ARRAY);
- glColorPointer(3, GL_FLOAT, 0, cores);
- glEnableClientState(GL_COLOR_ARRAY);
- }
- void drawEixos()
- {
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Eixo X
- glColor4f(RED);
- glBegin(GL_LINES);
- glVertex3i( 0, 0, 0);
- glVertex3i(10, 0, 0);
- glEnd();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Eixo Y
- glColor4f(GREEN);
- glBegin(GL_LINES);
- glVertex3i(0, 0, 0);
- glVertex3i(0, 10, 0);
- glEnd();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Eixo Z
- glColor4f(BLUE);
- glBegin(GL_LINES);
- glVertex3i( 0, 0, 0);
- glVertex3i( 0, 0,10);
- glEnd();
- }
- void drawSala(){
- //PLano z=0
- glBegin(GL_QUADS);
- glColor3f(1,0,1);
- glVertex3f(0,0,0);
- glVertex3f(0,1500,0);
- glVertex3f(1500,1500,0);
- glVertex3f(1500,0,0);
- glEnd();
- //Plano x=0
- glBegin(GL_QUADS);
- glColor3f(1,1,0);
- glVertex3f(0,0,0);
- glVertex3f(0,1500,0);
- glVertex3f(0,1500,1500);
- glVertex3f(0,0,1500);
- glEnd();
- //Plano y=0
- glBegin(GL_QUADS);
- glColor3f(0,1,1);
- glVertex3f(0,0,0);
- glVertex3f(0,0,1500);
- glVertex3f(1500,0,1500);
- glVertex3f(1500,0,0);
- glEnd();
- //Plano z=1500
- glBegin(GL_QUADS);
- glColor3f(1,0,0);
- glVertex3f(0,0,1500);
- glVertex3f(0,1500,1500);
- glVertex3f(1500,1500,1500);
- glVertex3f(1500,0,1500);
- glEnd();
- //Plano x=1500
- glBegin(GL_QUADS);
- glColor3f(1,1,0);
- glVertex3f(1500,0,0);
- glVertex3f(1500,1500,0);
- glVertex3f(1500,1500,1500);
- glVertex3f(1500,0,1500);
- glEnd();
- //Plano y=1500
- glBegin(GL_QUADS);
- glColor3f(0,1,1);
- glVertex3f(0,1500,0);
- glVertex3f(0,1500,1500);
- glVertex3f(1500,1500,1500);
- glVertex3f(1500,1500,0);
- glEnd();
- //Plano y=72
- glBegin(GL_QUADS);
- glColor3f(0,1,0);
- glVertex3f(0,72,230);
- glVertex3f(0,72,1500);
- glVertex3f(1500,72,1500);
- glVertex3f(1500,72,230);
- glEnd();
- }
- void drawScene(){
- //=================================================== Qual o lado ?
- /*if (frenteVisivel)
- glCullFace(GL_BACK); //glFrontFace(GL_CW);
- else
- glCullFace(GL_FRONT); //glFrontFace(GL_CCW);
- */
- drawSala();
- int acum = 0;
- for (int i = 0; i < 48; i++){
- vert_ordem[i][0] = faces[acum++];
- vert_ordem[i][1] = faces[acum++];
- vert_ordem[i][2] = faces[acum++];
- vert_ordem[i][3] = faces[acum++];
- }
- glPushMatrix();
- //glDrawElements(GL_POLYGON, 4, GL_UNSIGNED_INT, esquerda);
- //glDrawElements(GL_POLYGON, 4, GL_UNSIGNED_INT, direita);
- //glDrawElements(GL_POLYGON, 4, GL_UNSIGNED_INT, cima);
- glTranslatef (100,0,50);
- for (int i=0; i < 192/4; i++){
- glDrawElements(GL_POLYGON, 4, GL_UNSIGNED_INT, vert_ordem[i]);
- }
- glPopMatrix();
- //==================================== PAralelipipedo Amarelo
- glColor4f(YELLOW);
- glPushMatrix();
- //?? escala, rotacao, translacao ??
- glutWireTeapot(1);
- glPopMatrix();
- }
- /*void display(void){
- //================================================================= APaga ecran/profundidade
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- //ver de cima
- //================================================================= NAO MOFIFICAR
- glViewport (0, 0, 200, 200); // ESQUECER PoR AGORA
- glMatrixMode(GL_PROJECTION); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- glOrtho(-10, 10, -10, 10, -10, 10);
- //gluPerspective(angZoom, (float)wScreen/hScreen, 0.1, 3*zC); // ESQUECER PoR AGORA
- glMatrixMode(GL_MODELVIEW); // ESQUECER PoR AGORA
- glLoadIdentity();
- gluLookAt(0.1, 10, 0.1, tx,ty,tz, Upx, Upy, Upz); // ESQUECER PoR AGORA
- drawEixos();
- drawScene();
- //ver 3d
- //================================================================= NAO MOFIFICAR
- glViewport (0, 0, wScreen, hScreen); // ESQUECER PoR AGORA
- glMatrixMode(GL_PROJECTION); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- //glOrtho(-30, 30, -30, 30, -30, 30);
- gluPerspective(angZoom, (float)wScreen/hScreen, 0.1, 3*zC); // ESQUECER PoR AGORA
- glMatrixMode(GL_MODELVIEW); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- //-------------------------------------------------------------- observador
- gluLookAt(obsP[0], obsP[1], obsP[2], tx,ty,tz, Upx, Upy, Upz);
- //…………………………………………………………………………………………………………………………………………………………Objectos/modelos
- drawEixos();
- drawScene();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Actualizacao
- glutSwapBuffers();
- }*/
- //======================================================= EVENTOS
- /*void keyboard(unsigned char key, int x, int y){
- switch (key) {
- case 'f':
- case 'F':
- frenteVisivel=!frenteVisivel;
- glutPostRedisplay();
- break;
- case 'A':
- case 'a':
- ty += 1;
- glutPostRedisplay();
- break;
- case 'S':
- case 's':
- ty -= 1;
- glutPostRedisplay();
- break;
- case 'e':
- case 'E':
- tx += 1;
- glutPostRedisplay();
- break;
- case 'd':
- case 'D':
- tx -= 1;
- glutPostRedisplay();
- break;
- //--------------------------- Escape
- case 27:
- exit(0);
- break;
- }
- }*/
- void teclasNotAscii(int key, int x, int y){
- if(key == GLUT_KEY_UP)
- obsP[1] = (obsP[1]+ 0.1) ;
- if(key == GLUT_KEY_DOWN)
- obsP[1] = (obsP[1]- 0.1) ;
- if (obsP[1]>yC)
- obsP[1]=yC;
- if (obsP[1]<-yC)
- obsP[1]=-yC;
- if(key == GLUT_KEY_LEFT)
- aVisao = (aVisao + 0.1) ;
- if(key == GLUT_KEY_RIGHT)
- aVisao = (aVisao - 0.1) ;
- obsP[0]=rVisao*cos(aVisao);
- obsP[2]=rVisao*sin(aVisao);
- glutPostRedisplay();
- }
- //codigo novo/////////////////////////////////////////////////////////////////////
- // angle of rotation for the camera direction
- float angle=0.0;
- // actual vector representing the camera's direction
- float lx=0.0f,ly=1.0f,lz=-1.0f;
- // XZ position of the camera
- float x=0.0f, y= 1.0f, z=5.0f;
- float aux=0.0f, auy=0.0f, auz=0.0f;
- void display(void){
- //================================================================= APaga ecran/profundidade
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- /*//ver de cima
- //================================================================= NAO MOFIFICAR
- glViewport (0, 0, 200, 200); // ESQUECER PoR AGORA
- glMatrixMode(GL_PROJECTION); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- glOrtho(-10, 10, -10, 10, -10, 10);
- //gluPerspective(angZoom, (float)wScreen/hScreen, 0.1, 3*zC); // ESQUECER PoR AGORA
- glMatrixMode(GL_MODELVIEW); // ESQUECER PoR AGORA
- glLoadIdentity();
- gluLookAt(x, 1.0f, z, x+lx,1.0f,z+lz, 0.0f, 0.1f, 0.0f); // ESQUECER PoR AGORA
- drawEixos();
- drawScene(); */
- //ver 3d
- //================================================================= NAO MOFIFICAR
- glViewport (0, 0, wScreen, hScreen); // ESQUECER PoR AGORA
- glMatrixMode(GL_PROJECTION); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- //glOrtho(-30, 30, -30, 30, -30, 30);
- gluPerspective(angZoom, (float)wScreen/hScreen, 0.1, 600*zC); // ESQUECER PoR AGORA
- glMatrixMode(GL_MODELVIEW); // ESQUECER PoR AGORA
- glLoadIdentity(); // ESQUECER PoR AGORA
- //-------------------------------------------------------------- observador
- //gluLookAt(obsP[0], obsP[1], obsP[2], tx,ty,tz, Upx, Upy, Upz);
- gluLookAt(obsP[0], obsP[1], obsP[2]+200, lx,ly,lz + 100, 0.0f, 0.1f, 0.0f);
- //…………………………………………………………………………………………………………………………………………………………Objectos/modelos
- drawEixos();
- drawScene();
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Actualizacao
- glutSwapBuffers();
- }
- float norma(float x, float y, float z){
- return sqrt(pow(x,2)+pow(y,2)+pow(z,2));
- }
- void keyboard(unsigned char key, int x1, int x2){
- float fraction = 2.0f;
- switch (key) {
- case 'w':
- case 'W':
- aux = lx - obsP[0];
- auy = ly - obsP[1];
- auz = lz - obsP[2];
- obsP[0] += (aux / norma(aux, auy, auz)) * fraction;
- //obsP[1] += (auy / norma(aux, auy, auz)) * fraction;
- obsP[2] += (auz / norma(aux, auy, auz)) * fraction;
- lx += (aux / norma(aux, auy, auz)) * fraction;
- ly += (auy / norma(aux, auy, auz)) * fraction;
- lz += (auz/norma(aux, auy, auz)) * fraction;
- glutPostRedisplay();
- break;
- case 'A':
- case 'a':
- angle -= 0.5f;
- lx = lx + (obsP[0] * sin(angle));
- lz = lz + (obsP[2] *cos(angle));
- glutPostRedisplay();
- break;
- case 'S':
- case 's':
- aux = lx - obsP[0];
- auy = ly - obsP[1];
- auz = lz - obsP[2];
- obsP[0] -= (aux /norma(aux, auy, auz)) * fraction;
- //obsP[1] -= (auy / norma(aux, auy, auz)) * fraction;
- obsP[2] -= (auz/norma(aux, auy, auz)) * fraction;
- lx -= (aux / norma(aux, auy, auz)) * fraction;
- ly -= (auy / norma(aux, auy, auz)) * fraction;
- lz -= (auz/norma(aux, auy, auz)) * fraction;
- glutPostRedisplay();
- break;
- case 'd':
- case 'D':
- angle += 0.5f;
- lx = lx + (obsP[0] * cos(angle));
- lz = lz + (obsP[2] *sin(angle));
- glutPostRedisplay();
- break;
- //--------------------------- Escape
- case 27:
- exit(0);
- break;
- }
- }
- //======================================================= MAIN
- //======================================================= MAIN
- int main(int argc, char** argv){
- glutInit(&argc, argv);
- glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );
- glutInitWindowSize (wScreen, hScreen);
- glutInitWindowPosition (300, 100);
- glutCreateWindow ("{jh,pjmm}@dei.uc.pt| |FaceVisivel:'f'| |Observador:'SETAS'| |Andar-'a/s'| |Rodar -'e/d'| ");
- inicializa();
- glutSpecialFunc(teclasNotAscii);
- glutDisplayFunc(display);
- glutKeyboardFunc(keyboard);
- glutMainLoop();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement