PDA

View Full Version : help -- runtime error



leo0801
02-01-2002, 12:12 PM
I am a newborn in Linux and openGL.
please help me..
my prog1.c==>
-----------------------------------------------------------
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <X11/Xlib.h>
#include <GL/glx.h>

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(250, 250);
glutInitWindowPosition(100, 100);
glutCreateWindow(argv[0]);
glutMainLoop();
return 0;
}
---------------------------------------------------------------

my makefile==>
---------------------------------------------------------------
SOURCE= prog1.c
EXEC= prog1
CC = gcc

GL_LIB=/usr/X11R6/lib
GL_INCLUDE=/usr/X11R6/include

FLAGS = -I$(GL_INCLUDE) -L$(GL_LIB) \
-lX11 -lGL -lGLU -lGLUT

$(EXEC): $(SOURCE)
$(CC) -o $(EXEC) $(SOURCE) $(FLAGS)
------------------------------------------------------------------

Error message==>
------------------------------------------------------------------
GLUT: Fatal Error in prog1: OpenGL GLX extension not supported by display : : 0.0
-------------------------------------------------------------------

zerodeux
02-07-2002, 07:30 AM
The error message seems clear to me, you don't have a properly configured OpenGL setup. I mean even from a user point of view, not only from a developer one's. Get help from your distro boards to setup OpenGL for your hardware. Hint: you're done when 'glxgears' shows up nice gears running at fast pace.

Good luck !