Hi. Does anyone have any experience using textures in Fox or FXRuby?
I've played around with the texbind.rb example in the opengl
distribution, and that works fine, but it's not Fox.
Now I'm trying to load the BMP file using FXBMPImage, and then use the
GL calls as in texbind.rb to attach the texture to my object (a square).
However, the very first GL call after initializing the FXBMPImage
segfaults. I never even get to the point of actually handing over the
image data to any GL routine.
I've got a slightly modifed version of the glviewer.rb example that
shows what I'm trying to do:
http://PATH.Berkeley.EDU/~vjoel/ruby/bug.rb (27k)
http://PATH.Berkeley.EDU/~vjoel/ruby/roadway_surface1.bmp (272k)
Put these in your FXRuby/examples dir to run them.
This is resolved, thanks to Jeroen's reminder to make the context current.
I will post a link to some sample code to read .bmp files and use them
as textures, if there is any interest.