]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/overlay.h
Keep UI better in sync with the clock
[r2c2.git] / source / 3d / overlay.h
index eac51bef810687807ade2e4784108e5d161bf961..7e327c74a37dc0d99c04ab5840aa8a92fd06c4eb 100644 (file)
@@ -1,20 +1,12 @@
-/* $Id$
+#ifndef R2C2_3D_OVERLAY_H_
+#define R2C2_3D_OVERLAY_H_
 
-This file is part of the MSP Märklin suite
-Copyright © 2010 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
-#ifndef MARKLIN3D_OVERLAY_H_
-#define MARKLIN3D_OVERLAY_H_
-
-#include <msp/gbase/window.h>
 #include <msp/gl/camera.h>
 #include <msp/gl/font.h>
 #include <msp/gl/mesh.h>
 #include <msp/gl/renderable.h>
 
-namespace Marklin {
+namespace R2C2 {
 
 class Object3D;
 
@@ -27,18 +19,17 @@ private:
                std::string label;
                float width;
                Msp::GL::Mesh background;
+               Msp::GL::Mesh text;
 
                Icon();
        };
 
-       const Msp::Graphics::Window &window;
-       const Msp::GL::Camera &camera;
        const Msp::GL::Font &font;
        std::map<std::string, Msp::GL::Mesh *> graphics;
        std::map<const Object3D *, Icon *> icons;
 
 public:
-       Overlay3D(const Msp::Graphics::Window &, const Msp::GL::Camera &, const Msp::GL::Font &);
+       Overlay3D(const Msp::GL::Font &);
        ~Overlay3D();
 
        void set_label(const Object3D &, const std::string &);
@@ -47,7 +38,7 @@ public:
        void clear_graphics(const Object3D &);
        void clear(const Object3D &);
 
-       virtual void render(const Msp::GL::Tag &) const;
+       virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
 
 private:
        Icon &get_icon(const Object3D &);
@@ -55,6 +46,6 @@ private:
        void update_icon(Icon &);
 };
 
-} // namespace Marklin
+} // namespace R2C2
 
 #endif