|
ChrisE
|
 |
« Reply #15 on: 17. November 2010, 05:32:22 pm » |
|
Attached is the requested test case; I see that pausing/resuming the renderer here seems to work correctly. Next I'll try to make a test case for a tabbed/paned app, much more similar to the one we use, in hopes that that will show the error we're having. In the meantime, this shows pretty clearly the logic we use for setting up Xith in our app.
How well does Xith play with SWT (as opposed to AWT/Swing)?
Sorry for the delay; I'm not a native Java developer and so had overestimated the difficulty of setting up a quick test-case. I'm pretty impressed by the speed of prototyping (esp. GUI apps) compared with my "mother-tongue" (C/C++).
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #16 on: 17. November 2010, 05:43:55 pm » |
|
Ok, I will have a look at it in the next days. I just got a cold today. So I will be in bed for some days.
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #17 on: 17. November 2010, 05:52:55 pm » |
|
Eek. Get well soon!
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #18 on: 17. November 2010, 09:50:16 pm » |
|
So, to satisfy my own curiosity, I've been using Canvas3d.setBackgroundColor to confirm each time I set the window active and inactive, under the impression that this is eventually backed by glClearColor or something similar.
How do I go about setting the clear color of Xith for the 3D device?
My reasoning is that if that works, my problem may just be that, while the renderer is n fact fine, perhaps my scenegraph is getting deleted or the viewport is going wonky.
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #19 on: 17. November 2010, 11:33:12 pm » |
|
To add help, I've disabled (in our app) registration of an input handler or creation of an input system, so that the view should be functioning without calls to input. This fixes the NullPointerException crash in AWTMouse.
Our setup is such that Xith exists in a tabbed group, and my current suspicion is that somehow that component is getting orphaned during tabbing from the event queue. This might explain the exception, which only occurs when I tab back and give input focus via clicking to the view. So, maybe becoming an orphaned view is causing Xith to stop drawing?
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #20 on: 18. November 2010, 05:35:24 pm » |
|
Partial victory:
Using JOGL_AWT instead of LWJGL_AWT fixes the tabbing problem. Interesting. Now, back to trying to correctly hide the mouse cursor.
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #21 on: 18. November 2010, 06:24:59 pm » |
|
FULL VICTORY:
The aforementioned fix also allows the cursor to be properly hidden by the setAbsolute method. Huzzah!
Thanks Marvin for all the help!
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #22 on: 18. November 2010, 06:59:36 pm » |
|
You didn't possibly update from SVN? I checked in a fix in JAGaToo, that did the trick for the setAbsolute() in some situations.
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #23 on: 18. November 2010, 08:46:04 pm » |
|
I froze at revision 1839 to use for development; simplifies the dependencies for our work. Once the rest of the code that uses this is stable, I'll go back and update to latest--don't want to hit a moving target until then.  Still curious as to why JOGL worked and LWJGL didn't--my guess is that while JOGL is programmed "safe" by Sun and hence pretty reliably works in all kinds of weird edge cases (embedded in tabbed groups, switched on and off, etc.) LWJGL might cut corners to get better performance and to work better in fullscreen mode. Curious either way, though.
|
|
|
|
|
Logged
|
|
|
|
badboyboogey
Enjoying the stay
Offline
Posts: 40
|
 |
« Reply #24 on: 19. November 2010, 07:49:54 pm » |
|
Unless LWJGL have fixed it recently 'RUN_IN_SEPARATE_THREAD' has issues with LWJGL (completly locks up on my pc I have to use RUN_IN_SAME_THREAD) so might have all been something todo with that. If you search on the LWJGL forums you can find a few unresolved threads about it... Having said that LWJGL works alot better than JOGL if used in same thread (On my system anyway).
|
|
|
|
|
Logged
|
|
|
|
Marvin Fröhlich
Xith Lord
Administrator
Guru
   
Offline
Posts: 4381
May the 4th, be with you...
|
 |
« Reply #25 on: 20. November 2010, 03:47:53 pm » |
|
It is a problem on the Windows platform, where the window must be created from within the very same thread, that manipulates it later. So you could solve this by creating the Canvas3D from within the rendering thread.
Marvin
|
|
|
|
|
Logged
|
|
|
|
|
ChrisE
|
 |
« Reply #26 on: 22. November 2010, 06:25:46 pm » |
|
Ah, glad to know I'm not crazy then. Will try that if JOGL turns out to not work. Thanks again guys!
|
|
|
|
|
Logged
|
|
|
|
|