Está en la página 1de 1

cuatro.

c 11/6/2020 11:03

1 #include <GL/glut.h>
2 #define ancho 500
3 #define alto 375
4 #define profundidad 400
5
6 void dibuja();
7 void ejes();
8 void tecladoNormal(unsigned char tecla, int x, int y);
9 void tecladoEspecial(int tecla, int x, int y);
10 void texto(int x, int y, char *palabra);
11
12 int posx=0, posy=0;
13 int angulo=35;
14 float esc=1;
15 unsigned int figura=1;
16 float colorr=1, colorg=0, colorb=0;
17
18 int main(int argc, char** argv) {
19 glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE);
20 glutInitWindowPosition(100, 0);
21 glutInitWindowSize(ancho, alto);
22 glutCreateWindow("Figuras GLUT");
23 glOrtho(-(ancho/2), (ancho/2), -(alto/2), (alto/2), -profundid
24 glClearColor(1, 1, 1, 0);
25 glutDisplayFunc(dibuja);
26 glutKeyboardFunc(tecladoNormal);
27 glutSpecialFunc(tecladoEspecial);
28 glutMainLoop();
29 return 0;
30 }
31
32

Page 1 of 1

También podría gustarte