PbufferTest

Howdy.

I’m working on getting Pbuffer support in my application. Basically I just need multiple render targets to do things like bloom, heat shimmer, etc…

As a first step, I was messing around with PbufferTest. However I noticed that when using render-to-texture mode, it seems to be kind of borked up. It is just rendering a white rectangle. Is this a known problem?

(please see attached screenshots)

Thanks!

[quote=“anarchotron,post:1,topic:24244”]
Don’t forget to try EXT_framebuffer_object.

[quote=“anarchotron,post:1,topic:24244”]
No, you should be seeing the same thing. Works fine here, so it must be something with your setup. LWJGL version, card model, driver version please?

You think that EXT_framebuffer_object is better to use than Pbuffer?

The versions I am using are

LWJGL 0.97.1
JDK 1.5.0_04
Radeon 9800 XT
driver CATALYST 5.7

Thanks!

Ok I see that EXT_framebuffer_object is intended as a complete replacement for pbuffer, so my question about it vs. pbuffer is answered.

Now to find some good sample code :slight_smile:

Although it uses PBuffers, you might find this useful anarchotron: http://www.funkapotamus.org/crssource.zip (Uses LWJGL .97)

This is a demo I made using PBuffers that does exactly what you want. The demo effect is more like a “watergun”, however, heat shimmers and bloom effects is right along the same line.

That looks awesome, thank you!

I did end up hooking up FBOs… it was pretty easy to write a wrapper class around the setup/bind/unbind/copy functionality of the FBO. I’ve got bloom working (still a bit of ugly banding I’m working on getting rid of), and I’m starting on the adaptive gamma technique mentioned in the Shader X3 book!

Biggest problem I had was finding out the hard way that my FBO textures were required to be power-of-two. Violating this requirement generates no error, but instead generated strange, and very slow, behavior that I spent quite a while trying to figure out :slight_smile:

Can you post some sample code of your EXT_framebuffer_object LWJGL implementation ?