i just installed the newest Eclipse Version. 2023-09 (4.29.0) Java SE.17
I am using Jogl 2.5.0.
Here is a code that used to work fine but gives me now an error message, JFrames.addNotify() has something to do with it, "this.jFrame.add(this.glCanvas);" is the line that breakes it.
com.jogamp.opengl.GLException: Unable to determine GraphicsConfiguration: WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x16f8e2e7]], idx 0], pfdID 8, 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[GL2/GL4bc.hw], on-scr[.]], chosen GLCaps[wgl vid 8 arb: rgba 10/10/10/2, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL2/GL4bc.hw], on-scr[.]]]
The normal GLWindow approach with FPSAnimator still works but the NewtCanvasAWT wont run anymore :(
Any clues?
i just wanted to be up-to-date
See stripped down code:
import javax.swing.JFrame;
import com.jogamp.newt.awt.NewtCanvasAWT;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.GLProfile;
public class Main implements GLEventListener {
public static void main(String[] args) {
new Main();
}
private JFrame jFrame;
private GLWindow glWindow;
private NewtCanvasAWT glCanvas;
public Main() {
this.jFrame = new JFrame();
this.jFrame.setSize(320, 240);
this.jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.jFrame.setLocationRelativeTo(null);
this.glWindow = GLWindow.create(new GLCapabilities(GLProfile.get(GLProfile.GL2)));
this.glWindow.addGLEventListener(this);
this.glCanvas = new NewtCanvasAWT(this.glWindow);
this.jFrame.add(this.glCanvas);
this.jFrame.setVisible(true);
}
@Override
public void display(GLAutoDrawable arg0) {
// TODO Auto-generated method stub
}
@Override
public void dispose(GLAutoDrawable arg0) {
// TODO Auto-generated method stub
}
@Override
public void init(GLAutoDrawable arg0) {
// TODO Auto-generated method stub
}
@Override
public void reshape(GLAutoDrawable arg0, int arg1, int arg2, int arg3, int arg4) {
// TODO Auto-generated method stub
}
}
THX
I am a Robot