]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Refactor the rendering code
[netvis.git] / source / netvis.h
index fd1b73cddc57440a38e7a3fc3ad48203fd1d9a5c..3739d330ec941de08c03c2698a576269bcfa4b7a 100644 (file)
@@ -42,7 +42,7 @@ private:
        std::map<unsigned, Host *> hosts;
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
-       std::map<unsigned, Port> ports;
+       std::map<unsigned, Port *> ports;
        bool draw_labels;
        bool blend;
 
@@ -51,16 +51,16 @@ private:
        unsigned frames;
        float fps;
 
-       Msp::Debug::Profiler profiler;
-
 public:
        NetVis(int, char **);
        ~NetVis();
 
        const Msp::GL::Font &get_font() const { return *font; }
        const std::map<unsigned, Host *> &get_hosts() const { return hosts; }
+       const std::map<unsigned, Port *> &get_ports() const { return ports; }
 private:
        virtual void tick();
+       void render();
        Host &get_host(unsigned);
        Msp::GL::Color generate_color(bool) const;
        const Port &get_port(unsigned);