Advertisement

loading/saving textures

Started by February 22, 2003 10:56 AM
0 comments, last by Leroy1891 22 years ago
i''m trying to make it so that my texture class can hold the pixel info about a texture and save it to file. so far so good. but i also want to be able to load that info and make the texture w/o any use of a bmp,tga,etc file. does anyone know how to load/save the AUX_RGBImageRec structure. i know it has sizeX and sizeY but i don''t know how to do the data part.
The data part is just an array of byte. AUX_RGBImageRec data is using RGB 24 bpp format so the data is arranged as 3 bytes per pixel. The first byte is the Red component, the second is the Green, and the third is the Blue component. To figure out the size of the array do the following: sizeX x sizeY x 3.

Hope that helps.

This topic is closed to new replies.

Advertisement