[fxruby-users] problem with FXMemoryBuffer and OpenGL
Dr. Nikolaus Klepp
dr.klepp at gmx.at
Fri May 13 06:55:19 EDT 2005
Hi!
I just tried to migrate a program fom FOX 1.0 to FOX 1.2 and ran intgo this
problem (ruby 1.8.2):
FXMemoryBuffer::data does not return an array of FXColor, but the same string
I get when I call FXMemoryBuffer::to_s (it's 33 chars long). Despite
FXMemoryBuffer::[] works and I can access the individual pixels. In
consquence I can't access the bitmaps and can't build an OpenGL texture.
example:
...
img = FXPNGImage.new(@@application, nil, IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP)
...
GL::TexImage2D(GL::TEXTURE_2D,0,GL::RGBA,img.width,img.height,0,GL::RGBA
GL::UNSIGNED_BYTE,img.data.to_s)
...
works using FOX 1.0, fails using FOX 1.2.
Any idea how to solve this?
nik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20050513/d59a2ae4/attachment-0001.bin
More information about the fxruby-users
mailing list