[ruby-opengl-devel] ruby-opengl and RMagick

Cassius Rosenthal cassius at xmodulation.com
Sun Oct 14 18:50:29 EDT 2007

Hello all,

I am interested in using opengl to resize images.  I have ruby-opengl
running, and in irb I'm trying to pass an RMagick image to
GL.TexImage2D, but I get a type error.  The roadmap page on the web site
says, "Add image handling wrapper for easy image handling."  Obviously
that hasn't been implemented yet, but I am encouraged that I'm not the
only one interested in functionality like that.

irb> GL.TexImage2D( GL::TEXTURE_2D, 0, 3, 150, 150, 0, GL::RGB,
GL::BYTE, @image)
TypeError: type mismatch:#<Class:0x2aaaaf9810a0>
        from (irb):27:in `TexImage2D'
        from (irb):27

Any hints on how to pass an instance of an RMagick image to GL?  Has
anybody done anything similar?


More information about the ruby-opengl-devel mailing list