PDA

View Full Version : Forcing MS OpenGL implementation



devdept
01-07-2008, 09:20 AM
Hi All,


Is there a quick way - to do some tests - to force MS OpenGL Implementation on my dev machine?


Thanks,

Alberto

k_szczech
01-07-2008, 10:20 AM
When choosing pixel format you should find one with GDI_GENERIC flag set.

Personally, I use DescribePixelFormat function and look for pixel formats.

devdept
01-07-2008, 11:48 AM
Thanks k_szczech,

We have one debug function that output the following, but where I find the GDI_GENERIC?



+----+--------+--------+--------+--------+--------+--------+
| ID | Color | Alpha | Accum | Depth | Stencil| AuxBuff|
+----+--------+--------+--------+--------+--------+--------+
| 1 | 32 | 8 | 0 | 24 | 8 | 0 |
| 2 | 32 | 8 | 0 | 24 | 8 | 0 |
| 3 | 32 | 8 | 0 | 24 | 8 | 0 |
| 4 | 32 | 8 | 64 | 24 | 8 | 0 |
| 5 | 32 | 8 | 64 | 24 | 8 | 0 |
| 6 | 32 | 8 | 64 | 24 | 8 | 0 |
| 7 | 32 | 8 | 0 | 24 | 8 | 0 |
| 8 | 32 | 8 | 0 | 24 | 8 | 0 |
| 9 | 32 | 8 | 0 | 24 | 8 | 0 |
| 10 | 32 | 8 | 0 | 24 | 8 | 0 |
| 11 | 32 | 8 | 0 | 24 | 8 | 0 |
...


Thanks,

Alberto

k_szczech
01-07-2008, 12:03 PM
What you see on debug output are some of the fields of PIXELFORMATDESCRIPTOR structure. This structure is returned by DescribePixelFormat function I mentioned.

Check out Microsoft's specification of the PIXELFORMATDESCRIPTOR structure - it contains dwFlags field.

HenriH
01-07-2008, 12:31 PM
You are mistaken. It is not GDI_GENERIC, but PFD_GENERIC_FORMAT in the dwFlags member of PIXELFORMATDESCRIPTOR. If this flag is set, the pixel format is supported by the GDI software implementation.

k_szczech
01-08-2008, 03:23 AM
Yes, my mistake. I haven't been working on that part of code for a long time :)

By the way - there is also PFD_GENERIC_ACCELERATED flag that could/should be tested. Refer to PIXELFORMATDESCRIPTOR structure documentation for more info.

devdept
01-08-2008, 04:26 AM
Thanks a lot guys, now everything is clear to me.