将缓冲区绑定到多个目标

Binding a buffer to multiple targets

我可以将一个 opengl 缓冲区对象绑定到多个目标吗?例如,我将缓冲区绑定到目标数组缓冲区,然后将同一缓冲区绑定到 SHADER_STORAGE_BUFFER 或某个 otger 目标,缓冲区绑定到第一秒还是两个目标?

OpenGL 规范:

void [gl]BindBuffer( enum target, uint buffer ); If the buffer object named buffer has not been previously bound, the GL creates a new state vector, initialized with a zero-sized memory buffer and comprising all the state and with the same initial values listed in table...

BindBuffer may also be used to bind an existing buffer object. If the bind is successful no change is made to the state of the newly bound buffer object, and any previous binding to target is broken.

所以,是的:您可以使用相同的名称(与 glGenBuffers 创建的名称相同)并使用不同的用途绑定此现有的绑定缓冲区(target 在 OpenGL 的说法).但是我想不出这样做的理由。