Pbuffer and GL Error 1282

Hi all,

when I’m trying to render into a (float) pbuffer (tried nvidia 61.11 and 61.06 driver under linux on an FX5950 ultra) I get some problems. I’m able to successfully create a pbuffer and glGetIntegerv says to me that it has
depth bits = 24
red bits = 32
alpha bits = 32
stencil bits = 8
double buffer = 0

Now comes the problem: When I try to render something I get an OpenGL 1282 error after executing the following lines of code

glColor3d(0,1,0);
glBegin(GL_LINES);
glVertex2d(0,0);
glVertex2d(1,1);
glVertex2d(0,1);
glVertex2d(1,0);
glEnd();

Everything works well with the same code if I set up a pbuffer with RGBA 8 bit FBConfig.
(On a Geforce 6800 everything works well with the same code).

Any Ideas what could be wrong?

For glXChooseFBConfig I use the following attribs:

int attrib[] = {
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
GLX_DOUBLEBUFFER, 0,
GLX_FLOAT_COMPONENTS_NV, true,
GLX_RED_SIZE, 32,
GLX_GREEN_SIZE, 32,
GLX_BLUE_SIZE, 32,
GLX_ALPHA_SIZE, 32,
GLX_STENCIL_SIZE, 0,
GLX_DEPTH_SIZE, 0,
0 };

Yes FX5950 supports floating point pbuffers through the NV_float_buffer extension. 1282 is GL_INVALID_OPERATION and most likely indicates that there isn’t a fragment program bound. The NV_float_buffer extension requires that a fragment program to be bound when rendering to a floating point drawable.

Hope this helps… but not sure why it is simply working on the 6800.

Cheers,
–Ben

Hi Ben,

you are right, I didn’t bind a fragment program. I hoped that the fixed-function pipeline could work with the float buffer. But on FX5950 it didn’t. I didn’t really need it but I cannot see a reason why it should not work.

But on the 6800 it worked without using a fragment program. It seems that nv40 produces floating point values anyway even without binding a fragment program. Am I right? This should be stated (if it is not already) somewhere in the extension or hardware specifications.

Thanks,
Michael

NV40 does indeed do 32bit floating point throughout the pipeline. This is burried in the HW specs, but I agree the docs could be updated to make this more clear. Glad things are working for you.

Cheers,
–Ben

Hi Ben,

I’m glad to hear that NV40 does 32bit fp throughout the pipeline. But what about fp blending? I tried to do fp blending with a 32bit fp pbuffer but it was really slooooooow (seems to be software fallback). Is there a FBConfig that allows HW accelerated 32bit fp blending on NV40?

Michael

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.