Perl and OpenGL

M

Martin Mohr

Hello,

which OpenGL binding for Perl would you recommend?

I see that there are at least three different modules: OpenGL,
OpenGL::Simple, SDL::OpenGL (also PDL::Graphics::OpenGL).

* OpenGL has the advantage that also the text related GLUT functions are
implemented, but I cannot get it compiled on Linux (for Windows there
is a ppm at bribes).

* OpenGL::Simple compiles fine here, but doesn't support all GLUT
functions like the above mentioned glutBitmapCharacter.

* SDL::OpenGL also builds fine, has other means of displaying text and
supports much much more.

OpenGL::Simple and SDL have been updated a bit more recently than pure
OpenGL, which seems dead.

Any opinions? My app should run on Windows and Linux.

Ciao
Martin
 
M

Martin Mohr

Martin said:
which OpenGL binding for Perl would you recommend?

Hello again,
let me rephrase my question:

SDL is the way to go, right?

Ciao
Martin
 
J

jmg3000

Martin said:
Hello again,
let me rephrase my question:

SDL is the way to go, right?

Ciao
Martin

No no Martin. Your original question was very good.

It's interesting that there seems to be quite a bit of duplication of
effort here. Personally, I tend to choose which free software to use
based on quality of documentation, and whether or not users can get
some reasonable amount of help on the mailing list.

Please keep digging and let us know what you find out! :)

Thanks,
---John
 
M

Martin Mohr

Please keep digging and let us know what you find out! :)

After having created three different versions of my OpenGL program now,
I can conclude that I am not completely happy with any of the three
tested modules:

OpenGL
* Rather complete coverage of GL and GLUT API
(as in: has everything I need)
* Doesn't build on Linux here, ppm for Windows available
* Seems unmaintained

OpenGL::Simple and OpenGL::Simple::GLUT
* Builds fine on Linux here, ppm for Windows available
* Lacks some parts of GLUT which I could need
* Uses 'perlified' polymorphic functions instead of the C-ish
Vertex3f,Vertex3d etc.
* Last version about a year old

SDL::OpenGL
* Binary packages for Linux and Windows available;
doesn't build easily
* Doesn't use or support GLUT, but has other ways of creating
windows etc.
* Uses polymorphic functions as OpenGL::Simple above
* Has quite some bugs, for example in glMultMatrix
* Last version about a year old

Since GLUT seems outdated, I believe that SDL is the most modern
approach. Also there is already a (partial) SDL interface for Parrot,
which could also give some indications about endurance.

During my tests, I also found that it is quite easy to combine these
modules. (I also found that it is quite easy to do so accidentally...)
This is the way I will probably go now, picking the cherries from each
of the interfaces.

If somebody would bother to comment, I would still be very happy. Is
OpenGL generally so much out of fashion?

Ciao
Martin
 
J

jmg3000

Martin said:
[snip]

If somebody would bother to comment, I would still be very happy. Is
OpenGL generally so much out of fashion?

Thanks for the reviews Martin.

Dunno if OpenGL is "out of fashion". More likely that folks are just
waiting for Perl6 before updating projects they plan to switch over
anyway. For example, poking around, I see that chromatic had some
involvement with SDL::OpenGL, but work there seems to have tapered off.
However, you can see how much work he's putting into Perl6 (i.e., a
lot).

---John
 

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,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top