vaiorabbit / ruby-opengl

Yet another OpenGL wrapper for Ruby (and wrapper code generator).
Other
86 stars 11 forks source link

Error running on Arch Linux #2

Closed reedlaw closed 10 years ago

reedlaw commented 10 years ago

I set the load paths like so:

OpenGL.load_dll( 'libGL.so', '/usr/lib' )
GLFW.load_dll( 'libglfw.so', '/usr/lib' )

But I get this error:

/home/reed/.gem/ruby/2.1.0/gems/opengl-bindings-1.3.5/lib/opengl_command.rb:344:in `call': no implicit conversion from nil to integer (TypeError)
    from /home/reed/.gem/ruby/2.1.0/gems/opengl-bindings-1.3.5/lib/opengl_command.rb:344:in `glViewport'
    from lib/render.rb:32:in `<main>'

I'm using sample/simple.rb with only the load paths modified.

reedlaw commented 10 years ago

I just tried the sample/simple_glut.rb and it works fine.

vaiorabbit commented 10 years ago

Thank you for reporting. I don't have any spare PC, so I just set up Arch Linux on VirtualBox (for Mac OS X).

With Mesa driver and GLFW installed, I can run simple.rb (http://pic.twitter.com/TCJkRK5LbH).

On the other hand, I can't get simple_glut.rb work. The program returns some warnings and error reporting:

~/.gem/ruby/2.1.0/gems/opengl-bindings-1.3.5/sample $ ruby simple_glut.rb
...(snip)...
OpenGL Warning: glTestFenceNV not found in mesa table
...(snip)...
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9ace0e8
OpenGL Warning: Retry with 0x8002 returned 0 visuals
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0x9ace5f8
OpenGL Warning: Retry with 0x8002 returned 0 visuals
freeglut  ERROR:  Internal error <visualInfo could not be retrieved from FBConfig> in function fgOpenWindow
~/.gem/ruby/2.1.0/gems/opengl-bindings-1.3.5/sample  $

('# pacman -S glut' installs freeglut 2.8.1)

The results may vary depending on graphics drivers, X Window System setup, etc.

reedlaw commented 10 years ago

I used the package freeglut which provides 2.8.1-1. I'm using the propriety Nvidia drivers on 64 bit Arch.

Here's something I made with your gem: https://github.com/reedlaw/game_of_life

It's very easy to use. Thanks for the great library!

And feel free to close this issue. I don't need GLFW after all.

vaiorabbit commented 10 years ago
And feel free to close this issue. I don't need GLFW after all.

OK. Anyway, I'm glad to hear that the library is also usable on Linux. Thanks!