pixel format for pBuffer (render to texture)

okie I am stuck at here.

The problem is if I pass WGL_BIND_TO_TEXTURE_RGBA_ARB or WGL_BIND_TO_TEXTURE_RGB_ARB. I get back count == 0 which means I don’t get any piexel format :(.

int attr[] =
{

WGL_SUPPORT_OPENGL_ARB, TRUE,
WGL_DRAW_TO_PBUFFER_ARB, TRUE,
WGL_BIND_TO_TEXTURE_RGBA_ARB, TRUE,
WGL_RED_BITS_ARB, 8,
WGL_GREEN_BITS_ARB, 8,
WGL_BLUE_BITS_ARB, 8,
WGL_ALPHA_BITS_ARB, 8,
WGL_DEPTH_BITS_ARB, 24,
WGL_DOUBLE_BUFFER_ARB, FALSE,
0,0
};

float fAttributes[] = {0,0};

wglChoosePixelFormatARB(DeviceContext,attr, fAttributes, 1,&PixelFormat,&count);

Please Help me out !_!

I guess you should prefer using FBOs instead of pbuffers as far as you can.