you could have just kept the data when you load the textures in the first place. would be easier that way, no? just place the data in another pointer or something, and don't free it after it uploads to opengl. then you have the texture objects (indices) for the card, and the actual data you already loaded stored right there.
alternatively you could just draw the browse textures in opengl too ;)
-omega -- Blackened Interactive - http://www.blackened-interactive.com FLF:Defiance - http://www.frontline2.com Wavelength - http://www.thewavelength.net
Vyacheslav Djura wrote:
thanks, but I needed to draw them on another window, without OpenGl context... as HBitmaps. And here is solution - glGetTexImage function (maybe for someone it will be usefull):
int length = width*height*4; char *image = new char[length]; glGetTexImage(target, level, GL_BGRA, GL_UNSIGNED_BYTE, image);
then you can use CreateDIBSection to create HBitmap, or create file, write BMPFILEHEADER, BMPINFOHEADER and then just write returned value and you'll have texture saved back into .bmp :)
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

