   Convert IDirect3DTexture9 to GDI HBITMAPs
  I have an IDirect3DTexture9 that needs to be converted to (maybe an HBitmap?) or something that GDI can draw out to a window. I just can't seem to convert the actual RGB data of the IDirect3DTexture9 to an acceptable format for the GDI. I'm new to GDI, so source examples would be great. Thanks!   
  I only recommend you try doing this if you enjoy punishing yourself. GDI=pain. [wink]This page has a reasonably good overview of the steps involved. It's most efficient if you create a surface and use SetDIBits() but it is pretty fiddly getting all of the BGR24's encoded correctly (inc. alignment).Alternatively you can follow similar steps and cheat with SetPixel() which is much slower but hides much of the GDI complexity for you.As for converting the format - I'm pretty sure GDI DIB's are BGR24, which is backwards to direct3d, so if you have a D3DFMT_X8R8G8B8 it's as simple as swapping the R and B bytes. For 16bit formats it gets much hairier and you need to scale up from 5 or 6 bits to 8 and reorder - a simple bit shift can work, but for quality you may want a more sophisticated algorithm.hthJack   ;  I'm Doomed!!! Thanks!   