This is a project that our university is asking us to go through (asking for help on third places is not restricted)
We have to build a 3D scene in which objects are mapped with textures.
I’m stuck where I need to load a BMP file’s data into the program.
We have to use a library that is already present in the system (forbidden to code it).
My request is :
Using fedora (gnome environment), is there a pre-built library into which a function that loads BMP files and returns a pointer to the payload is existent ?
EDIT : We are forbidden to install any additional libs, the lib must be a pre-built lib of Fedora.
Take a look at the GDK library and the funcion gdk_pixbuf_new_from_file. As you can see in the API you can use:
It’s important to check first the BMP support in GDK using:
You need a library like libpixbufloader-bmp.so.
I don’t know what library are you using to create the 3D scene, but you can get the raw pixels after load the pixbuf with gdk_pixbuf_get_pixels and then load into a surface.
Hope this help.