Login  Register

RE: Problem with displaying the line segments

Posted by paultallard on Apr 26, 2017; 9:03am
URL: https://forum.jogamp.org/Problem-with-displaying-the-line-segments-tp4037890p4037897.html

FYI, you are correct, 1.5.2 does not have a  Directx dll and the Windows8/10 Directx dll is incompatible with 1.5.2.  A retro dll that works with 1.5.2 can be downloaded at https://www.microsoft.com/en-us/download/details.aspx?id=6812

I know this is not your stated direction, but older Lenova graphics cards only support openGL 1.0, Lenova never published updated drivers, and the Intel updated driver causes the screen to go blank.  Looks like it's time for a hardware upgrade before my Java3D upgrade!

Paul Allard

From: [hidden email]
Sent: ‎4/‎26/‎2017 1:30 AM
To: [hidden email]
Subject: Re: Problem with displaying the line segments

world,
I'm pretty sure this is related to the OpenGL fixed function pipeline issue of having no transparent triangle sorting strategy, whereas DirectX does. Though I'm not sure if you are using the DirectX dll behind java 1.5.2 because I couldn't find a release with it in it.

Anyway I can get the expected rendering simply by commenting out the line
lineAttr.setLineAntialiasingEnable(true);
Because anti-aliasing forces lines to be in the transparent pass, and therefore they don't write to the depth buffer and hence get mixed with other transparent renders. Note that the centroids of all your shapes are the same so geometry sorting won't help here.

If you want to keep them nicely anti-aliased (and who wouldn't) then you need to reorganize your scene graph using an OrderGroup to make the lines render after the boxes in the transparent pass

So I added a new member
private SimpleUniverse universe;
private BranchGroup root;
private TransformGroup trans;
private OrderedGroup og = new OrderedGroup();
added it to the trans group
trans = new TransformGroup();
trans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
trans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
trans.addChild(og);
root.addChild(trans);
and put the line box into it, instead of trans
trans.addChild(new Box(w, w, w, app));
//trans.addChild(lineShape(w, lineColor));
og.addChild(lineShape(w, lineColor));

You may already know this but this two items are also a good idea.
view.setTransparencySortingPolicy(View.TRANSPARENCY_SORT_GEOMETRY);

System.setProperty("sun.awt.noerasebackground", "true");
Please have a go and tell us if it helps,
Phil.





If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/Problem-with-displaying-the-line-segments-tp4037890p4037896.html
To start a new topic under java3d, email ml+[hidden email]
To unsubscribe from java3d, click here.
NAML