jPCT and Swing/AWT sharing a window...

Started by Anonymous, February 10, 2004, 06:34:25 PM

Previous topic - Next topic

Anonymous

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

EgonOlsen

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.

BenSherlock

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

EgonOlsen

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.


BenSherlock

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