Newbie: UnsatisfiedLinkError on glClearColor, but not modes

Started by Trinition, March 10, 2005, 02:39:34

Previous topic - Next topic

Trinition

I just downloaded lwjgl 0.95, inspired by an article linked to by JavaLobby.org.  I wrote a quick test app that gets the display modes and then uses one and blanks the display.

The call to getAvailableDisplayModes() works fine and returns nearly 150 modes.  Setting it to one of the modes also works.  But when I call GL11.glClearColor(0f, 0f, 0f, 0f), I get:

java.lang.UnsatisfiedLinkError: glClearColor
   at org.lwjgl.opengl.GL11.glClearColor(Native Method)
   at org.trinition.scratch.lwjgl.Test.render(Test.java:33)
   at org.trinition.scratch.lwjgl.Test.mainLoop(Test.java:23)
   at org.trinition.scratch.lwjgl.Test.main(Test.java:53)

Now, I've dealt with JNI libraries before.  I Set my java.library.path correctly to the lwjgl folder where all of the jars and DLLS are.  And its obviously working somewhat because it found what it neede dto execute the various modes.

So why did it fail on this glClearColor?  Isn't that in the same native library?

Matzon

have you created the display prior to calling OpenGL commands?
is your system OpenGL capable ?

Trinition

Yes, indeed, I had forgotten to create the display after setting the mode.  The documentation I've found so far is sort of thin in this area, and I didnt' pay attention to it in the source I was looking at for an example.