GLShaderInterface: Fix interface from createInfo not setting bindings

This is because the `glUniform1i` calls were not preceeded by `glUseProgram`
which made parameters not stick.
This commit is contained in:
Clément Foucault
2022-01-24 20:26:24 +01:00
parent 04c3b08518
commit 083de503ce

View File

@@ -364,6 +364,9 @@ GLShaderInterface::GLShaderInterface(GLuint program, const shader::ShaderCreateI
name_buffer_ = (char *)MEM_mallocN(info.interface_names_size_, "name_buffer");
uint32_t name_buffer_offset = 0;
/* Necessary to make #glUniform works. TODO(fclem) Remove. */
glUseProgram(program);
/* Attributes */
for (const ShaderCreateInfo::VertIn &attr : info.vertex_inputs_) {
copy_input_name(input, attr.name, name_buffer_, name_buffer_offset);