mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-13 22:12:27 +00:00
gl_shader_manager: Implement SetShaderSamplerBindings.
This commit is contained in:
parent
beddc8afd2
commit
0ca8fce9d0
1 changed files with 8 additions and 0 deletions
|
@ -38,6 +38,14 @@ void SetShaderSamplerBindings(GLuint shader) {
|
|||
cur_state.Apply();
|
||||
|
||||
// Set the texture samplers to correspond to different texture units
|
||||
for (u32 texture = 0; texture < 32; ++texture) {
|
||||
// Set the texture samplers to correspond to different texture units
|
||||
std::string uniform_name = "tex[" + std::to_string(texture) + "]";
|
||||
GLint uniform_tex = glGetUniformLocation(shader, uniform_name.c_str());
|
||||
if (uniform_tex != -1) {
|
||||
glUniform1i(uniform_tex, TextureUnits::MaxwellTexture(texture).id);
|
||||
}
|
||||
}
|
||||
|
||||
cur_state.draw.shader_program = old_program;
|
||||
cur_state.Apply();
|
||||
|
|
Loading…
Reference in a new issue