|
|
|
@ -202,6 +202,20 @@ void OpenGLState::Apply() const {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Constbuffers
|
|
|
|
|
for (u32 stage = 0; stage < draw.const_buffers.size(); ++stage) {
|
|
|
|
|
for (u32 buffer_id = 0; buffer_id < draw.const_buffers[stage].size(); ++buffer_id) {
|
|
|
|
|
auto& current = cur_state.draw.const_buffers[stage][buffer_id];
|
|
|
|
|
auto& new_state = draw.const_buffers[stage][buffer_id];
|
|
|
|
|
if (current.enabled != new_state.enabled || current.bindpoint != new_state.bindpoint ||
|
|
|
|
|
current.ssbo != new_state.ssbo) {
|
|
|
|
|
if (new_state.enabled) {
|
|
|
|
|
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, new_state.bindpoint, new_state.ssbo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Lighting LUTs
|
|
|
|
|
if (lighting_lut.texture_buffer != cur_state.lighting_lut.texture_buffer) {
|
|
|
|
|
glActiveTexture(TextureUnits::LightingLUT.Enum());
|
|
|
|
|