OpenGL Wrapper Bindings

P

Peter Laurens

Hi all,

I've been getting some visualisation working using the ruby-opengl
OpenGL/GLUT wrapper.

One thing that is hampering my progress is not having a mapping from the
Ruby commands to the GLUT/GL commands, for example:

This code: "GL.Normal(x, y, z)"
Translates to this GL/GLUT call: "glNormal3f(x, y, z)"

I'm having difficulty finding a list, or rule, for these mappings. This
means I'm finding it difficult to take some plain C GLUT call, and make
the same call using the Ruby wrapper, or vice-versa.

For example, "GL.ShadeModel(GL::FLAT)" is a line from a Ruby Opengl
example, how do I translate this to a native GLUT call to look up the
documentation?

Or, another example, the GLUT call "glutSolidTetrahedron()", what is the
equivalent call for the Ruby wrapper?

Any help much appreciated, thanks for taking the time to read!

- Nex
 
G

Gregory Seidman

Hi all,

I've been getting some visualisation working using the ruby-opengl
OpenGL/GLUT wrapper.

One thing that is hampering my progress is not having a mapping from the
Ruby commands to the GLUT/GL commands, for example:

This code: "GL.Normal(x, y, z)"
Translates to this GL/GLUT call: "glNormal3f(x, y, z)" [...]
Any help much appreciated, thanks for taking the time to read!

You must be using an old version. The current version provides
GL.glNormal3f rather than GL.Normal, and so on. An easy way to find a
method is to run irb (with appropriate -r flags to require the right files)
and something like GL.public_methods.grep /shademodel/i
--Greg
 
P

Peter Laurens

Thanks for your help, I'll try installing again as my version doesn't
understand standard type calls like "GL.glNormal3f".

- Nex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top