I am developing a software for windows. This software runs over a maximized window. I use OpenGL for drawing textures, lines and other graphic primitives, but I also draw menus, panels wich are drawn with GDI.
I have found this problem in vista and HD3200. I have tested HD 1600, HD4650 and NVIDIA 8800GTS both in XP and Vista and they all work fine.
Please, because HD3200 is a very extended graphic card in cheap laptops it is very interesting for us to solve this problem.
Does anybody know how can we contact ATI driver support to solve this issue?
Does the problem appear on a desktop version of the HD3200?
What version of the Catalyst drivers are you using?
Go here http://support.amd.com/us/gpudownload/Pages/index.aspx for drivers.
Could you provide a link where I can dload the app so that I may test it on our 3200 hardware.
Please include Steps to install and repro.
You can download the file in the next link:
The file is compressed in 7-zip format.
To view the program in english move the mouse to the right corner of the screen and clic "Configuración", then clic "Aspecto" tab and select "Idioma" list to "English" and then clic "Aceptar" button in the botton of the window.
Now you will see the world chart. By default the program draws everything in GDI mode.
For testing you have to setup the program in OpenGL mode. In order to do this move the mouse to the right corner of the screen and clic "Configuration", then clic "General" and in "Visuals" list select "Antialiased hardware" and then clic "Ok" button in the botton of the window.
The program is now running in a maximized OpenGL + GDI mixed mode. To reproduce the error we use a laptop with a HD3200 integrated graphics chipset with Catalyst 9.7 to 9.9 versions (Compaq 6735s).
The problem you will notice is that with the related graphics card, drivers, Windows Vista, and program configuration, menus and toolbars will not be rendered in the program. In HD1600, HD4650 and Nvidia 8600GTS it works in XP and Vista.
Thank you in advance.
I made a new version only with basic features of our application in Visual Studio 2008. It weights 260Kb. Source code can be downloaded from:
You can draw lines and other graphic primitives in both GDI+ and OpenGL. Application starts in GDI+ mode and you can swith to OpenGL mode later. As soon you execute it you will find a black screen. When you move the cursor to the upper corner a toolbar is displayed. This toolbar contains functions for switching to OpenGL mode, and drawing graphics primitives.Text in OpenGL is disabled.
To unselect a graphic primitive press right button. To close the app press Alt+F4.
I have been investigating and I have found that the problem is in SetPixelFormat function:
int pixelFormatIndex = 0;
pixelFormatIndex = WGL.ChoosePixelFormat(m_DC, ref pfd);
if (pixelFormatIndex == 0) return false;
if (WGL.SetPixelFormat(m_DC, pixelFormatIndex, ref pfd) == 0) return false;
It seems that in HD3200 ChoosePixelFormat doesn't choose a PixelFormat compatible with GDI when I maximize the window.
When I set pixelFormatIndex to 1 and then call SetPixelFormat everything works fine in fullscreen mode. The problem is that this index is incompatible in other hardware. Basically this pixel format can be seen as single buffered, so the problem seems to be that HD3200 doesn't support GDI in double buffered full screen windows.
I tried to use PFD_SUPPORT_GDI flag when I create PIXELFORMATDESCRIPTOR structure but it doesn't work
Does anyone know how can I select a double buffered GDI compatible pixel format for HD3200 hardware?
You can reproduce this problem in Catalyst 9.7, 9.8, 9.9, 9.10
int pixelFormatIndex = 0; pixelFormatIndex = WGL.ChoosePixelFormat(m_DC, ref pfd); if (pixelFormatIndex == 0) return false; if (WGL.SetPixelFormat(m_DC, pixelFormatIndex, ref pfd) == 0) return false;
After discovering what this issue was based in, I'm going to answer myself.
Windows specification tells clearly that GDI is not supported on OpenGL double buffered window:
So it is supported only if the driver implements it.