Clearing buffers problem

I’m currently looking at my local changes to jME and found the fix for the ZBuffer-Problem:

http://www.jmonkeyengine.com/jmeforum/index.php?topic=1861.0



What do you think, Renanse, needs discussion? (I suppose you agree that it is a bug)

What I didn't like about that thread was that we had the renderqueue involved as well (sort of two issues) and I also felt it was less than thoroughly regression tested.  If you have had it that way locally and can test it toroughly, I have no problems with it.

The render queue issues are actually another point. The problem with clearing buffers arises without using render queues, too.



Putting



      Box box = new Box( "test", new Vector3f( -10, -10, -10 ), new Vector3f( 10, 10, 10 ) );

      ZBufferState zs = display.getRenderer().createZBufferState();

      zs.setWritable( false );

      box.setRenderState( zs );

      box.getLocalTranslation().set( 10, 30, -30 );

      box.updateRenderState();

      model.attachChild( box );



At the end of TestCameraMan shows the problem. (setRenderQueueMode was not neccessary, I just wanted to ensure that the box was rendered last)



The fix is in my local copy for a while now and I did not notice any problems. What do you suggest to really test it?

I would like to commit these changes to get into .9 - still objections?

No, but please wait until after the boundings check in later this morning.

FYI to those reading this thread…  Those changes went in and now issue is fixed.



Flickering issue was a seperate deal.  Basically whenever the texture renderer drew the scene, it was clearing whatever was in the RenderQueue from the main scene prior in order to use the queue for its own purposes.  I've implemented a "backqueue" that the texture renderer swaps to so that now it doesn't have that issue.