This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LWJGL and gcj

onsdag 25 maj 2005 08.25 skrev Anthony Green:
> LWJGL provides another OpenGL binding for java among other things (see
>  I was able to build it after a little jawt fixing (patch
> coming soon).
> Unfortunately it doesn't run.  They use a really nasty kludge that
> doesn't work with gcj.  For some reason,they require access to low-level
> graphics info in their java code.   The info they need isn't provided by
> the high-level interfaces available to normal programs (like in
> GraphicsDevice), so they use this trick to call methods on Sun's private
> subclasses.
> static int getScreenFromDevice(GraphicsDevice device) throws LWJGLException
> { try {
>     Method getScreen_method = device.getClass().getMethod("getScreen",
> null); Integer screen = (Integer)getScreen_method.invoke(device, null);
> return screen.intValue();
>  etc
>  etc
> They use this same trick to get a visualID from Sun's private
> GraphicsConfiguration subclass.
> We will either have to implement similar secret interfaces, or ask the
> LWJGL folks to change their ways (if that's even possible), or both.
> I don't plan on doing anything more with this right now.  This was just
> an FYI.

Is it ok if I repost this at the forums? (Or maybe you could just 
post it there yourself? :)

> AG

Attachment: pgp00000.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]