]> git.tdb.fi Git - libs/gl.git/blobdiff - source/text.cpp
Refresh lighting and culling uniforms if the camera changes in pop_state
[libs/gl.git] / source / text.cpp
index 03421f5457c5ed3385548034115a6e18e1933269..cb39a695dcb6095d931cf68564c52115ad03e445 100644 (file)
@@ -23,7 +23,7 @@ void Text::set_technique(const Technique *tech)
        if(tech)
        {
                technique = *tech;
-               technique.replace_texture("diffusemap", font.get_texture());
+               technique.replace_texture("diffuse_map", font.get_texture());
                object.set_technique(&technique);
        }
        else
@@ -71,6 +71,9 @@ void Text::set_alignment(HorizontalAlign ha, VerticalAlign va)
 
 void Text::set_alignment(float h, float v)
 {
+       if(h==horz_align && -v==vert_offset)
+               return;
+
        float horz_adjust = (horz_align-h)*width;
        float vert_adjust = -v-vert_offset;
        horz_align = h;