문제

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.

도움이 되었습니까?

해결책

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".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top