Andrew_Manu

Ventana GLUT

Jun 2nd, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <GL/glut.h>
  2. #include <stdlib.h>
  3.  
  4. static void dibujar(void)
  5. {
  6.        glClearColor(1,0,0,1);
  7.        glPointSize(5);
  8.        glColor3i(1,0,0);
  9.        glOrtho(800, 0, 600, 0, -1 , 1);
  10.        glClear(GL_COLOR_BUFFER_BIT);
  11.        glBegin(GL_POINTS);
  12.        glVertex2d(60,50);
  13.        glEnd();
  14.        glFlush();
  15. }
  16.  
  17. int main(int argc, char *argv[])
  18. {
  19.     glutInit(&argc, argv);
  20.     glutInitWindowSize(640,480);
  21.     glutInitWindowPosition(10, 10);
  22.     glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
  23.  
  24.     glutCreateWindow("Palabras");
  25.     glutDisplayFunc(dibujar);
  26.     glutMainLoop();
  27.  
  28.     return EXIT_SUCCESS;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment