vaiorabbit / ruby-opengl

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

Order of require #3

Closed alyssaBiasi closed 7 years ago

alyssaBiasi commented 10 years ago

Hi, Thanks for this wrapper! It took me a long time to find one that's actually being maintained.

Just thought I'd make you aware of a problem that I ran into. Whenever I tried to run one of your samples, I'd get the following error:

teapot.rb:10:in `<main>': undefined method `load_dll' for OpenGL:Module (NoMethodError)

Which confused me because the same call worked in the utils/setup_dll.rb script. In the end, I realised that the order in which everything is required matters.

In the samples you have:

require 'opengl'
require 'glfw'

Which I had to change to :

require 'glfw'
require 'opengl'

I'm not sure if this problem is isolated to me, but just thought I'd let you know :0)

vaiorabbit commented 10 years ago

Hi, Though I have no time to reproduce your problem right now, more information will be helpful to examine this later:

Thanks.

alyssaBiasi commented 10 years ago

Here you go.

OS: Mac OSX 10.9.2 Ruby version: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.1.0] Installation: via gem Usage: I was just trying to run a sample so..

$ cd ruby-opengl/sample
$ ruby simple.rb