Hi,
I have spent several hours on fixing my depth, unfortunately I was not able to solve it, here in the picture you see the result

Can anyone give me any idea of how to fix this bug? I'd be appreciated.
Here is my code, where I called gl.glEnable(GL2.GL_DEPTH_TEST);
in init method
public void init(GLAutoDrawable drawable) {
// TODO Auto-generated method stub
final GL2 gl = drawable.getGL().getGL2();
gl.glShadeModel(GL2.GL_SMOOTH);
gl.glClearColor(1f, 1f, 1f, 1f);
gl.glClearDepth(1.0f);
gl.glEnable(GL2.GL_DEPTH_TEST);
gl.glDepthFunc(GL2.GL_LEQUAL);
gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL2.GL_NICEST);
GeometricObjects.initlighting(drawable);
}
*********************************************
Even i tried to call in display function, but did not work out.
public void display(GLAutoDrawable drawable) {
GL2 gl2 = drawable.getGL().getGL2();
gl2.glClear(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_DEPTH_BUFFER_BIT);
gl2.glMatrixMode(GL2.GL_PROJECTION);
gl2.glEnable(GL2.GL_DEPTH_TEST);
gl2.glLoadIdentity();
}
**********************
And finally tried to give bits in capability
GLCapabilities capabilities = new GLCapabilities(profile);
capabilities.setBlueBits(16);
***************************************
How do you think the hardware may matter or another reason here?
Best regards,