]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/track.h
Render tracks through GL::Objects
[r2c2.git] / source / 3d / track.h
index 7b8c23565f3024ecb1c954f6839a7f3c48fd8925..757955af21ff111f7fdfe3094761b3858f66dcaa 100644 (file)
@@ -9,9 +9,8 @@ Distributed under the GPL
 #define R2C2_3D_TRACK_H_
 
 #include <list>
-#include <msp/gl/renderable.h>
-#include <msp/gl/vertexarray.h>
-#include <msp/gl/vertexarraybuilder.h>
+#include <msp/gl/matrix.h>
+#include <msp/gl/objectinstance.h>
 #include "libr2c2/track.h"
 #include "libr2c2/trackpart.h"
 #include "object.h"
@@ -23,7 +22,7 @@ class Layout3D;
 class Path3D;
 class TrackType3D;
 
-class Track3D: public Object3D, public Msp::GL::Renderable
+class Track3D: public Object3D, public Msp::GL::ObjectInstance
 {
 private:
        Layout3D &layout;
@@ -45,8 +44,9 @@ public:
        virtual Point get_node() const;
        virtual bool is_visible() const { return true; }
 
-       void apply_matrix() const;
-       virtual void render(const Msp::GL::Tag &) const;
+       Msp::GL::Matrix get_matrix() const;
+       virtual void setup_render(const Msp::GL::Tag &) const;
+       virtual void finish_render(const Msp::GL::Tag &) const;
 };
 
 } // namespace R2C2