Swing Tool Tip Causes Incorrect GLContext
Posted by
flem on
Mar 13, 2015; 8:37pm
URL: https://forum.jogamp.org/Swing-Tool-Tip-Causes-Incorrect-GLContext-tp4034154.html
I am seeing an issue where Swing tool tips are causing JOGL to be unable to obtain a valid GLContext. Before a tool tip is rendered, the proper GLContext is returned and everything works as expected. Any time after a Swing tool tip is rendered, new GLContext creations will fall back to OpenGL 1.1. This bug has been reproduced on multiple machines using ATI Radeon HD graphics cards, which are all I have available to test on.
I have included a very simple test case that reliably illustrates the problem
tooltipdemo.java and the stack trace of the exception produced by JOGL
tooltipstacktrace.txt.
Two things to note:
1) This bug does not appear if the "sun.java2d.d3d=false" (or older "sun.java2d.noddraw=true") value is not set, but everything I have read, including the JOGAMP webpage, says this flag is necessary to prevent other issues. If I am mistaken, please correct me.
2) I was not able to reproduce this on Java 1.7.0_07 with everything else the exact same, so there may have been a Java update that contributes to this.
Tested Configurations:
Windows 7
ATI Radeon HD 5450 with older (2011) and latest graphics drivers
Java 1.7.0_67, Java 1.7.0_75, and 1.8.0_40 (but could not be reproduced on 1.7.0_07)
JOGL 2.1.5 (2.1-b1240-20140311) and 2.3.0 (2.3-b1378-20150311)
To replicate:
1) Execute the main method in the attached java file
tooltipdemo.java.
2) Hover the mouse over the "Test" button until the tool tip appears.
3) Click on the "Test" button to attempt to open a GLCanvas.