Click to See Complete Forum and Search --> : Using OpenGL to render to a image list bitmap!


April 26th, 1999, 01:50 AM
Hello,

I have made a class that renders OpenGL graphics to a bitmap in memory. Besides using this class to blit bitmaps to windows I would like to have OpenGL bitmaps included in my image lists (image lists is part of the common controls DLL). So, using a 16x16 pixel 16 bit color image list I try to add a ditto OpenGL bitmap using the ImageList_Add macro. The call returns with a correct index but the result is an all black image when I add the image to my toolbars. I do not use masks for this image list and adding icons to the image list works fine. Using the ImageList_LoadBitmap macro to load a bitmap from a resource also works. So what is wrong? It is not a OpenGL problem: I have not been able to use any bitmap create by the CreateCompatibleBitmap or CreateDIBSection functions and then colored by FillRect. Any comments?

Thanks