summaryrefslogtreecommitdiff
path: root/src/wx/gl_video_view.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-06 21:17:56 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-06 21:17:56 +0200
commit3185f6330dc6ccc8ff86a0925602880c67951213 (patch)
treeba8ec5ff9b27bf59de0a5f65ea5f4252cb02d936 /src/wx/gl_video_view.h
parentcfa0a559a8feec79d1e8acd20d4b11ef8cd01513 (diff)
Support optimised rendering of YUV420P in OpenGL.
Diffstat (limited to 'src/wx/gl_video_view.h')
-rw-r--r--src/wx/gl_video_view.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index 69de7b76f..25750b64b 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -51,18 +51,19 @@ LIBDCP_ENABLE_WARNINGS
class Texture
{
public:
- Texture (GLint unpack_alignment);
+ Texture(GLint unpack_alignment, int unit = 0);
~Texture ();
Texture (Texture const&) = delete;
Texture& operator= (Texture const&) = delete;
void bind ();
- void set (std::shared_ptr<const Image> image);
+ void set(std::shared_ptr<const Image> image, int component = 0);
private:
GLuint _name;
GLint _unpack_alignment;
+ int _unit;
boost::optional<dcp::Size> _size;
};
@@ -137,7 +138,7 @@ private:
boost::atomic<wxSize> _canvas_size;
boost::atomic<bool> _rec2020;
- std::unique_ptr<Texture> _video_texture;
+ std::vector<std::unique_ptr<Texture>> _video_textures;
std::unique_ptr<Texture> _subtitle_texture;
bool _have_subtitle_to_render = false;
bool _vsync_enabled;