X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainview.h;fp=source%2Fengineer%2Ftrainview.h;h=16a1ef978ac46480099894b5521fdd139c1e7e20;hb=fcaa883538f98bac71ba1a90f98950bb2aa08d88;hp=0000000000000000000000000000000000000000;hpb=1f9af43b6ab300693c044b431e95b25422b36507;p=r2c2.git diff --git a/source/engineer/trainview.h b/source/engineer/trainview.h new file mode 100644 index 0000000..16a1ef9 --- /dev/null +++ b/source/engineer/trainview.h @@ -0,0 +1,51 @@ +/* $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 +#include +#include +#include +#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