Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* test.c */
- /* Ubuntu 12.04.2 guest in Windows 7 Pro VirtualBox (updated) + guestutils
- /* compiled with: gcc -lGL -lglut test.c -o test */
- /* When run with ./test I get this error:
- OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x888c9d8
- OpenGL Warning: Retry with 0x8002 returned 0 visuals
- Segmentation fault (core dumped)
- */
- #include <GL/glut.h>
- void draw()
- {
- glClearColor(0,1,0,1);
- glClear(GL_COLOR_BUFFER_BIT);
- glFlush();
- }
- int main(int argc, char *argv[])
- {
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
- glutInitWindowPosition(50,25);
- glutInitWindowSize(500,250);
- glutCreateWindow("Green Window");
- glutDisplayFunc(draw);
- glutMainLoop();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement