Hello Guest

Could not init gl function pointers

  • 28 Replies
  • 26051 Views
*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
Could not init gl function pointers
« on: September 20, 2003, 14:43:56 »
Hi!

I"m trying to run the tests, but I get the following error:

karl:~/lwjgl/lwjgl-0.7$ java -cp .:lwjgl_test.jar:lwjgl.jar org.lwjgl.test.opengl.Game
Setting display mode to 640 x 480 x 24 @0Hz
Created display.
Failed to create OpenGL due to java.lang.Exception: Could not init gl function pointers

What am I doing wrong?
(btw: there are ;s instead of :s in the README file. That's wrong, sin't it?)

Thanks,

-- Karl

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Could not init gl function pointers
« Reply #1 on: September 20, 2003, 15:25:42 »
Try to run your application  with the -ea flag (and be sure to have lwjgl_d in your path). But most likely, the problem is missing OpenGL drivers.

The ; is sort-of-wrong - windows use ; for separating paths, while linux and mac use :.

 - elias

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
Well, my drivers are OK
« Reply #2 on: September 20, 2003, 21:18:32 »
I'm using the binary ATI drivers under debian woody, and they work fine with other games.

Enabling assertions doesn't give any interesting output (I don't have the exact output, since I'm at another computer right now).

When starting the game my monitor flashes (like it does when changing resolutions), so I guess it finds the libraries. OpenGL is installed normally and liblwjgl(_d)?.so is in the current directory. Adding . to the library path doesn't help, either.

Alien Flux doesn't work also (which isn't very surprising).

Thanks,

-- Karl

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Could not init gl function pointers
« Reply #3 on: September 21, 2003, 07:35:58 »
Ok, I just added more verbose debug output. And you're right, it looks like it can find the OGL library, but it simply fails to load some (needed) symbols. Here you go (use with -ea):

http://oddlabs.com/liblwjgl_d.so

 - elias

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
You're right.
« Reply #4 on: September 21, 2003, 10:26:50 »
It really can't find some symbols. Here's the output:

Removed 0 duplicate displaymodes
Setting display mode to 640 x 480 x 24 @0Hz
Created display.
XF86VidMode extension version 2.1
Saved width, height 1280, 1024
XF86VidMode extension version 2.1
XF86VidMode extension version 2.1
XF86VidMode extension version 2.1
Mode 0: 1280x1024
Mode 1: 1024x768
Mode 2: 800x600
Mode 3: 640x480
Pixel format chosen sizes: r = 8, g = 8, b = 8, a = 8, depth = 24, stencil = 0
Created window
Could not locate symbol glPointParameterfARB
Could not locate symbol glPointParameterfvARB
Could not locate symbol glSetInvarianceEXT
Could not locate symbol glActiveTexture
Could not locate symbol glClientActiveTexture
Could not locate symbol glMultiTexCoord1d
Could not locate symbol glMultiTexCoord1dv
Could not locate symbol glMultiTexCoord1f
Could not locate symbol glMultiTexCoord1fv
Could not locate symbol glMultiTexCoord1i
Could not locate symbol glMultiTexCoord1iv
Could not locate symbol glMultiTexCoord1s
Could not locate symbol glMultiTexCoord1sv
Could not locate symbol glMultiTexCoord2d
Could not locate symbol glMultiTexCoord2dv
Could not locate symbol glMultiTexCoord2f
Could not locate symbol glMultiTexCoord2fv
Could not locate symbol glMultiTexCoord2i
Could not locate symbol glMultiTexCoord2iv
Could not locate symbol glMultiTexCoord2s
Could not locate symbol glMultiTexCoord2sv
Could not locate symbol glMultiTexCoord3d
Could not locate symbol glMultiTexCoord3dv
Could not locate symbol glMultiTexCoord3f
Could not locate symbol glMultiTexCoord3fv
Could not locate symbol glMultiTexCoord3i
Could not locate symbol glMultiTexCoord3iv
Could not locate symbol glMultiTexCoord3s
Could not locate symbol glMultiTexCoord3sv
Could not locate symbol glMultiTexCoord4d
Could not locate symbol glMultiTexCoord4dv
Could not locate symbol glMultiTexCoord4f
Could not locate symbol glMultiTexCoord4fv
Could not locate symbol glMultiTexCoord4i
Could not locate symbol glMultiTexCoord4iv
Could not locate symbol glMultiTexCoord4s
Could not locate symbol glMultiTexCoord4sv
Could not locate symbol glLoadTransposeMatrixf
Could not locate symbol glLoadTransposeMatrixd
Could not locate symbol glMultTransposeMatrixf
Could not locate symbol glMultTransposeMatrixd
Could not locate symbol glCompressedTexImage3D
Could not locate symbol glCompressedTexImage2D
Could not locate symbol glCompressedTexImage1D
Could not locate symbol glCompressedTexSubImage3D
Could not locate symbol glCompressedTexSubImage2D
Could not locate symbol glCompressedTexSubImage1D
Could not locate symbol glGetCompressedTexImage
Could not locate symbol glSampleCoverage
XF86VidMode extension version 2.1
Mode 0: 1280x1024

I'll see whether I can find some more recent drivers. It's strange that my current drivers don't support these features (and that no other game required these).

Thanks,

-- Karl

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Could not init gl function pointers
« Reply #5 on: September 21, 2003, 11:22:58 »
From where I'm standing, it looks like the driver is lying about it's version and some extensions. LWJGL tries to load GL 1.3 features but fails. What's the output from glxinfo (especially the reported OpenGL version)?

To make LWJGL more robust against those kind of drivers, we could implement it so it merely disables the features instead of failing completely. That is, when the driver reports OpenGL 1.3 but some OGL 1.3 symbols fails to load, LWJGL falls back to OpenGL 1.2 (or whatever succeeds). What do you think?

 - elias

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
Some output again
« Reply #6 on: September 21, 2003, 11:45:11 »
Here's the glxinfo output:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_ATI_pixel_format_float,
    GLX_ATI_render_texture
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon 9700 Pentium 4 (SSE2)
OpenGL version string: 1.3 (X4.2.0-3.2.5)
OpenGL extensions:
<snip>
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess
<snip>

And here's the output of fglrxinfo, which comes with the driver:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: Radeon 9700 Pentium 4 (SSE2)
OpenGL version string: 1.3 (X4.2.0-3.2.5)

Using the latest drivers doesn't help, so this is probably a problem affacting all Linux/ATI users (well, except those having quite old cards, which are supported by by open-source drivers).

Bye,

-- Karl

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
Could not init gl function pointers
« Reply #7 on: September 22, 2003, 08:29:21 »
Ok, LWJGL now ignores advertised extensions with missing symbols (and dumps a notice on std out). You should be able to use LWJGL even on lying drivers now:

 http://oddlabs.com/liblwjgl_d.so

 - elias

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
OK
« Reply #8 on: September 22, 2003, 10:56:51 »
This seems to work.

Thanks!

-- Karl

*

Offline princec

  • *****
  • 1932
    • Puppygames
Could not init gl function pointers
« Reply #9 on: September 22, 2003, 11:57:29 »
I'll update the Webstart Alien Flux with it in a moment.

Cas :)

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
Alien Flux problems
« Reply #10 on: September 23, 2003, 16:29:28 »
Alien Flux crashes on the loading screen.

Alien Flux.log:
Tue Sep 23 13:50:40 CEST 2003   Starting Alien Flux 1.4f
Tue Sep 23 13:50:41 CEST 2003   Failed to reserve Nvidia ram.
Tue Sep 23 13:50:41 CEST 2003   Failed to create controller:java.lang.Exception: The controller could not be created.
Tue Sep 23 13:50:42 CEST 2003   No bindings found, so creating default bindings.

