[ruby-opengl-devel] FFI backend for ruby-opengl

Andrea Fazzi andrea.fazzi at alcacoop.it
Wed Mar 25 19:00:19 EDT 2009

Dear all, dear Alain

I wonder if there might be some interest in using ruby-ffi[1] as a
backend for ruby-opengl. Actually, a prototypal FFI support for opengl
already exists: ffi-opengl[2]. The idea is to use the FFI binding as a
glue code between ruby-opengl and the opengl C libraries, delegating to
ruby-opengl the high level stuff.

I'll try to summarize some of the benefits I see in this approach:

* ruby-opengl would be multi-platform and multi-implementation

The extension would work without changes on Ruby, Rubinius, JRuby (and
on any other ruby implementation that supports FFI)

* The install process would be oversimplified

  * No compilation needed anymore
  * No need to install development dependencies

* ruby-opengl code would be simpler to maintain

* low-level stuff would be separated from the high-level one:


glLightfv would be on the lower level and it would be managed by
glLight would be on the higher level and it would be managed by

I believe that there might be many benefits for the ruby-ffi project too
in joining our forces. The effort required to get a multi{platform|
implementation} and fast opengl binding will encourage the development
of some ruby-ffi features too.

Waiting for your thoughts.

[1] - http://kenai.com/projects/ruby-ffi
[2] - http://github.com/remogatto/ffi-opengl

More information about the ruby-opengl-devel mailing list