[ruby-opengl-devel] FFI backend for ruby-opengl
andrea.fazzi at alcacoop.it
Thu Mar 26 09:59:37 EDT 2009
Il giorno gio, 26/03/2009 alle 01.53 +0100, Jan Dvorak ha scritto:
thank you for your quick answer.
> OTOH it would add dependency on FFI (and ruby-ffi), which needs to be
> compiled as well.
Pre-compiled gems for linux and win32 will be available soon.
> I'm also concerned about the performance impact of
> moving all this stuff into ruby code. IIRC the python opengl bindings
> were doing it this way and as a result were lagging behind in
> performance (i may be wrong though).
Yes, this may be true in general. But I think that this aspect should be
investigated deeper and should be supported by measurements. My first
*very* *naive* tests show a loss in performance of about 5-6%.
> Another thing is, the code that would need to be rewritten in ruby is
> like 90% of whole ruby-opengl, so instead of adding ffi as backend to
> ruby-opengl, it would be simpler to just start afresh on ffi-opengl.
Yes, you're right. However, reading the Roadmap page on the ruby-opengl
project site, it seems to me that there is a trend toward the
implementation of higher level features. Thus, provided that
performances remain acceptable, I think that delegating low level tasks
to a ffi glue code would improve interoperability and would reduce
installation pain. But of course this is my modest opinion :-)
However, the "problem" persists: there are two libraries that do almost
the same thing (ffi-opengl doing it worse of course... ). Any idea about
how to unify our efforts?
Thanks in advance.
More information about the ruby-opengl-devel