I try to enumerate, how many pixelformats the driver gives me, via this code:
int iNum_PFs = 0;
int iPFResults[8];
memset(&iPFResults, 0, sizeof(iPFResults));
int iPFAttributes[8];
memset(&iPFAttributes, 0, sizeof(iPFAttributes));
You see I use the parameter 1 after hDC.
I saw in a NV PDF file, that they used 0 there.
If I do this, the return value for the number of PFs is zero, which can´t be right .
Any ideas and is my solution OK or will there be problems if I use the 1 there (because the 1 is the first pixelformat)?
WGL_NUMBER_PIXEL_FORMATS_ARB
The number of pixel formats for the device context. The <iLayerPlane> and <iPixelFormat> parameters are ignored if this attribute is specified.
While the spec could have been worded better I think it’s pretty much obvious anyway that the intention was that you should only need to provide a valid pixel format index if the parameter you’re requesting requires it.