mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 13:02:46 +00:00
gl_state: Skip null texture binds
glBindTextureUnit doesn't support null textures. Skip binding these.
This commit is contained in:
parent
919ac2c4d3
commit
e3d7334be9
|
@ -420,10 +420,14 @@ void OpenGLState::ApplyTextures() {
|
|||
const std::size_t size = std::size(textures);
|
||||
for (std::size_t i = 0; i < size; ++i) {
|
||||
if (UpdateValue(cur_state.textures[i], textures[i])) {
|
||||
// BindTextureUnit doesn't support binding null textures, skip those binds.
|
||||
// TODO(Rodrigo): Stop using null textures
|
||||
if (textures[i] != 0) {
|
||||
glBindTextureUnit(static_cast<GLuint>(i), textures[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OpenGLState::ApplySamplers() {
|
||||
const std::size_t size = std::size(samplers);
|
||||
|
|
Loading…
Reference in a new issue