Login  Register

? JOGL Rendering Issues - Different for v1.1.1 and v2.0 and with Laptop docked vs not ?

Posted by Z-Knight on Mar 10, 2016; 4:08pm
URL: https://forum.jogamp.org/JOGL-Rendering-Issues-Different-for-v1-1-1-and-v2-0-and-with-Laptop-docked-vs-not-tp4036458.html

I have a very wierd rendering problem that happens when using JOGL 2.0 (build b66-20121101) that I cannot explain, nor do I know what to possibly search for on the internet. I will try to create a small example program but for now let me show you what happens.

I originally wrote a 3D viewer in JOGL v1.1.1 and I converted it over to JOGL v2.0. The conversion is quite simple and NOTHING else changed in the code - only the references to GL2 were added, etc. So effectively I have the exact same program running but using two different versions of JOGL.

I have an HP W76151GA Laptop, Windows 7, 16GB RAM, i7-4910MQ CPU, and an NVIDIA Qadro K3100M graphics card (and integrated Intel HD Graphics 4600). I have no idea which graphics card is being used, but I presume the NVIDIA one is - but with Windows it might switch between cards based on load - who the hell knows.

So, the problem I have is that when I am seeing wierd artifacts when running the program in JOGL v2.0, like lines disappearing at different zoom levels. It seems to be possibly tied to the near/far clipping plane distances, because if something is hidden and I mess with those values then things come back. Look at the attached picture - the image on the TOP LEFT shows the disappearing lines, while the BOTTOM RIGHT shows what you should expect to see.



This is where it gets super wierd. If I undock the laptop and use it separated from my monitors, I get the BAD artifacts that you see on the left side. If I then dock the laptop back I still see that same BAD artifacts. BUT...here is the wierd thing, if while now docked, I start up another instance of this exact same program in JOGL v2.0, I am perfectly fine. That's what you are seeing in this screenshot. I basically started the TOP LEFT instance while undocked, then docked my laptop back in and started a second instance on the BOTTOM RIGHT. Now both instances are running, with my laptop docked and the original instance shows artifacts but the new instance does not.

btw, when I do the same thing using the version with JOGL v1.1.1 there are NO problems.

in short:
     undocked, JOGL v2.0 - BAD
     docked, JOGL v2.0 - GOOD
     undocked, JOGL v1.1.1 - GOOD
     docked, JOGL v1.1.1 - GOOD

I will try to upgrade to the latest JOGL v2.0 release next, and then if it persists, I will try to make an example program. I simply can't explain it and don't know what to even look for to figure out the issue. Like I said, clipping planes distances is the only thing that I think could be the cause, but why would that show up only in JOGL v2.0 and not in JOGL v1.1.1, and also, why would it only show up when undocked as opposed to being docked? Is this where having the integrated and NVIDIA graphics card is causing problems?? And if the dual graphics cards are the issue, why is it that when I dock the laptop back, the first instance still fails, but the new instance works - it's not like both graphics card are active at the same time.

As for clipping plane issues...I'm not completely sold on it being the problem, because as I said, this works perfectly in JOGL v1.1.1 and also, see the series of pictures below where I zoom in closer and closer to the Earth. You will see different things being clipped/artifacted/etc and so if it was a clipping plane issue that should not happen like that at different zoom levels - ie. once I got past the clipping plane, it would be totally off from that point forward and not come back as I moved further in. (if that made ANY sense).