vaiorabbit / ruby-opengl

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

Fix NoMethodError when calling wglGetProcAddress #29

Closed larskanis closed 6 years ago

larskanis commented 6 years ago

This stood out when calling glGenRenderbuffers() on Windows. Error was:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/opengl-bindings-1.6.5/lib/opengl_common.rb:45:in `rescue in bind_command': undefined method `wglGetProcAddress' for OpenGL:Module (NoMethodError)
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/opengl-bindings-1.6.5/lib/opengl_common.rb:38:in `bind_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/opengl-bindings-1.6.5/lib/opengl_common.rb:33:in `get_command'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/opengl-bindings-1.6.5/lib/opengl_command.rb:4298:in `glGenRenderbuffers'
larskanis commented 6 years ago

@vaiorabbit thank you very much for the great work on this gem!

I think it's the better approach compared to the opengl gem. I therefore recommend migrating to this gem now: https://github.com/larskanis/opengl

vaiorabbit commented 6 years ago

Hi. I just released new gem. Now your work is available as version 1.6.6 https://rubygems.org/gems/opengl-bindings/versions/1.6.6 . Thank you!