diff --git a/src/graphics/texture_shader.hpp b/src/graphics/texture_shader.hpp index 7707448c5..244c78b7e 100644 --- a/src/graphics/texture_shader.hpp +++ b/src/graphics/texture_shader.hpp @@ -171,7 +171,11 @@ public: template void setTextureUnitsImpl(GLuint tex_id, TexIds... args) { +#if defined(USE_GLES2) + if (CVS->getGLSLVersion() >= 300) +#else if (CVS->getGLSLVersion() >= 330) +#endif { glActiveTexture(GL_TEXTURE0 + m_texture_units[N]); glBindTexture(m_texture_type[N], tex_id);