Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

OpenGL in Perl and textures

by japhy (Canon)
on Feb 26, 2005 at 04:03 UTC ( [id://434723]=perlquestion: print w/replies, xml ) Need Help??

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

Because my GD approach to creating a 3-D maze is running a little more slowly than I'd like, I'm considering using OpenGL. There's little to no documentation that I've found about using Perl's OpenGL interface (such as through OpenGL). My specific question is about using textures: how do I do this in Perl? I've never even done it in C, but I'm hoping someone out there has. What sort of image can be used?
_____________________________________________________
Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Replies are listed 'Best First'.
Re: OpenGL in Perl and textures
by Corion (Patriarch) on Feb 26, 2005 at 08:27 UTC

    I have had good success with OpenGL::Simple and OpenGL::Simple::GLUT. The other stuff is hard to compile and mimics the (C oriented) OpenGL API while OpenGL::Simple trades efficiency against ease of use.

Re: OpenGL in Perl and textures
by Anonymous Monk on Feb 26, 2005 at 04:12 UTC
Re: OpenGL in Perl and textures
by holli (Abbot) on Feb 27, 2005 at 11:20 UTC
      And with PDL::Graphics::TriD you can also display 3D data using PDL. See demo 3d in perldl for more.
Re: OpenGL in Perl and textures
by perlfan (Vicar) on Feb 27, 2005 at 00:59 UTC
    You can use any type of image as long as you can read in the file and create a 2d array of rgb(and alpha) values for each pixel. I am not sure about Perl's interface.

    This .tgz file contains some C++ code I did for a class I took a while back used textures in BMP format. HFieldBDE.tgz

    Note, the code use's VRCO's cavelibs, so it won't work out of the box, but the textures stuff is still relevant.
Re: OpenGL in Perl and textures
by drfrog (Deacon) on Feb 27, 2005 at 06:38 UTC
Re: OpenGL in Perl and textures
by digitalnoises (Initiate) on Feb 28, 2005 at 01:41 UTC
    Did you look at the "Building 3D Engines In Perl" Perl.com article by Geoff Broadwell?

    It is relevant to building a 3D maze program, with textures, using Perl and OpenGL. You might want to read it.

    Part1: http://www.perl.com/pub/a/2004/12/01/3d_engine.html

    Part2: http://www.perl.com/pub/a/2004/12/29/3d_engine.html

      POGL's OpenGL::Image provides a portable method for loading/saving images/textures - by sharing buffers between the GPU and common imaging libraries like ImageMagick.
Re: OpenGL in Perl and textures
by JohnMG (Beadle) on Oct 08, 2005 at 21:30 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://434723]
Approved by Old_Gray_Bear
Front-paged by Courage
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-19 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found