www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Anonymous on February 10, 2004, 06:34:25 pm

Title: jPCT and Swing/AWT sharing a window...
Post by: Anonymous on February 10, 2004, 06:34:25 pm
Hi

I'm presuming that I'm probably asking a daft question. It appears, from a quick scout of lwjgl sites, that I may not be able to combine the jpct rendering in a window along with swing or awt components. Is this the case? If so are there any known ideas/methods/ tweaks/refinements /workarounds/suggestions etc to do so?

I'm quite interested in using jpct in a reasonable sized project but it would really require the ability to combine with these components.

There was something i read elsewhere about tweaking lwjgl slightly, and running jpct on top of this tweaked version may just do it...

Many thanks in advance
Ben
Title: jPCT and Swing/AWT sharing a window...
Post by: EgonOlsen on February 10, 2004, 08:49:01 pm
You are right! It's not possible to combine LWJGL's output with AWT/Swing at the moment. That's a "feature" of LWJGL. I think you are talking about the possibility to let LWJGL render into a JOGL context (feels sick somehow to me...) that princec mentioned in some forums...i'm not sure how well this will work and even if it does, if it's compatible with the way jPCT is using (i.e. hiding  :wink: ) LWJGL.
If your want to use jPCT, i can see four options:

1.) wait until princec releases his proof-of-concept demo that shows how LWJGL can run in JOGL's context and hope that it doesn't require major changes to the way LWJGL works now.

2.) wait until they add support for at least AWT into LWJGL (princec mentioned that this may happen in the future)

3.) use jPCT's software mode

4.) build your own GUI-components that can be blitted into the LWJGL-window by jPCT. Should be easy for simple buttons and similar stuff.

Hope this helps.
Title: jPCT and Swing/AWT sharing a window...
Post by: BenSherlock on February 11, 2004, 04:57:57 pm
Ah. Thanks for your speedy reply. I'll have a look into what princec is doing and hopefully get it to work at a later date.

Were there any direct links to princec's work?

Thanks again
Ben
Title: jPCT and Swing/AWT sharing a window...
Post by: EgonOlsen on February 11, 2004, 05:26:13 pm
Have a look at the LWJGL forums: http://www.puppygames.net/forums/viewforum.php?f=3
Maybe they are covering that topic there...i'm not sure where i've read about it ATM.
Title: jPCT and Swing/AWT sharing a window...
Post by: EgonOlsen on February 11, 2004, 10:01:04 pm
A thread about this topic: http://www.puppygames.net/forums/viewtopic.php?t=435
Title: jPCT and Swing/AWT sharing a window...
Post by: BenSherlock on February 12, 2004, 10:01:27 am
Great thanks.

I'll keep my eyes on those then and hopefully be able to integrate the jpct engine in at a later date :)

Many thanks
Ben