View Full Version : I can't bind two pbuffers to textures and render to a third pbuffer

08-02-2004, 11:42 AM
i'm having troubles binding the color buffers of two pbuffers to two different texture targets and use them to render into a third pbuffer. When i sample the two textures in a ARB_fp the second texture contents are equal to the first, it seems like i couldn't bind the second texture or something like that.

i'm doing something like this:

- make the third pbuffer rendering context current
- bind the first pbuffer to the first texture target
- bind the second pbuffer to the second texture target
- render something

is there any problem in doing this?

08-02-2004, 02:10 PM
is there any problem in doing this?I don't see anything wrong with that. Are you sharing lists between all the contexts involved?

08-03-2004, 03:02 AM
yes i am, is it wrong to do that?

08-03-2004, 10:16 AM
Sorry, no, there's absolutely nothing wrong with that. It was merely a suggestion, a shot in the dark to fix your problem. I generally share lists between all my PBs/RTTs and my visual.

Again, what you're trying to do should work. I'm guessing something is not setup correctly, or you have some state that's not being set, or something else entirely (hard to say). I'd build a very simple test app that does nothing more than create 3 RTTs, and render to each one using the other 2 as textures. You could also post your code here, if that's reasonable/agreeable.

08-04-2004, 01:50 PM
The code is to big to be posted, so i'll try to find the error by myself. Like you said it's probably just a state that's not being set, but the code is so big... it will be complicated to find what's wrong. But thanks anyway, i was afraid i was doing something theoricaly wrong in my code.

08-04-2004, 02:24 PM
the code is so big... it will be complicated to find what's wrong.I strongly urge you to build a small test app for this. Looking for problems like this in a big project can be an exercise in futility. I have a framework I created solely for the purpose of breaking in new extensions/ideas. It has paid for itself a hundred fold over. Besides, if it turns out to be a driver bug (heaven forbid), you'll need a simple test case for the dev relations team anyway.

08-06-2004, 05:48 AM
i found what i was doing wrong. When i was using the pbuffers as textures i didn't bind them to "real" textures. It was a stupid mistake, but it's the first time i'm working with pbuffers. :rolleyes:

08-06-2004, 11:49 AM
You should have seen my first attempts at using pbuffers - a virtual comedy of errors.