PDA

View Full Version : How do you convert ICO into BMP for texturemapping on a 3D object?



waldoo
01-22-2002, 09:57 PM
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

pATChes11
01-23-2002, 07:17 AM
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... :P But I don't know how Windows icon files are formatted, so I can't exactly help ya.

DFrey
01-23-2002, 07:50 AM
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.

waldoo
01-23-2002, 08:56 PM
Is there example where I could download for this?

Waldoo

DFrey
01-24-2002, 03:19 PM
I emailed you an example I put together.

waldoo
01-24-2002, 09:11 PM
Ya I got it Thank you :-) We need more nice people like you