]> git.localhorst.tv Git - blobs.git/commitdiff
old glm
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Nov 2017 21:39:57 +0000 (22:39 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Mon, 20 Nov 2017 21:39:57 +0000 (22:39 +0100)
*sigh*

src/ui/widgets.cpp

index ffaeab8317737e7bd659d09bbc3d874cd39227ed..fb2ef74922d578595a06b976c76516e0ffe233ed 100644 (file)
@@ -108,10 +108,10 @@ void Meter::Draw(app::Assets &assets, graphics::Viewport &viewport) noexcept {
 
        if (value > 0.0f) {
                glm::vec3 top_left(glm::vec2(TopLeft()) + padding + glm::vec2(border), Position().z);
-               glm::vec3 actual_size(size.x * value, size.y, 1.0f);
+               glm::vec2 actual_size(size.x * value, size.y);
 
                assets.shaders.plain_color.SetM(glm::translate(align(Gravity::NORTH_WEST, actual_size, top_left))
-                       * glm::scale(actual_size));
+                       * glm::scale(glm::vec3(actual_size, 1.0f)));
                assets.shaders.plain_color.SetColor(fill_color);
                assets.shaders.plain_color.DrawRect();
        }