Problem displaying HelloWorld OpenGl app


I m on Mandrake 8.0, and I have installed nvidia opengl drivers. When I run some ‘existing’ application such as gears or gltron, everything works fine. But I m trying to run the hello.c example from the Programming OpenGl book (just draw a white square on a black background). The compilation is correct and for the link I need to use
GLU GLUT gl pthreads dl libs. Ok that s strange but it links.

So my problem … when I run the example, the display is not good at all : the main problem is that the display is not inside the Xwindow Frame … I mean, my white square appears on the top of my screen and the ‘window frame’ (the KDE frame) appears on the bottom of the screen. When I resize the frame, the square area moves but the display is not good at all …

Any hints ??

Thanks a lot


You get this behaviour for one GLUT program but not for others like the gears sample? Strange, I would investigate the other programs also and see if they do not behave the same way.

It is two versions of GLUT and you use different commands to build.
Mesa GLUT:
gcc hello.c -lglut -lGL -lGLU
original GLUT:
gcc hello.c -lglut -lGL -lGLU -lX11 (and other X libraries)
A brainstorming idea is that you are using a makefile for the original GLUT with your Mesa GLUT and that leads to trouble.

The answer may be to find why I need to link with pthreads and dl ? It seems that it s not necessary normaly … so why do I need them ?


ps: I don t have problem with the gears binary, so it s certainly a compilation/link problem.
An other think I thought about is that I have a Elsa Gladiac GeForce 2 mx and not a NVIDIA, can this be the problem ?? ( I don t think so but …)

But did you not build the gears sample? (is precompiled binaries even available on the net?)

I do not think that nvidia sells directly to the consumer so everybody has a ELSA, AOpen or whatever with a nvidia GPU.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.