SPGL no longer runs with LWJGL 1.1

Started by Nop, May 21, 2007, 21:04:57

Previous topic - Next topic

Nop


I am using the Shaven Puppy lib and I have just tried to move to LWJGL 1.1

I get the Exception

Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.lwjgl.opengl.Display.getContext()Lorg/lwjgl/opengl/Context; from class com.shavenpuppy.jglib.opengl.GLResource
   at com.shavenpuppy.jglib.opengl.GLResource.doCreate(GLResource.java:76)
   at com.shavenpuppy.jglib.Resources.allocate(Resources.java:400)
   at com.shavenpuppy.jglib.Resource.create(Resource.java:210)

It seems that the getContext() method was changed to private.

Is there a workaround for this?

Matzon

have shavenpuppy lib not access that ? :)
alternatively heavy use of reflection

Nop


Quotehave shavenpuppy lib not access that

Gladly. :-)

So if Display.getContext() is private now, what would be the proper public call to replace it with?

Nop


Just kept commenting out code until it compiled. Seems to work anyway for now...

cornholio

Quote from: Nop on May 23, 2007, 07:38:33

Just kept commenting out code until it compiled. Seems to work anyway for now...

hehe ... this is how they build a release at microsoft  ;)

Orangy Tang

I seem to have the same problem now. From what I can tell it's just using the return object of getContext() to make sure things are being properly created and destroyed in the same context/thread - the actual Context object itself isn't being manipulated in any way.

I assume it was made private to stop people messing around with the Context, would it be possible to get some kind of replacement for the above functionality? Maybe an isCurrent() call along with makeCurrent()?

elias

Sorry about that. You can replace the Display.getContext() call with Display.getDrawable().getContext().

  - elias

Orangy Tang

Ahaha, I was just wondering what the new Drawable was.  ;D

Thanks