PDA

View Full Version : render to texture: storage ?



divide
04-04-2004, 06:17 AM
Does "render to texture" just make a texture point to the pbuffer or does this technique really write directly into a texture allocated memory ?
What I want is rendering multiple texture and working with them simultaneously. So if the "render to texture" just make a texture point to the pbuffer it will not help me, since a new render in pbuffer will juste overwrite the previous texture.
How does this actually work ?

Mazy
04-04-2004, 06:45 AM
how it works behind the scenes i dont know, but you should have one pbuffer for each texture you need simultaneously.

ZbuffeR
04-04-2004, 09:32 AM
I am not sure of how it is implemented, but it is possible to work with several pbuffers.

For implementation details on windows, you can check how I managed to do that :
http://www.chez.com/dedebuffer/

The file doing what you need is RENDER.C and don't forget that this code just works, and was not written to be a nice tutorial.

I hope it can help you however.

divide
04-04-2004, 10:14 PM
Thanks for the answers. I didn't knew it was possible to create multiple pbuffer. I hope switching from one pbuffer to the other is not too much time consuming.