|
|
Thank you very much.
Here is the OpenGL texture class which uses FLTK:
On Saturday, October 10, 2020 at 3:46:48 PM UTC+5:30 Manolo wrote:
You can get an Fl_RGB_Image object from a .png file with: and similarly with .jpeg: and .bmp:
In all these cases, the resulting Fl_RGB_Image object, supposing you call it img, will tell you
if its RGB (img->d() == 3) or RGBA (img->d() == 4)and its width (img->w()) and height (img->h()). In some cases, the row length is bigger than img->w()*img->d(). In that case img->ld() is != 0 and gives that length. Finally, you get the address of the first byte of the RGB or RGBA data by img->array of type const unsigned char *. That should put you in the position to build a texture.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/79febdd4-4f51-4fe7-b822-0a3f075fe0c5n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |