]> git.tdb.fi Git - libs/gl.git/blobdiff - source/renderer.cpp
Bind textures in the modern way when shaders are used
[libs/gl.git] / source / renderer.cpp
index 76ac5846f2aad1e9417780e39d87f3c816a81088..50acd8e728c60e9531fd7b23dccc8a28cfb4a7c1 100644 (file)
@@ -265,14 +265,15 @@ void Renderer::apply_state()
        changed */
 
        bool legacy_bindings = (!state->shprog || state->shprog->uses_legacy_variables());
+       bool legacy_textures = !state->shprog;
 
        if(state->texturing)
-               state->texturing->bind();
+               state->texturing->bind(legacy_textures);
        else
        {
                Texturing::unbind();
                if(state->texture)
-                       state->texture->bind_to(0);
+                       state->texture->bind_to(0, legacy_textures);
                else
                        Texture::unbind_from(0);
        }