flyingmoose has asked for the wisdom of the Perl Monks concerning the following question:

Using Perl 5.8.x on various Linux distributions including Fedora Core 1 (stock) and SuSE 8.2 (stock), I am unable to install OpenGL.pm using CPAN.

I get the usual errors about undefined symbols: example: gl_const.h: GL_COLOR_TABLE_ALPHA_SIZE_EXT undeclared

OpenGL apps still work on these boxes, as I have had great success writing C++ programs that use Glut and FreeGlut. So my OpenGL is right. The include paths are right. I just think OpenGL.pm is written to use some older headers (though I could be very wrong).

So, the question is this -- is OpenGL.pm horribly broken for these configurations, or is there a workaround?

Is there an easier and/or better OpenGL path I should be trying instead? There are numerous choices out there, but it is difficult to seperate the wheat from the chaff.

I'd love to use Perl to drive my graphics programming endeavors. My box is fast enough, and once one has tasted of the Perl, the C++ just doesn't seem as cool. The other alternative is to do something drastic like embed a Perl interpreter or use Lua -- I don't want to go there (yet) -- straight up Perl is much more fun.

  • Comment on Using OpenGL modules with modern Linux Distros?

Replies are listed 'Best First'.
Re: Using OpenGL modules with modern Linux Distros?
by chromatic (Archbishop) on Jan 28, 2004 at 22:12 UTC
      Not wanting to complain much, but that SDL module seems to be missing a lot of "example" type documentation. Can you point me to some good web sites for "Hello SDL" and "Hello SDL OpenGL" type examples, or must I reverse engineer FrozenBubble and BloodGate to learn how SDL is employed in practice?

      FrozenBubble, while a great app and a win for Perl in the games area, seems to have written a huge amount of special-use FrameBuffer code, and it would have been great if instead they wrote some generic graphics primatives to keep SDL users from always reinventing the wheel. And obviously, well, it's not OpenGL :)

      I'll take your suggestion to see how SDL::OpenGL compiles and let you know. If I recall correctly, I did manage to get this installed on my system but I had no clue how a program using it should be written. It seems that there should be a canonical rotating Gouraud shaded or lightsourced cube example somewhere, but I can't find one.

      Thanks! -- flyingmoose

        See SDL::Tutorial. It's in the snapshots, too. (I like the snapshot version better, as it dumps out example code.)