PDA

View Full Version : floating point pixel format



phlucas
03-06-2003, 05:09 AM
Hello all,

I have the following code fragment to set up
a floating point pbuffer on an ATI Radeon 9700 pro under Windows XP:

buffer=(TCHAR*)wglGetExtensionsStringARB(hDC);
int attr__[]={WGL_SUPPORT_OPENGL_ARB,TRUE,
WGL_PIXEL_TYPE_ARB,WGL_TYPE_RGBA_FLOAT_ATI,
0};
wglChoosePixelFormatARB(hDC,(int*)attr__,NULL,128, pf,&c);
if (c==0) OutputDebugString(_T("No floating point buffer?\n"));

WGL_ATI_pixel_format_float is present in buffer, but c is set to 0
(it's 28 when I simply order WGL_TYPE_RGBA).

Is there anything else that I have to enable to get a proper floating point buffer?

NitroGL
03-06-2003, 07:46 AM
It needs to have the complete attribute set (color/z/stencil bit depth, double buffer), and floating point pixel formats can only be used with pbuffers, so you can't use them for the front buffer (only a virtual back buffer via pbuffer).