Graphics Inconsistancy

Hi,

Just last week I changed my OpenGL rendering code to use JOGL instead of GL4Java. I was able to get it working well on both Windows and Linux in less than a day. Very nice.

But, Solaris wasn’t so sucessful. I am running the very latest Java version (1.4.2) and Im getting very strange lighting behaviour. I have made a test program that shines a single directional light from the upper right top, onto a grey sphere. The directional light comes out at maximum brightness at every vertex it strikes, regarless of the angle at which they hit the sphere.

Could I be forgetting to set some OpenGL defaults that are different on Solaris OpenGL and Windows OpenGL? Any luck with Solaris, anyone?

I have included screen shots of my test program:
Windows (good picture) :slight_smile:

http://www.h-dm.com/handouts/sean/windows_jogl_sphere.jpg

Solaris (bad picture) :frowning:

http://www.h-dm.com/handouts/sean/solaris_jogl_sphere.jpg

Oh, but wait! Lets see what happens with GL_SPECULAR set to zero… wait… testing… it fixes it! Now the sphere looks evan better on Solaris then on Windows. In the old version, the version that gives a specular highlight in a few polygons on Windows, the GL_SPECULAR color was set to be the same as GL_DIFFUSE - but this gives crazy shading on Solaris. So Im not sure how safe this GL_SPECULAR term is to use. For some reason, GL4Java doesn’t have this problem. Sven Goethel is a genius!