diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-09-13 01:13:30 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-09-27 13:41:46 +0200 |
| commit | 56e0452ce0f436e7c54a49c68b272797f92a7ffe (patch) | |
| tree | 0977a9668bf338583d0ff2e552952551991897da /src/wx/gl_video_view.h | |
| parent | f802565830bed9ec9e7ad6c16ccaa7b0700625d9 (diff) | |
Add basic Texture wrapper for a GL texture.
Diffstat (limited to 'src/wx/gl_video_view.h')
| -rw-r--r-- | src/wx/gl_video_view.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 8f3f2dcb4..272198591 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -34,6 +34,23 @@ DCPOMATIC_ENABLE_WARNINGS #undef Success #undef Status + +class Texture +{ +public: + Texture (); + ~Texture (); + + Texture (Texture const&) = delete; + Texture& operator= (Texture const&) = delete; + + void bind (); + +private: + GLuint _name; +}; + + class GLVideoView : public VideoView { public: @@ -74,7 +91,7 @@ private: wxGLContext* _context; boost::atomic<wxSize> _canvas_size; - GLuint _video_texture; + std::unique_ptr<Texture> _video_texture; boost::optional<dcp::Size> _video_size; bool _have_storage; bool _vsync_enabled; |
