PDA

View Full Version : new ATI drivers



bonzaj
04-19-2003, 03:01 AM
Hello

I downloaded new ATI drivers (7.84 Catalyst 3.2) (Before I had Catalyst 3.0)
and all my previous programs are no longer working.

I've localized the problem. It's in the piAttributes (InitTable) within wglChoosePixelFormatARB.
The returned nPixelFormat is 0xcccccccc so I probably mismatched something in that table.
It's a weird thing because when I'm using multisampling everything is running OK. The old method
that uses ChoosePixelFormat (for pfd listed below) return nPixelFormat = 3. I know that the sickest
answer to my problem is to call wglGetPixelFormatAttribivARB with iPixelFormat set to 3 and all
attributes in the query. Then maybe I'll find a mismatched one. But I believe that there is
someone who had the same problem and resolved it in very simple way.


static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW|PFD_SUPPORT_OPENGL|PFD_DOUBLEBU FFER,
PFD_TYPE_RGBA,
32,
0,0,0,0,0,0,
0,0,
0,0,0,0,0,
32,
0,
0,
PFD_MAIN_PLANE,
0,
0,0,0
};


int InitTable[11*2+2]={
WGL_DRAW_TO_WINDOW_ARB, 1,
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_SUPPORT_OPENGL_ARB, 1,
WGL_DOUBLE_BUFFER_ARB, 1,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB, 24,
WGL_ALPHA_BITS_ARB, 8,
WGL_DEPTH_BITS_ARB, 24,
WGL_STENCIL_BITS_ARB, 8,
0, 0,
0, 0,
0, 0
};


if(Antialiasing)
{
InitTable[9*2]=WGL_SAMPLE_BUFFERS_ARB;
InitTable[9*2+1]=1;
InitTable[10*2]=WGL_SAMPLES_ARB;
InitTable[10*2+1]=Antialiasing;
}

result=wglChoosePixelFormatARB(hDC,
InitTable,
0,
1,
&nPixelFormat,
&numPixelFormat);

if(result)
{
SetPixelFormat(hDC,nPixelFormat,&pfd);
return;
}

nPixelFormat = ChoosePixelFormat(hDC,&pfd);
SetPixelFormat(hDC,nPixelFormat,&pfd);

Thanks Bonzaj

bonzaj
04-20-2003, 07:32 AM
Ok It was a minor bug sorry.