This is the parameters for my pbuffer:
How you can see I already specify 32 bits per color channel and
the ati token for the float pixel format
int piAttribIList[20]= {
WGL_DRAW_TO_PBUFFER_ARB, 1,
WGL_RED_BITS_ARB, 32,
WGL_GREEN_BITS_ARB, 32,
WGL_BLUE_BITS_ARB, 32,
WGL_ALPHA_BITS_ARB, 32,
WGL_DEPTH_BITS_ARB, 24,
WGL_STENCIL_BITS_ARB, 0,
WGL_PIXEL_TYPE_ARB,WGL_TYPE_RGBA_FLOAT_ATI,
0,0
};
To read pixels and put it in an array I call the function:
glPixelStorei(GL_PACK_ALIGNMENT,4);
glReadPixels(0,0,width,height,GL_RGBA,GL_FLOAT,array);
If I print the pixel format using:
glGetIntegerv(GL_RED_BITS,&(bits[0]));
glGetIntegerv(GL_GREEN_BITS,&(bits[1]));
glGetIntegerv(GL_BLUE_BITS,&(bits[2]));
glGetIntegerv(GL_ALPHA_BITS,&(bits[3]));
glGetIntegerv(GL_DEPTH_BITS,&(bits[4]));
glGetIntegerv(GL_STENCIL_BITS,&(bits[5]));
the pixelformat is actually which that I request(i.e. 32,32,32,32,24,0) but
when I use the pbuffer 0.50000 magically became 0.50196.