Author Topic: jPCT and Swing/AWT sharing a window...  (Read 4334 times)

Anonymous

  • Guest
jPCT and Swing/AWT sharing a window...
« 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
jPCT and Swing/AWT sharing a window...
« Reply #1 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.

Offline BenSherlock

  • byte
  • *
  • Posts: 2
    • View Profile
    • http://www.bensherlock.co.uk
jPCT and Swing/AWT sharing a window...
« Reply #2 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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
jPCT and Swing/AWT sharing a window...
« Reply #3 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
jPCT and Swing/AWT sharing a window...
« Reply #4 on: February 11, 2004, 10:01:04 pm »

Offline BenSherlock

  • byte
  • *
  • Posts: 2
    • View Profile
    • http://www.bensherlock.co.uk
jPCT and Swing/AWT sharing a window...
« Reply #5 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