Add FilmViewer::time_until_next_frame.
[dcpomatic.git] / src / wx / gl_video_view.h
index cdc9fd530ae3045157cdcf003d19421355df145d..ba4c7cfdc92df3a32afbc9642f3de5d8264b8fdc 100644 (file)
 #include <wx/glcanvas.h>
 #include <dcp/util.h>
 #include <boost/shared_ptr.hpp>
-
 #undef None
 #undef Success
 
 class GLVideoView : public VideoView
 {
 public:
-       GLVideoView (wxWindow* parent);
+       GLVideoView (FilmViewer* viewer, wxWindow* parent);
        ~GLVideoView ();
 
        void set_image (boost::shared_ptr<const Image> image);
        wxWindow* get () const {
                return _canvas;
        }
+       void update ();
+
+       bool vsync_enabled () const {
+               return _vsync_enabled;
+       }
 
 private:
-        void paint (wxPaintEvent& event);
+        void paint ();
+        void draw ();
 
        wxGLCanvas* _canvas;
         wxGLContext* _context;
         GLuint _id;
         boost::optional<dcp::Size> _size;
+       bool _vsync_enabled;
 };