Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I use Jogl

27 views
Skip to first unread message

Martin Baker

unread,
Aug 6, 2003, 3:46:28 AM8/6/03
to
Are there any simple guides about using Jogl? (I have used OpenGL before I
just need to work out how to call it from Java)

If not, could anyone help me get started, I have been to:
https://jogl.dev.java.net/
and downloaded the latest versions of:
Jogl.jar
Joglib.jar
Do I need to extract the dll from Joglib.jar ?
What includes do I need to put in my program?
Can I then call methods such as: glRect(-25.0,-25.0,25.0,25.0);

Thanks for any help.

Martin


Richard Ivarson

unread,
Aug 6, 2003, 9:17:47 AM8/6/03
to
(Due to problems with Google on the original article: answer is
without original ID)


"Martin Baker" <bak...@btinternet.com> wrote in message news:<bgqboj$qh3$1...@titan.btinternet.com>...


> Are there any simple guides about using Jogl? (I have used OpenGL before I
> just need to work out how to call it from Java)

The short userguide at
https://jogl.dev.java.net/source/browse/jogl/doc/userguide/ is nice.

> If not, could anyone help me get started, I have been to:
> https://jogl.dev.java.net/
> and downloaded the latest versions of:
> Jogl.jar
> Joglib.jar
> Do I need to extract the dll from Joglib.jar ?

From the bin page https://jogl.dev.java.net/servlets/ProjectDocumentList
(Jul-17 is current IMHO) you need to download the binary packet for
your platform. It usually contains the platform neutral "jogl.jar" and
a native library ("jogl.dll" for Win32 or "libjogl.so" for Linux etc).

For Win32 you could put both files into the path where your
application stays, but the best way IMHO is to put the two files into
your SDK/JRE. For example:
Win32
Jre/bin/ : jogl.dll
Jre/lib/ext/ : jogl.jar

Linux:
Jre/lib/i386/ : libjogl.so
Jre/lib/ext/ : jogl.jar
(Usually JAVA_HOME points to /bin/usr/lib/java2/ )

Etc. That's all what's concerning the SDK/JRE part. And since SUN and
SGI are working together now we can expect to see a future J2SE which
includes all this.

> What includes do I need to put in my program?

You could do: "import net.java.games.jogl.*"

> Can I then call methods such as: glRect(-25.0,-25.0,25.0,25.0);

Nearly. After you've created your GlCanvas or GlJPanel and registered
your OpenGL class to them (all mentioned in the above mentioned
userguide), you can do OpenGL in the way we know and love it. You get
an OpenGL context object in the OpenGL init(..) display(..) etc
methods and this you use to call your API commands.

If you don't mind to use a Web based forum software you're going to
find some real Jogl experts in a gaming orientated forum here:
http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl
(The SUN men who maintain JOGL are also there.)

-ric

Martin Baker

unread,
Aug 7, 2003, 1:45:44 AM8/7/03
to
Richard,

Thanks very much, you have given me the information I needed to get started.

Cheers,

Martin


0 new messages