Hello Guest

Window toolkit

  • 8 Replies
  • 12235 Views
*

Offline Chman

  • ***
  • 100
    • http://www.shakebox.org
Window toolkit
« on: June 16, 2003, 15:36:54 »
Hi everybody !
I know that this question has ever been asked, but maybe I will have a different answer...
Will lwjgl be integrated into an awt/swing panel ? Is there a way to do that ?
Because I'm planning on a little 3d editor, but making it only using opengl will be a very very long & hard task... And I don't want to switch again to GL4java cause I love LWJGL ! But if I haven't the choice.......

So can someone help me ? Does anybody has ever tried to put lwjgl in a AWT application ?

++
Chman

*

Offline princec

  • *****
  • 1929
    • Puppygames
Window toolkit
« Reply #1 on: June 16, 2003, 15:41:00 »
The short answer is: no, you can't.

The long answer is: no, you can't, and never will be able to. LWJGL is a complete replacement for AWT. Even if we did some clever hacks to it to put it in an AWT window it still wouldn't work because the whole design is based around the LWJGL window.

What you'd end up with is JOGL :)

Having said that: we're going to change LWJGL to use Buffers instead of ints, and give the GL commands their gl prefix once more, and make all the methods static in preparation for JDK1.5 and static imports.

What this means is that your code should refactor between JOGL and LWJGL very easily.

Now - I'm of the opinion that making a little 3D editor using only OpenGL isn't quite so hard as you might think. In the relatively near future I'll be open sourcing the GUI code from Alien Flux and putting it into the SPGL, which is half the work already.

Cas :)

*

Offline Chman

  • ***
  • 100
    • http://www.shakebox.org
Window toolkit
« Reply #2 on: June 16, 2003, 15:46:36 »
Thanks for your very quick answer !

Concerning the full OpenGL editor, it wouldn't be so difficult, I agree, but I'm not sure it would be as efficient as a classical editor in a window...

Thanks again, nervertheless I will try to make it entirely with lwjgl !

Chman

*

Offline princec

  • *****
  • 1929
    • Puppygames
Window toolkit
« Reply #3 on: June 16, 2003, 16:06:23 »
With the new support for hardware cursors that Elias has added, there's no need to paint the entire screen every frame. You could do a really simple damage/paint list and just redraw those components that need to redraw.

Cas :)

Window toolkit
« Reply #4 on: June 16, 2003, 18:30:21 »
Would it not be possible to have two separate windows, one using Swing with all your tools (buttons, text boxes, etc.) in it and another LWJGL rendering window to show your output?  The LWJGL window would have to do some good picking and report back to the main running class, which the Swing thread could query either at a regular interval, or when it detects user input.

That said, I'm curious if it would be conceivable to implement glut in LWJGL.  I don't have a ton of experience with glut myself, but perhaps it might be a very approachable way to do windowing/gui stuff.

Paul

*

Offline Chman

  • ***
  • 100
    • http://www.shakebox.org
Window toolkit
« Reply #5 on: June 16, 2003, 18:35:28 »
Yeah implementing glut would be great !
Let see what Princec think about that...

Window toolkit
« Reply #6 on: June 16, 2003, 18:49:27 »
Quote from: "Chman"
Concerning the full OpenGL editor, it wouldn't be so difficult, I agree, but I'm not sure it would be as efficient as a classical editor in a window...


Maybe you have a special reason, but I guess I should probably ask before you run off an develop a 3D editor. Have you tried MilkShape3D yet? It's a really great low poly editor with an easy to parse file format.

*

Offline Chman

  • ***
  • 100
    • http://www.shakebox.org
Window toolkit
« Reply #7 on: June 16, 2003, 18:54:33 »
I know milkshape 3D, but I want to make a Level Editor, not a 3D model editor (sorry, it's my fault :))...

Window toolkit
« Reply #8 on: June 16, 2003, 18:58:32 »
Heh. No problem. Just thought I'd mention. Along the same thread, you may want to check out the modelers for other games first. Quake, Unreal, Half-Life, insert your favorite game here, all have modelers that, depending on what you're doing, might be able to do the job just fine. I think that some of them are even OpenSource and could be modified to your needs.