From: Jan Dvorak Date: 2008-06-20T20:51:45+09:00 Subject: Re: How to load a Texture in Ruby-Opengl On Thursday 19 June 2008 20:38:40 onionblossom@gmail.com wrote: > Hi, > > I don't get it working in Ruby. I try to load a texture which works > pretty easy in other languages like c++ and there are plenty of > examples in other languages but none for Ruby. > > The file could be any format but I like to keep it simple: ppm or raw. > Can anyone give me a hint or a snippet how to do it? It works the same way as in C or other languages, you need library (like RMagick/ImageMagick,SDL_image etc.) that decodes the image format to raw pixel data in memory (in ruby it's represented as string), then pass it to the opengl functions (glTexImage*). Jan