How do you convert ICO into BMP for texturemapping on a 3D object?

I am looking for tutorial or example how to convert ICO into BMP format in memory only without saving it in disk and use it for texture mapping on a 3d square in OpenGL environment.

If you know please REPLY!!!

Waldoo

Why would you want to use an icon for a texture, and why would you ask to convert it to a BMP without saving it to disk? There’s no point in doing so when you could just load the icon as a texture… :stuck_out_tongue: But I don’t know how Windows icon files are formatted, so I can’t exactly help ya.

In Windows just use LoadImage to load the icon, then use GetIconInfo to get the bitmap handle of the icon. Copy the bitmap bits into some allocated memory, then use the icon image in memory to create a suitable texture, and upload the texture as usual.

Is there example where I could download for this?

Waldoo

I emailed you an example I put together.

Ya I got it Thank you :slight_smile: We need more nice people like you