0

私は信じられないほどばかげた小さなサンプルを持っています。おそらくチュートリアルから直接切り取ったもので、実行するたびに終了時に警告が生成されます。何が欠けているのか興味があります。アイデア、リンク、忘れているものはありますか?

これがメインウィンドウのセットアップです...

package com.emarcotte;

import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLProfile;

import com.jogamp.newt.event.KeyAdapter;
import com.jogamp.newt.event.KeyEvent;
import com.jogamp.newt.event.WindowAdapter;
import com.jogamp.newt.event.WindowEvent;
import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.util.FPSAnimator;

public class Main2 {
    public static void main(String[] args) {
        final RenderLoop loop = new RenderLoop();
        GLProfile glp = GLProfile.get(new String[] { GLProfile.GL3 }, true);
        GLCapabilities caps = new GLCapabilities(glp);
        GLWindow window = GLWindow.create(caps);
        window.setSize(300, 300);
        window.setVisible(true);
        window.setTitle("NEWT Window Test");
        window.addGLEventListener(loop);
        window.setAnimator(new FPSAnimator(window, 120));
        window.getAnimator().start();
        window.addWindowListener(new WindowAdapter() {
            @Override public void windowResized(WindowEvent we) {
                loop.setHeight(window.getHeight());
                loop.setWidth(window.getWidth());
            }
        });

        window.addKeyListener(new KeyAdapter() {
            @Override public void keyPressed(KeyEvent e) {
                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                    window.getAnimator().stop();
                }
            }
        });
    }
}

警告は次のとおりです。

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0.0, 0x7f214c0012b0, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0.0, 0x7f214c017390, refCount 1, unCloseable false]
4

1 に答える 1