[fedora-java] Java OpenGL on FC4

John M. Gabriele john_sips_tea at yahoo.com
Wed Aug 17 03:00:22 UTC 2005



--- Anthony Green <green at redhat.com> wrote:

> On Mon, 2005-08-15 at 19:00 -0700, John M. Gabriele wrote:
> > [john at localhost ~/dev/java/JOGL_Example]$ ./MyTest
> > Exception in thread "main" java.lang.LinkageError: unexpected exception
> during
> > linking: net.java.games.jogl.GLCapabilities
> 
> Rebuild your code with -findirect-dispatch and it will work.

Ok. Compiled from .java --> .o with that option and now it does
the same thing as when I run it via gij.

Which is weird, since the gcj man page has this to say:

| Note that, at present, "-findirect-dispatch" can only be used
| when compiling .class files.  It will not work when compiling
| from source.

Anyhow, at this point, I probably
need to look at the code itself to understand better why the
image is not looking right (and learn how to enable double-
buffering).

Trying to take a screenshot doesn't work b/c every time I hit
that PrintScn button, the flickering stops for an instant and
the screenshot only shows a blank black rendering window.

>  I guess we
> always need to use -findirect-dispatch, perhaps because we're
> implementing an interface that was built using that option. 
> 
> > [john at localhost ~/dev/java/JOGL_Example]$ echo $LD_LIBRARY_PATH
> > /usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/lib/i386
> > 
> > and running it actually brings up a window and draws something
> > which is red and flickers a bit, but doesn't look like a triangle.
> 
> It's a triangle, although the flickering is really making it
> unrecognizable.  If your test code used double buffering then all would
> be good.

Yeah. I've gotta learn how to turn that on. :)

> I don't know why the triangle is constantly being rerendered. Perhaps
> this is normal behaviour.
> 
> > Here's the nasty-looking messages that come up in my terminal
> > window:
> > 
> > [john at localhost ~/dev/java/JOGL_Example]$ gij -cp /usr/share/java/jogl.jar
> Test
> > Init GL is net.java.games.jogl.impl.x11.X11GLImpl
> > 
> > (.:3155): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)'
> in
> > cast to `GtkWidget'
> > 
> > (.:3155): GLib-GObject-WARNING **: invalid unclassed pointer in cast to
> > `GtkObject'
> > 
> > (.:3155): Gtk-CRITICAL **: gtk_widget_get_display: assertion `GTK_IS_WIDGET
> > (widget)' failed
> > Aborted
> 
> I don't get any of these messages.  Is your FC4 system up to date?
> 
> AG

Yup. Just did a "yum update". Note, I only get those messages (and
similar ones when running the natively compiled version) when closing
the window. Those messages aren't there when the window is up and
the red triangular shape is flickering.

http://www.simisen.com/jmg/pmwiki/pmwiki.php?n=Main.JOGLOnFC4

I think I'm also gonna give sdljava a try also. I've tried
SDL in the past, and also like the idea of keeping everything
at least LGPL. ;)

Thanks,
---John



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the fedora-devel-java-list mailing list