[ruby-opengl-devel] Re : opinions on rubygl

minh thu noteed at gmail.com
Fri Sep 1 06:46:38 EDT 2006


hi,

here's my feeling :

1/
just to remind you/us that opengl is a *low* level api. so this
emphases the point about namespace issue : the places where names must
be nice/rubyish are at a higher level that our bindings.
if we want to provide rubyish style, it must be an option for the user
to use it or not.

2/
otoh, (i said this because John mentioned this off-list) we can let
people -- those who already know a bit or a lot about opengl -- use
the rubyish style quite easily by providing a good doc : for example,
a mapping from C style to rubyish style and a clear explanation of the
name conversion scheme we adopted.

3/
finaly, i think that, even in the rubyish version, we have to provide
the user the possibility to require only opengl, without glut. Imagine
a wonderful new rubyforge project where some really cool guys want to
build a ruby-written toolkit targeted to opengl development : they
won't want to include glut but they will do something along the line
of
require 'opengl' # our opengl bindings, without glut
require 'glx' # some other bindings for xlib programming with opengl

cheers,
thu

2006/9/1, Robert Krimen <grin.k1tt3n at gmail.com>:
> On 8/31/06, John Gabriele <jmg3000 at gmail.com> wrote:
>
> >
> > Hm. It also occurs to me that, if we went for the all lowercase names
> > without the gl/glu/glut prefixes, when you do that "include Gl, Glu,
> > Glut", you'd be polluting your namespace quite a bit. For graphics
> > folks, they may already have methods with names like vertex, material,
> > draw_pixels, get, scale, rotate, look_at, enable, and so on. Same goes
> > for the way rubygl turns those constant names into un-prefixed symbols
> > (:alpha, :rgb, etc.). Looks nice at first, but may turn into a
> > nuisance later.
> >
> > Yeah, that could actually turn into a mess, and then folks probably
> > just wouldn't bother with the "include" statement anymore, which
> > kinda' defeats the purpose of trying to make it so you don't have to
> > prefix everything with a module name.
> >
> > Thanks.
> >
>
>
> Great point, I didn't think of that, but that would definitely be an issue.
> I've had some struggles myself
> with the ruby namespace, and it wasn't fun.
>
> Rob
>
>


More information about the ruby-opengl-devel mailing list