Bug 869 - GLEventListener#init not called from GLWindow OSX 10.9
Summary: GLEventListener#init not called from GLWindow OSX 10.9
Status: RESOLVED DUPLICATE of bug 867
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: pc_x86_64 macosx
: --- major
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-10-23 22:01 CEST by johan
Modified: 2013-10-23 23:21 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments
crash-log (44.11 KB, text/plain)
2013-10-23 22:06 CEST, johan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johan 2013-10-23 22:01:44 CEST
The below program displays a window but the GLEventListener is not called. This worked on OSX 10.8.5.
jogamp 2.1.1 (dated October 19). Running from Netbeans with gluten-rt-natives-macosx-universal.jar, gluten-rt.jar, jogl-all-natives-macosx-universal.jar and jogl-all.jar on the class path.

Also, when closing the window there is a crash in native code (attached hs_errlog).

package osxgl3test;

import com.jogamp.newt.opengl.GLWindow;
import com.jogamp.opengl.util.Animator;
import javax.media.nativewindow.WindowClosingProtocol;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;

public class OSXGL3Test {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		final GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL3));
		caps.setBackgroundOpaque(true);
		caps.setDoubleBuffered(true);
		caps.setDepthBits(16);
		GLWindow glWindow = GLWindow.create(caps);
		glWindow.addGLEventListener(new GLEventListener() {
			@Override
			public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
				System.out.println("reshape: " + drawable);
			}

			@Override
			public void init(GLAutoDrawable drawable) {
				System.out.println("init: " + drawable);
			}

			@Override
			public void dispose(GLAutoDrawable drawable) {
				System.out.println("dispose: " + drawable);
			}

			@Override
			public void display(GLAutoDrawable drawable) {
				System.out.println("display: " + drawable);

			}
		});
		glWindow.setTitle("Test");
		glWindow.setSize(1024, 768);
		glWindow.setUndecorated(false);
		glWindow.setPointerVisible(true);
		glWindow.setVisible(true);
		glWindow.setFullscreen(false);
		glWindow.setDefaultCloseOperation(WindowClosingProtocol.WindowClosingMode.DISPOSE_ON_CLOSE);

		Animator animator = new Animator(glWindow);
		animator.start();
	}
}
Comment 1 johan 2013-10-23 22:06:09 CEST
Created attachment 524 [details]
crash-log
Comment 2 johan 2013-10-23 23:21:56 CEST
Duplicate of https://jogamp.org/bugzilla/show_bug.cgi?id=867, closing this.

*** This bug has been marked as a duplicate of bug 867 ***