New answers tagged


I am suprised that it was only mentioned in comments but yes you can use variable length arrays through SSBO. Here is the excerpt from wiki: On the host side: int data[SOME_SIZE]; ... GLuint ssbo; glGenBuffers(1, &ssbo); glBindBuffer(GL_SHADER_STORAGE_BUFFER, ssbo); glBufferData(GL_SHADER_STORAGE_BUFFER, sizeof(data), data‚Äč, GLenum usage); //sizeof(data) ...

Top 50 recent answers are included