Original Post
Hello,
I have a cross-platform application that was first running on Windows. I ported it to Mac (using the Qt framework) and kept all the OpenGL routines same. Everything works as expected on Mac now, except for the spotlights.
It seems as if the command
glLighti(GL_LIGHT0+activeLightCounter,GL_SPOT_EXPONENT,spotExponentValue);
has no effect at all (i.e. behaves as with a spotExponent of 0 (default)). I tried values between 0 and 128, but nothing changes.
Additionally, following command
glLightf(GL_LIGHT0+activeLightCounter,GL_SPOT_CUTOFF,spotCutoffValue);
behaves strangely on Mac OSX: varying the value between 0 and 90, it seems that the visible cutoff is always around 10-20 degrees or so, and instantly goes to 180 degrees when I specify a value of 90!
This is very odd to me. Would someone have a clue? I need to mention that this happens on all tested Mac machine types (3) and OS versions (leopard, snow leopard and lion).
Is it possible that on Mac there are different default openGl settings? And if yes, which of those might influence the spotlights? (everything else appears same as on Windows).
Thanks for any insight
I have a cross-platform application that was first running on Windows. I ported it to Mac (using the Qt framework) and kept all the OpenGL routines same. Everything works as expected on Mac now, except for the spotlights.
It seems as if the command
glLighti(GL_LIGHT0+activeLightCounter,GL_SPOT_EXPONENT,spotExponentValue);
has no effect at all (i.e. behaves as with a spotExponent of 0 (default)). I tried values between 0 and 128, but nothing changes.
Additionally, following command
glLightf(GL_LIGHT0+activeLightCounter,GL_SPOT_CUTOFF,spotCutoffValue);
behaves strangely on Mac OSX: varying the value between 0 and 90, it seems that the visible cutoff is always around 10-20 degrees or so, and instantly goes to 180 degrees when I specify a value of 90!
This is very odd to me. Would someone have a clue? I need to mention that this happens on all tested Mac machine types (3) and OS versions (leopard, snow leopard and lion).
Is it possible that on Mac there are different default openGl settings? And if yes, which of those might influence the spotlights? (everything else appears same as on Windows).
Thanks for any insight