我试图创建一组SSBO(每个对象实例一个),但由于该行,它们都被链接:
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, m_ssbo);
有没有办法制作SSBO增量版以防止多个实例访问同一个缓冲区?
我的SSBO代码:
// SSBO
glGenBuffers(1, &m_ssbo);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, m_ssbo);
glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(m_blocks), m_blocks, GL_STATIC_DRAW);
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, m_ssbo);
glBindBuffer(GL_SHADER_STORAGE_BUFFER, 0);