freeze on macos Sonoma

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: freeze on macos Sonoma

SiboVG
You're very welcome, thank you for aiding me!

I must admit I did not know about the animator, so I hope I implemented it correctly in the following code:
```
import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.awt.GLCanvas;
import com.jogamp.opengl.util.FPSAnimator;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Rectangle;

public class Test3D {
        public static void main(String[] args) {
                JFrame frame = new JFrame();
                SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                                frame.setVisible(true);
                        }
                });

                PhotoFrame pa = new PhotoFrame();
                SwingUtilities.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                                pa.setVisible(true);
                        }
                });
        }

        private static class PhotoFrame extends JFrame {
                public PhotoFrame() {
                        PhotoPanel photoPanel = new PhotoPanel();
                        setContentPane(photoPanel);
                }

        }

        private static class PhotoPanel extends JPanel implements GLEventListener {
                private FPSAnimator animator;

                PhotoPanel() {
                        this.setLayout(new BorderLayout());
                        initGLCanvas();
                }

                private void initGLCanvas() {
                        Component canvas;
                        try {
                                final GLProfile glp = GLProfile.get(GLProfile.GL2);
                                final GLCapabilities caps = new GLCapabilities(glp);
                                canvas = new GLCanvas(caps); // NOTE: using GLJPanel did not work either
                                this.add(canvas, BorderLayout.CENTER);

                                animator = new FPSAnimator((GLAutoDrawable) canvas, 60);
                                animator.start();
                        } catch (Throwable t) {
                                this.add(new JLabel("Unable to load 3d Libraries: " + t.getMessage()));
                        }
                }

                @Override
                public void paintImmediately(Rectangle r) { }

                @Override
                public void paintImmediately(int x, int y, int w, int h) { }

                @Override
                public void display(final GLAutoDrawable drawable) { }

                @Override
                public void init(final GLAutoDrawable drawable) { }

                @Override
                public void dispose(GLAutoDrawable glAutoDrawable) { }

                @Override
                public void reshape(GLAutoDrawable glAutoDrawable, int i, int i1, int i2, int i3) { }
        }
}
```

This code produces the same bug.
Reply | Threaded
Open this post in threaded view
|

Re: freeze on macos Sonoma

gouessej
Administrator
Thank you. Please send me an email so that I'll create a bugzilla account for you. You'll have to follow these guidelines to fill a bug report:
https://forum.jogamp.org/Bugreport-How-to-report-a-bug-td4042945.html

Fill it against JOGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: freeze on macos Sonoma

SiboVG
Hi Julien, I tried to mail you using this link, but I got an automatic reply that the mail could not be sent.
Reply | Threaded
Open this post in threaded view
|

Re: freeze on macos Sonoma

gouessej
Administrator
Reply | Threaded
Open this post in threaded view
|

Re: freeze on macos Sonoma

gouessej
Administrator
In reply to this post by SiboVG
12