Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. sudo apt-get install build-essential
  2. sudo apt-get install libgl1-mesa-dev
  3. sudo apt-get install libglu1-mesa-dev
  4. sudo apt-get install freeglut3-dev
  5.  
  6. #include <GL/glut.h>
  7.  
  8. void init(void)
  9. {
  10. glClearColor(0.0, 0.0, 0.0, 0.0);
  11. glMatrixMode(GL_PROJECTION);
  12. glOrtho(-5, 5, -5, 5, 5, 15);
  13. glMatrixMode(GL_MODELVIEW);
  14. gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
  15.  
  16. return;
  17. }
  18.  
  19. void display(void)
  20. {
  21. glClear(GL_COLOR_BUFFER_BIT);
  22. glColor3f(1.0, 0, 0);
  23. glutWireTeapot(3);
  24. glFlush();
  25.  
  26. return;
  27. }
  28.  
  29. int main(int argc, char *argv[])
  30. {
  31. glutInit(&argc, argv);
  32. glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
  33. glutInitWindowPosition(0, 0);
  34. glutInitWindowSize(300, 300);
  35. glutCreateWindow("OpenGL 3D View");
  36. init();
  37. glutDisplayFunc(display);
  38. glutMainLoop();
  39.  
  40. return 0;
  41. }
  42.  
  43. X Error of failed request: BadValue (integer parameter out of range for operation)
  44. Major opcode of failed request: 154 (GLX)
  45. Minor opcode of failed request: 24 (X_GLXCreateNewContext)
  46. Value in failed request: 0x0
  47. Serial number of failed request: 33
  48. Current serial number in output stream: 34
  49.  
  50. sudo glxinfo
  51.  
  52. name of display: :0
  53. X Error of failed request: BadValue (integer parameter out of range for operation)
  54. Major opcode of failed request: 154 (GLX)
  55. Minor opcode of failed request: 24 (X_GLXCreateNewContext)
  56. Value in failed request: 0x0
  57. Serial number of failed request: 39
  58. Current serial number in output stream: 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement