hi,
I am a new developer in Mac OS X.
I tried to compile some openGL programs with FLTK (www.fltk.org). I always get a “Bus error” when I try to run it. When I looked into it using gdb, it always occures where I initialize some array and pass that into openGL, say
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 0.0, 0.3, 0.3, 0.0 };
GLfloat lmodel_ambient[] = { 0.4, 0.4, 0.4, 1.0 };
> glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
I get error in the line indicated. When I gdb that part of code, it seems that the array light_ambient is changed when the code is executed. I wonder if openGL in Mac blows up the stack
Any help? I am interested what kind of windowing toolkit you are using.
Thanks
Dev