Hello,
I use multisample anti-aliasing. It is working on nVidia and ATI cards with a classical pixel format (attributes).
I am using an existing code and I wanted to use the same attributes with and without mutisample. Without mutisample I use an existing classical PIXELFORMATDESCRIPTOR. And with mutisample I use attributes that seems the same (<-- beginner approach…). This works well with nvidia but not with ATI.
Do you see something wrong in my attribute variable ?
Or what is the correct approach to obtain the same rendering (color, transparency…) with and without multisample AA ?
I post below the attribute variable and the pixelFormatDescriptor.
Thanks for your advices.
int iAttributes[] =
{
WGL_DRAW_TO_WINDOW_ARB,GL_TRUE,
WGL_SUPPORT_OPENGL_ARB,GL_TRUE,
WGL_DOUBLE_BUFFER_ARB,GL_TRUE,
WGL_SWAP_METHOD_ARB, WGL_SWAP_COPY_ARB,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
WGL_ACCELERATION_ARB,WGL_FULL_ACCELERATION_ARB,
WGL_COLOR_BITS_ARB,32,
WGL_RED_BITS_ARB, 8,
WGL_RED_SHIFT_ARB, 24,
WGL_GREEN_BITS_ARB, 8,
WGL_GREEN_SHIFT_ARB, 16,
WGL_BLUE_BITS_ARB, 8,
WGL_BLUE_SHIFT_ARB, 8,
WGL_ALPHA_BITS_ARB,8,
WGL_ALPHA_SHIFT_ARB, 0,
WGL_ACCUM_BITS_ARB, 0,
WGL_ACCUM_RED_BITS_ARB, 0,
WGL_ACCUM_GREEN_BITS_ARB, 0,
WGL_ACCUM_BLUE_BITS_ARB, 0,
WGL_ACCUM_ALPHA_BITS_ARB, 0,
WGL_DEPTH_BITS_ARB,24,
WGL_STENCIL_BITS_ARB,1,
WGL_AUX_BUFFERS_ARB, 0,
WGL_SAMPLE_BUFFERS_ARB,GL_TRUE,
WGL_SAMPLES_ARB,(int)AASize,
0,0
};
PIXELFORMATDESCRIPTOR pixelDescriptor;
pixelDescriptor.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pixelDescriptor.nVersion = 1;
pixelDescriptor.dwFlags
= PFD_DRAW_TO_WINDOW
| PFD_SUPPORT_OPENGL
| PFD_DOUBLEBUFFER
| PFD_SWAP_COPY
| PFD_STEREO_DONTCARE
;
pixelDescriptor.iPixelType = PFD_TYPE_RGBA;
pixelDescriptor.cColorBits = 32;
pixelDescriptor.cRedBits = 8;
pixelDescriptor.cRedShift = 24;
pixelDescriptor.cGreenBits = 8;
pixelDescriptor.cGreenShift = 16;
pixelDescriptor.cBlueBits = 8;
pixelDescriptor.cBlueShift = 8;
pixelDescriptor.cAlphaBits = 8;
pixelDescriptor.cAlphaShift = 0;
pixelDescriptor.cAccumBits = 0;
pixelDescriptor.cAccumRedBits = 0;
pixelDescriptor.cAccumGreenBits = 0;
pixelDescriptor.cAccumBlueBits = 0;
pixelDescriptor.cAccumAlphaBits = 0;
pixelDescriptor.cDepthBits = 24;
pixelDescriptor.cStencilBits = 1;
pixelDescriptor.cAuxBuffers = 0;
pixelDescriptor.iLayerType = PFD_MAIN_PLANE;
pixelDescriptor.bReserved = 0;
pixelDescriptor.dwLayerMask = 0;
pixelDescriptor.dwVisibleMask = 0;
pixelDescriptor.dwDamageMask = 0;