Pergunta

For Example when I do:

glDrawBuffer(GL_COLOR_ATTACHMENT0)

Does I have to call it on a per frame buffer basis or is it a global state for every frame buffer? The documentation is not clear about it.

Foi útil?

Solução

To quote the GL 3.3 core profile spec (section 4.2.1 "Selecting a buffer for writing"):

The state required to handle color buffer selection for each framebuffer is an integer for each supported fragment color.

This is a per-framebuffer state. Note that you never have to set any state per frame in OpenGL, as OpenGL does not even have a concept of a "frame".

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top