Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo apt-get install build-essential
- sudo apt-get install libgl1-mesa-dev
- sudo apt-get install libglu1-mesa-dev
- sudo apt-get install freeglut3-dev
- #include <GL/glut.h>
- void init(void)
- {
- glClearColor(0.0, 0.0, 0.0, 0.0);
- glMatrixMode(GL_PROJECTION);
- glOrtho(-5, 5, -5, 5, 5, 15);
- glMatrixMode(GL_MODELVIEW);
- gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
- return;
- }
- void display(void)
- {
- glClear(GL_COLOR_BUFFER_BIT);
- glColor3f(1.0, 0, 0);
- glutWireTeapot(3);
- glFlush();
- return;
- }
- int main(int argc, char *argv[])
- {
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE);
- glutInitWindowPosition(0, 0);
- glutInitWindowSize(300, 300);
- glutCreateWindow("OpenGL 3D View");
- init();
- glutDisplayFunc(display);
- glutMainLoop();
- return 0;
- }
- X Error of failed request: BadValue (integer parameter out of range for operation)
- Major opcode of failed request: 154 (GLX)
- Minor opcode of failed request: 24 (X_GLXCreateNewContext)
- Value in failed request: 0x0
- Serial number of failed request: 33
- Current serial number in output stream: 34
- sudo glxinfo
- name of display: :0
- X Error of failed request: BadValue (integer parameter out of range for operation)
- Major opcode of failed request: 154 (GLX)
- Minor opcode of failed request: 24 (X_GLXCreateNewContext)
- Value in failed request: 0x0
- Serial number of failed request: 39
- Current serial number in output stream: 40
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement