PDA

View Full Version : The simple function from OpenGL crashes on Ubuntu 8.10



Evgeny_chernov
January 28th, 2009, 01:15 PM
I executed the following program on Ubuntu 8.10 on my virtual machine and on the same system on my notebook:


#include <GL/gl.h>

int main()
{
GLfloat color[4];
glGetFloatv(GL_CURRENT_COLOR, color);
return 0;
}

And everywhere this program crashed on the line with glGetFloatv.

On the other distributions (like Fedora 10, OpenSUSE 11.1, RHEL 4) it didn't crash.

Does it crash only on my Ubuntu or on all ones?
And what is reason of this crash?

I'll be very pleased for any help.

Rocket2DMn
January 28th, 2009, 01:32 PM
Moved to Programming Talk, you will probably get better help here.

Zugzwang
January 28th, 2009, 03:35 PM
And everywhere this program crashed on the line with glGetFloatv.


Are you sure that you do not have to initialise the OpenGL library before using? If that is necessary and you do not do so, the result is undefined, i.e. might be different everywhere.