PDA

View Full Version : what is pbuffer



Louvie
08-16-2005, 09:33 PM
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:

Corrail
08-17-2005, 12:49 AM
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/

Brian Paul
08-18-2005, 09:09 AM
"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...
:)

-Brian

Aeluned
08-18-2005, 10:25 AM
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.

Brolingstanz
08-18-2005, 03:08 PM
strictly speaking, a context switch isn't required for a pbuffer.

Aeluned
08-19-2005, 04:59 AM
Indeed, but that is very rarely the case.

Louvie
08-20-2005, 06:00 PM
HI,thank all of you very much!!!I really appreciate your help!

But i still can't get it clearly. :(
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. :D

Louvie

Overmind
08-21-2005, 12:29 AM
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.

Corrail
08-21-2005, 12:25 PM
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...
:)

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