--- /dev/null
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2010 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
+#ifndef TRAINVIEW_H_
+#define TRAINVIEW_H_
+
+#include <msp/gl/renderbuffer.h>
+#include <msp/gl/framebuffer.h>
+#include <msp/gl/texture2d.h>
+#include <msp/gltk/panel.h>
+#include "libmarklin/train.h"
+
+class Engineer;
+
+class TrainView: public Msp::GLtk::Panel
+{
+public:
+ enum Mode
+ {
+ ROOF,
+ SIDE,
+ HEAD
+ };
+
+private:
+ Engineer &engineer;
+ const Marklin::Train &train;
+ Mode mode;
+ Msp::GL::Framebuffer fbo;
+ Msp::GL::Texture2D tex;
+ Msp::GL::Renderbuffer depth;
+ Msp::GL::Camera camera;
+ Msp::GL::Pipeline pipeline;
+ bool stale;
+
+public:
+ TrainView(Engineer &, const Marklin::Train &);
+ ~TrainView();
+
+ void set_mode(Mode);
+ void prepare();
+private:
+ virtual void button_release(int, int, unsigned);
+ void close_clicked();
+};
+
+#endif