I've have a rendering setup in which I write to a Frame Buffer object attached to a texture and the rendering itself also uses the texture I'm rendering to.
Is this generally a good idea? Could there be some strange issues involved here I'm perhaps not aware of?
views:
100answers:
1
+3
A:
This will result in undefined behavior, which means it may break with any future driver version, and behave differently on different hardware. To be on the safe side, you should never render into a texture which is currently bound (i.e. which could be possibly read and written to at the same time -- this is the problem actually). Try making a copy of the texture, and render into that instead.
Take a look at the spec, specifially section 4.4.3 "Rendering When an Image of a Bound Texture Object is Also Attached to the Framebuffer"
Anteru
2009-03-04 15:22:06
Do you have any idea if it says that somewhere in the spec?
shoosh
2009-03-04 15:28:21
Read that section I added in my edit, 4.4.3
Anteru
2009-03-04 15:34:55