Alien Flux_err.log:
java.io.InvalidClassException: com.shavenpuppy.jglib.Font; local class incompatible: stream classdesc serialVersionUID = 4, local class serialVersionUID = 3
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
Tue Sep 23 13:50:42 CEST 2003      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
Tue Sep 23 13:50:42 CEST 2003      at com.shavenpuppy.jglib.opengl.GLFont.doCreate(GLFont.java:140)
Tue Sep 23 13:50:42 CEST 2003      at com.shavenpuppy.jglib.Resources.allocate(Resources.java:435)
Tue Sep 23 13:50:42 CEST 2003      at com.shavenpuppy.jglib.Resource.create(Resource.java:118)
Tue Sep 23 13:50:42 CEST 2003      at com.shavenpuppy.jglib.Resources.get(Resources.java:107)
Tue Sep 23 13:50:42 CEST 2003      at xap.gui.Interface.init(Interface.java:125)
Tue Sep 23 13:50:42 CEST 2003      at xap.Game.init(Game.java:711)
Tue Sep 23 13:50:42 CEST 2003      at xap.Game.main(Game.java:377)
Tue Sep 23 13:50:42 CEST 2003      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Tue Sep 23 13:50:42 CEST 2003      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Tue Sep 23 13:50:42 CEST 2003      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Tue Sep 23 13:50:42 CEST 2003      at java.lang.reflect.Method.invoke(Method.java:324)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.executeApplication(Launcher.java:739)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.executeMainClass(Launcher.java:701)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.continueLaunch(Launcher.java:584)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:328)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:166)
Tue Sep 23 13:50:42 CEST 2003      at com.sun.javaws.Launcher.run(Launcher.java:134)
Tue Sep 23 13:50:42 CEST 2003      at java.lang.Thread.run(Thread.java:536)

Am I doing something wrong, or is this a bug?

-- Karl

*

Offline princec

  • *****
  • 1932
    • Puppygames
Could not init gl function pointers
« Reply #11 on: September 23, 2003, 16:32:06 »
oh sh*t, I forgot to upload the new resources file.
<edit>Right, fixed it. Have another go. 7.5mb of patching to do :D

Cas :)

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
Works
« Reply #12 on: September 23, 2003, 22:02:54 »
It works fine now. Thanks!

btw: is there any reason, why webstart download only at ~2kbyte/s (I have a 8kbyte/s connection)?

-- Karl

*

Offline princec

  • *****
  • 1932
    • Puppygames
Could not init gl function pointers
« Reply #13 on: September 23, 2003, 22:07:43 »
My website appears to have been running at very low speed all day. I'll have to investigate.

Cas :)

*

Offline karlb

  • *
  • 12
    • http://www.linux-games.com
oops
« Reply #14 on: September 24, 2003, 09:23:56 »
Alien Flux still crashes, but I get to the main menu this time (that's why I thought it would run...). It crashes when I try to start a game. Here's the log (error log is empty):

Wed Sep 24 11:23:10 CEST 2003   Starting Alien Flux 1.4f
Wed Sep 24 11:23:10 CEST 2003   Failed to reserve Nvidia ram.
Wed Sep 24 11:23:11 CEST 2003   Failed to create controller:java.lang.Exception: The controller could not be created.
Wed Sep 24 11:23:12 CEST 2003   No bindings found, so creating default bindings.
java.lang.NumberFormatException: For input string: "Un"
   at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
   at java.lang.Integer.parseInt(Integer.java:426)
   at com.shavenpuppy.jglib.util.HexDecoder.decode(HexDecoder.java:58)
   at xap.RegistrationDetails.fromPreferences(RegistrationDetails.java:167)
   at xap.Game.checkRegistrationDetails(Game.java:1188)
   at xap.Game.main(Game.java:399)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at com.sun.javaws.Launcher.executeApplication(Launcher.java:739)
   at com.sun.javaws.Launcher.executeMainClass(Launcher.java:701)
   at com.sun.javaws.Launcher.continueLaunch(Launcher.java:584)
   at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:328)
   at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:166)
   at com.sun.javaws.Launcher.run(Launcher.java:134)
   at java.lang.Thread.run(Thread.java:536)