Discussion:
Frame Buffers and glDrawBuffers
(too old to reply)
Alex Taylor
2015-11-09 14:31:03 UTC
Permalink
Hello

I have been having trouble with a frame buffer and just receiving static(as in noise) images back on the screen. There is no feed back loop. What happens if you call GlDrawbuffers and give it two attachments, lets call them A and B and you only write too A. Will this effect attachment B ? From the code i only get a static image at the final stage and this is the situation with the buffers a the final stage.

Thanks.
Nobody
2015-11-09 20:33:39 UTC
Permalink
Post by Alex Taylor
I have been having trouble with a frame buffer and just receiving
static(as in noise) images back on the screen. There is no feed back loop.
What happens if you call GlDrawbuffers and give it two attachments, lets
call them A and B and you only write too A. Will this effect attachment B
? From the code i only get a static image at the final stage and this is
the situation with the buffers a the final stage.
When a fragment shader's main() function completes (other than by
execution of a "discard" statement), the value of each "out" variable is
written to the corresponding pixel of the associated colour buffer.

If an "out" variable isn't assigned to, its value will be undefined, but
it will still be written to the colour buffer.

IOW, either none of the buffers will be updated (if you "discard" the
fragment), or all of them will.

Loading...