Login  Register

Re: Getting starting problem

Posted by Sven Gothel on Oct 20, 2011; 8:21am
URL: https://forum.jogamp.org/Getting-starting-problem-tp3436963p3437034.html

On Thursday, October 20, 2011 09:44:08 AM Alex Kozlov [via jogamp] wrote:
>
> Hi!
> I get example from
> http://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing Using JOGL
> in AWT SWT and Swing  and run it (i try all examples). See blank window.
> I do the the same in debug mode... if I have any breakpoints - all work
> correct. If no - still the same blank window.
>
> Then I add this after

> GLProfile.initSingleton( false ) :
this line only impacts X11 currently, where 'false'
is required if using an IDE or applet for example,
ie you can't assure you are the 1st X11 user.
Read the API doc in this regard!

You also failed to state OS, arch, JVM, .. see Wiki/FAQ

> try {
>             Thread.sleep(1000); // sleep 1 second
>         } catch(Exception e){}

SWT is a general issue here, even though our unit tests pass on
many platforms, see our jenkins/chuck test results.

Maybe .. on your platform w/ your SWT installation it behaves differently ?
Maybe your in you case SWT needs time to initialize things in a spawn off thread ?
I don't know.

>
> And now all work properly in any cases... but I think it's like magic and
> there are better way?

not enough information, sorry.

~Sven