HUD transparency problems fixed

I fixed the transparency problems of the HUD 8).

I added a new comparator and sorting policy, which simply sorts by z-value (the z-component of a shape’s position). The HUD pass must then be sorted by this new policy (opaque and transparant). It is now possible to define a separate sorting policy for each RenderPass, which is necessary, since the perspective scene shouldn’t be sorted by this policy.

To ease the thing, I’ve added a new method to the HUD class to create a correctly set up RenderPass. Use it like this:


HUD hud = new HUD( ... );
...
env.addRenderPass( hud.getRenderPass() );

This adds the RenderPass as well as the attached BranchGroup to the environment.

Or without Xith3DEnvironment:


HUD hud = new HUD( ... );
...
RenderPass renderPass = hud.getRenderPass();
myLocale.addBranchGraph( renderPass.getBranchGroup() );
myUniverse.getRenderer().addRenderPass( renderPass );

Enjoy 8)

Marvin

Great job, Marvin ! Xith3D keeps improving each day.

By the way, the debug center is coming along very nicely, and I’m thinking of a model viewer integrated to Eclipse (already talked of that earlier). Next step is a world editor into Eclipse but hey that’s a bit ambitious ;D

For the model viewer you could make forst use of the new ExtensionLoader in org.xith3d.loaders.models.util