LWJGL and gcj

Anders Dahlberg dahlberg@lysator.liu.se
Wed May 25 15:44:00 GMT 2005


Hello
onsdag 25 maj 2005 08.25 skrev Anthony Green:
> LWJGL provides another OpenGL binding for java among other things (see
> lwjgl.org). 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 lwjgl.org forums? (Or maybe you could just 
post it there yourself? :)
> AG
/Anders
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java/attachments/20050525/6a8db313/attachment.sig>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /