Login  Register

Re: Help with shaders

Posted by Martin on Feb 13, 2012; 8:37am
URL: https://forum.jogamp.org/Help-with-shaders-tp3737063p3739496.html

Hi,
I indeed saw your material & light settings, but the content of the jzy3d (especially the small cube) can run without light, and has no light in this experiment. To be sure I did not miss anything, I added the following calls:
gl.glDisable(GL2.GL_COLOR_MATERIAL);
gl.glDisable(GL2.GL_LIGHTING);
just before drawing, and it did not change anything.

I also tried removing the clear color from the renderAverage(...) color, which did not change anything (except not clearing the scene)
gl.glClearColor(0, 0, 0, 0);
gl.glClear(GL2.GL_COLOR_BUFFER_BIT);

But this seems to be a clue: the actual scene background is white (and is dealt by jzy3d), and content appears black, like this clear color below. There might be something I missed from the overall shader processing.

Cheers, and thanks again for the suggestions.

Martin