[ruby-opengl-devel] Re : Requirements and Design

John Gabriele jmg3000 at gmail.com
Sat Sep 2 14:21:30 EDT 2006

On 9/2/06, minh thu <noteed at gmail.com> wrote:
> hi,
> for swig, it's ok for me.


> for the different versions stuff, i was not talking about opengl
> version but ruby version (swig seems to handle them).

Ah, I see.

I'd figured that the wrapper was pretty straightforward, and that we
wouldn't bother trying to cater to older versions of Ruby. Also,
personally, I haven't been using Ruby long enough to know how previous
versions differ from 1.8.

> for the GL/Gl discussion, i think i was misunderstanding something...
> now, if i understand correctly, you say 'GL' for 'GL/...' and you say
> 'Gl' for 'Gl.gl...' ?

I'm still learning how the directory layout looks for extension
modules distributed as gems. The "GL" in "require 'GL/gl'" refers to
that. It may turn out that the extra GL directory is extraneous and
not needed. Not sure. We don't currently have a "GL" directory
anywhere in the source code, and we're currently not anywhere near to
having gems yet, of course. :)

The actual extension modules will have filenames like "gl.so",
"glu.so", and "glut.so". You leave off the ".so" in the `require`
statement: `require 'GL/gl'` or `require 'gl'`.

The modules named in the extension module C source code would be "Gl",
"Glu", and "Glut". Those are the names as someone would refer to them
in their own Ruby source code, as in `include Gl` or `Gl.glFooBar(
Gl::GL_FOO_BAR )`.

This will all be in the tutorial soon.


More information about the ruby-opengl-devel mailing list