Jay I
02-05-2008, 09:43 AM
Hi, guys!
I recieve the following error from freeglut each time i run a very simple program:
Unable to create direct context rendering for window 'My First OpenGL Application For Linux'
I'm new to linux and i just set up all things needed for development with OpenGL. The program i mentioned has the following code:
#include <stdlib.h>
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/gl.h>
void display(void) {
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
int main(int argc, char **argv) {
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA);
glutInitWindowPosition((1280-500)/2,(1024-500)/2);
glutInitWindowSize(500,500);
glutCreateWindow("My First OpenGL Application For Linux");
glutDisplayFunc(display);
glClearColor(0.0f,0.0f,1.0f,1.0f);
glutMainLoop();
return 0;
}
Despite the error message the program works fine but i guess it would work slow if it makes something more complex))
I hope you know how to work around this and will share your knowledge with me.
best reguards
Jay I
I recieve the following error from freeglut each time i run a very simple program:
Unable to create direct context rendering for window 'My First OpenGL Application For Linux'
I'm new to linux and i just set up all things needed for development with OpenGL. The program i mentioned has the following code:
#include <stdlib.h>
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/gl.h>
void display(void) {
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
int main(int argc, char **argv) {
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA);
glutInitWindowPosition((1280-500)/2,(1024-500)/2);
glutInitWindowSize(500,500);
glutCreateWindow("My First OpenGL Application For Linux");
glutDisplayFunc(display);
glClearColor(0.0f,0.0f,1.0f,1.0f);
glutMainLoop();
return 0;
}
Despite the error message the program works fine but i guess it would work slow if it makes something more complex))
I hope you know how to work around this and will share your knowledge with me.
best reguards
Jay I