NEWT Window disappear instantly at initialization

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

NEWT Window disappear instantly at initialization

amalsek
Hello everybody,

I'm actually trying to learn opengl on my free time, but I'm hitting a wall right at the start. I want to display the basic triangle in fullscreen mode, so I went for NEWT. However, as soon as the window is displaying, it shuts down immediately. I tried to search for errors with the debug flags, but I must admit that I didn't really understood what was happening there. Absolutely no errors are showing ( the exception in the output.txt are in fact simple debug messages ). Without debug I only see the following :

01:00:48.196 [main] INFO  o.b.keeper.application.Launcher - Starting application ...
Info: XInitThreads() called for concurrent Thread support
01:00:48.656 [main] INFO  o.b.k.video.opengl.OpenGLManager - Initializing OpenGL Manager ...
01:00:48.656 [main] DEBUG o.b.k.video.opengl.OpenGLManager - Loading OpenGL Profile
01:00:48.656 [main] DEBUG o.b.k.video.opengl.OpenGLManager - Loading OpenGL Capabilities
Detected screen size 1920x1200
X11Util.Display: Shutdown (close open / pending Displays: false, open (no close attempt): 1/1, open (no close attempt and uncloseable): 1)
X11Util: Open X11 Display Connections: 1
X11Util: [0]: NamedX11Display[:0.0, 0x1e5a8c0, refCount 1, unCloseable false]
X11Util: Pending X11 Display Connections: 1
X11Util: [0]: NamedX11Display[:0.0, 0x1e5a8c0, refCount 1, unCloseable false]

I've uploaded two files :
* output.txt : the output with some debug messages
* OpenGLManager.java : the file where all the opengl is happening

I'm on : Ubuntu 11.04 - amd64
Desktop Acceleration : working, but disabled
GPU :  ATI Technologies Inc RV770 [Radeon HD 4870]
Driver : radeon & fglrx - same behavior
JVM : openjdk-6

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: NEWT Window disappear instantly at initialization

Sven Gothel
Administrator
On Tuesday, June 07, 2011 01:02:03 AM amalsek [via jogamp] wrote:
> However ..

> *  http://forum.jogamp.org/file/n3032415/OpenGLManager.java
> OpenGLManager.java  : the file where all the opengl is happening

if you just call 'initialize()' on your instance of your class from main,
and do nothing else, this is the expected behavior.

JVM spec says, the JVM exists if main exist and no other non_daemon
thread is running, which would be the case here.

No animation thread ?
You may like to add and start an Animator ..

        Animator animator = new Animator(window);
        animator.start();
        ... wait for some EOL criteria ..
        animator.stop();
        window.destroy();

pls check the many unit tests we provide, within the jogl source tree.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: NEWT Window disappear instantly at initialization

amalsek
Yeah right. First post and I manage to embarrass myself. I can't remember the last time I used to develop an application with a main loop. Too much JEE web & spring.

Sorry to bother you for this. Although it was weird but when I tried to use the AWT version, the program did not stop, and an image was showing ...