No glu in 2.6

Started by ste3e, November 01, 2010, 10:27:49

Previous topic - Next topic

ste3e

I have been looking at JOGL but keep hearing about code bloat due to the AWT so I am having a look at LWJGL. Problem is that all the code examples and tutorials I find for LWJGL all include glu which is no longer there in 2.6, and when I run the examples without the glu I just get a glClearColor screen. Any chance someone could throw me the 2.6 version of the init() function with the appropriate imports?

As an also, isn't LWJGL tied to the os and therefore hardware through the java awt? And if this is so, then is the code bloat due to the awt running threads to accommodate tasks which LWJGL dismisses (multiple windows) and that is what means LWJGL doesn't suffer the same bloat?

kappa

GLU is still there in LWJGL 2.6, only thing is that it was moved a few releases ago to the utils package.

So you will find it in lwjgl_util.jar and under the "import org.lwjgl.util.GLU;"

ste3e

Thanks. That's got it going.

jediTofu

As for your question about code bloat (if you're talking about speed), LWJGL creates a native window using the underlying OS's API (and no AWT or Swing code), I believe.  JOGL, instead, uses Java's AWT (or Swing if you choose).  There are advantages and disadvantages to both.  LWJGL was designed in mind as kind of a cross-platform library for game consoles.

This is only stuff that I have read, so everything I just said could be wrong  :-X

Also, read this: http://lwjgl.org/about.php

However, I have never read any significant statistics showing that LWJGL is faster/slower than JOGL.  They're both fast enough really.  It depends solely on what you want.  LWJGL provides JInput and JOAL support automatically, as the name suggests in providing the basic needs for games (Lightweight Java Game Library), while JOGL is designed to simply expose OpenGL onto the Java platform while being easily integrated with AWT or Swing.
cool story, bro