Hello ladies & gentlemen !
I send you this post because I got to implement an occlusion test in a JOGL code for my work.
My machine :
- Core 2 duo 2.33GHz
- 2 Go DDR
- ATI Radeon HD 2400 XT
- JRE 1.6
- IE 7 ( JOGL run in an applet )
The occlusion test don’t return anything and my navigator crashe in a very short time…
my source code :
// Rendering loop
// Occlusion query
IntBuffer ibFragmentVisible = IntBuffer.allocate( 1 );
ibFragmentVisible.put( 0 );
IntBuffer ibQuery = IntBuffer.allocate( 1 );
gl.glGenQueries( 1, ibQuery );
gl.glBeginQuery( GL.GL_SAMPLES_PASSED, ibQuery.get( 0 ) );
// for now, I don't draw anything for the test
gl.glEndQuery( GL.GL_SAMPLES_PASSED );
gl.glGetQueryObjectiv( ibQuery.get( 0 ), GL.GL_QUERY_RESULT, ibFragmentVisible );
gl.glDeleteQueries( 1, ibQuery );
// End of rendering loop
Is the Occlusion query work on JOGL ?
If someone should have a solution, it would be great.
Thanks
Anthony BASCOULERGUE