Estaba pensando en migrar de JDK11 a JD21 (quizá un gran salto, no se), el caso es que al realizar el cambio, JOGL da una serie de errores, diría que en el momento de construir la ventana, Pongo un código reducido a la mínima expresión en el que tan solo crea una ventana de color rojo. En JDK11 funciona correctamente, en JDK21 da los siguientes errores:
Exception in thread "main" com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x61ada021]], idx 0], pfdID 9, ARB-Choosen true, requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]], chosen GLCaps[wgl vid 9 arb: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]] at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:182) at com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424) at com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1512) at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:607) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4846) at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:721) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/java.awt.Window.addNotify(Window.java:791) at java.desktop/java.awt.Frame.addNotify(Frame.java:495) at java.desktop/java.awt.Window.show(Window.java:1053) at java.desktop/java.awt.Component.show(Component.java:1728) at java.desktop/java.awt.Component.setVisible(Component.java:1675) at java.desktop/java.awt.Window.setVisible(Window.java:1036) at code.Code.(Code.java:40) at code.Code.main(Code.java:66) BUILD SUCCESSFUL (total time: 5 seconds)
El código en si:
public class Code extends JFrame implements GLEventListener
{
/** Atrivutos privados */
private final int xWIDTH = 800, yHEIGHT = 600;
private GLCanvas myCanvas;
/**
* Constructor
*/
public Code()
{
setTitle("Chapter 2 Program 2.1 - Window with Background Red");
setSize(xWIDTH, yHEIGHT);
setLocation(400, 50);
myCanvas = new GLCanvas();
myCanvas.addGLEventListener(this);
this.add(myCanvas);
this.setVisible(true);
}
/** Métodos públicos */
/** @param drawable */
@Override public void display(GLAutoDrawable drawable)
{
GL4 gl = (GL4) GLContext.getCurrentGL();
gl.glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
gl.glClear(GL_COLOR_BUFFER_BIT);
}
@Override public void init(GLAutoDrawable drawable) {}
@Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {}
@Override public void dispose(GLAutoDrawable drawable) {}
/**
* static Main
* @param args the command line arguments
* -Dsun.java2d.d3d=false
*/
public static void main(String[] args)
{
new Code();
}
}