I have an older OpenGL application using OpenGL 1.4 calls in both software and hardware modes that works fine on 32 bit XP and Win 7 but gives me issues with color depth on Windows 7 64bit. There aren't any errors but it displays fewer colors when it draws to the screen than when it draws to a bitmap. The AMD driver has the screen display set to 32bit color and when I step through the GL context creation whether for HW or SW everything appears correct with the PixelFormatDescriptor set to 8bits per color. GetDeviceCaps confirms that the screen DC is set to 32bit. I'm developing with XE but the application compiled on D2007 has the same issue. I'm using a modified TPanel component as my OpenGL window and I suspect this has something to do with this problem since a Copy to Clipboard function that copies to a bitmap using BitBlt and the same DC used by OpenGL comes up blank. Thanks, Mitch Wolberg, RockWare, Inc.
![]() |
0 |
![]() |
My bad, it turns out to be a lighting issue that I never saw in the previous version because I'm experimenting with a new color scheme. Too much lighting was washing out the contrast making it seem like their were fewer colors. The clipboard still doesn't work but I've got other code for capturing a bitmap. On 11/9/2011 1:27 PM, Mitch Wolberg wrote: > I have an older OpenGL application using OpenGL 1.4 calls in both > software and hardware modes that works fine on 32 bit XP and Win 7 but > gives me issues with color depth on Windows 7 64bit. There aren't any > errors but it displays fewer colors when it draws to the screen than > when it draws to a bitmap. The AMD driver has the screen display set to > 32bit color and when I step through the GL context creation whether for > HW or SW everything appears correct with the PixelFormatDescriptor set > to 8bits per color. GetDeviceCaps confirms that the screen DC is set to > 32bit. > > I'm developing with XE but the application compiled on D2007 has the > same issue. I'm using a modified TPanel component as my OpenGL window > and I suspect this has something to do with this problem since a Copy to > Clipboard function that copies to a bitmap using BitBlt and the same DC > used by OpenGL comes up blank. > > Thanks, > Mitch Wolberg, > RockWare, Inc.
![]() |
0 |
![]() |
"Mitch Wolberg" <mitch..at..rockware.com> wrote in message news:[email protected] > were fewer colors. The clipboard still doesn't work but I've got other > code for capturing a bitmap. I think glReadPixels is what you may want to use for that. That will give you the raw pixel data from the opengl display buffer, and you can then assign it to a bitmap & copy it to the clipboard.
![]() |
0 |
![]() |