what is pbuffer

hi,i want to transfer the data from frames buffer to the system memory ,but from a paper i find pbuffer is a good one to store and modify the data from frames buffer,it’s very convenience and has a good speed,is it really?i am a new one to study OpenGl and Cg,i have no idea of pbuffer,what is pbuffer and how to use it?does it need some head files else before using it? I use GeForce 6600 GT.
thank you very much for your help! :confused:

A PBuffer is an offscreen rendering context. But since EXT_framebuffer_object extension PBuffer are obsolete. EXT_framebuffer_object completely replaces the ugly PBuffer API. You can get more information about PBuffer and EXT_framebuffer_object at http://oss.sgi.com/projects/ogl-sample/registry/

“A PBuffer is an offscreen rendering context.”

False. A Pbuffer is an off-screen drawing surface or framebuffer. A rendering context is a totally different thing- it’s a record of the OpenGL state variables.

If I had a nickel for everytime I’ve heard someone confuse rendering contexts and drawing surfaces…
:slight_smile:

-Brian

Rendering to a PBuffer requires a context switch (hence the thrill of FBO’s which require no such switch).

For this reason PBuffers are often regarded as an offscreen rendering context.

either way, it’s all symantics.

strictly speaking, a context switch isn’t required for a pbuffer.

Indeed, but that is very rarely the case.

HI,thank all of you very much!!!I really appreciate your help!

But i still can’t get it clearly. :frowning:
my question is:

(1)how to get the head files and libs of opengl 1.5,from the vender of the graphics card or nVidia?

(2)i want to deal with the data in z-buffer, how should i do?you konw the speed is very important,i am afraid use glreadpixels() can’t achive it,so would you like to give me a better method?thank you. :smiley:

Louvie

You can get the latest header files from here:
http://oss.sgi.com/projects/ogl-sample/registry/

Most likely you only need glext.h.

There are no updated libraries for OpenGL >= 1.2. You have to get the entry points using the extension loading mechanism or use an extension loading library like GLEW. Search the forums, this has been discussed a few times recently.

For using the depth buffer contents, I suggest using the EXT_framebuffer_object extension and render to a depth texture. Then you can use this texture for whatever you want.

If that’s not enough for you and you really have to transfer data to system memory, you could have a look at the ARB_pixel_buffer_object extension for a little speedup, but you should not expect high performance out of this, the AGP bus is very slow for GPU->CPU transfer.

Originally posted by Brian Paul:
False. A Pbuffer is an off-screen drawing surface or framebuffer. A rendering context is a totally different thing- it’s a record of the OpenGL state variables.

If I had a nickel for everytime I’ve heard someone confuse rendering contexts and drawing surfaces…
:slight_smile:

-Brian[/QB]
Oh, sorry. I didn’t read much into PBuffer API…