PDA

View Full Version : multiple pbuffers



clint
05-28-2003, 12:17 AM
:using one pbuffer as a texture while rendering to another pbuffer

Hi All,

I'm playing arround with rendering to textures and I'm trying to do the following:

using 2 pbuffers
-activate pbuffer1
-render a quad using the texture from pbuffer2
-render other things
-deactivate pbuffer1
swap pbuffers

I have the pbuffers set up and working properly, but I seem to be having trouble using the texture from pbuffer2 to render on the quad.

perhaps I'm not understanding exactly how pbuffers bind to textures.

Also if someone could explain the meaning of WGL_FRONT_LEFT_ARB to me that would help. I've seen the spec and other docs, but haven't found anything that explained its meaning to my satisfaction.

thanks for any help,
clint

clint
05-29-2003, 11:14 AM
If I want to render to two textures,
does having more than one pbuffer set up even make sense?

perhaps I should just have a single one set up and switch the texture it's bound to?
hmm no that doesn't seem right.

clint
06-22-2003, 03:11 PM
Hmm, thought I'd post an update incase anyone else runs across this messag with the same problem. Apparently what I wanted to do isn't possible (plese correct me if I'm wrong).

So you have a single pbuffer to use, but if you want to create another texture using the resuls of the texture you already created in the pbuffer, then you are going to have to render to the backbuffer and copy it to a texture.

It'd be nice to have two offscreen buffers for texture rendering to eleminate the need to do the copy.

The copy does seem fast in practice though.
cheers,
c