Drawing to an offscreen float pbuffer

Hi,
I’m trying to draw to an offscreen float pbuffer (32 bits per channel with alpha), but every time I try to do a drawing operation (glBegin(anything) or glDrawArrays()) i get the “invalid operation” OpenGL error. If i use 8 bits per channel no error will occur. What’s the matter? I’ve checked the choose pixel format attribs and the create PBuffer attribs over and over but I can’t find the problem. Will someone help me, please? Thanks.

Caran

Drawing into float buffers only works with fragment programs.

That’s ok. I’m actually using fragment programs but I have to draw a quad (glBegin(GL_QUADS)) on the entire buffer to force the fragment program to run for every pixel. But, as I already said, glBegin gives me an “invalid operation” error.

You’re sure that it’s nothing from before the glBegin?
You haven’t called glGetError in between glBegin and glEnd?
Show some code!

The code i pretty complex, but I’ve called glGetError just before glBegin and it showed no error. Before that there is just window creation and extensions initialization. I’ve tried to use the same code from the constructor of the RenderTexture class by Mark J. Harris and the same error occurred. I’m going crazy!