diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-04-19 23:30:46 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-04-20 21:18:19 +0200 |
| commit | d921f2dae281aa6a787e693aea9d6446b6122295 (patch) | |
| tree | 07697d11e884d6ea0968f026ef4efbafec8646c9 /src/wx/gl_video_view.cc | |
| parent | d618ea99fcf29a1d7384819eb92e865ea69fd3a2 (diff) | |
Move some more GL setup into GLView.
Diffstat (limited to 'src/wx/gl_video_view.cc')
| -rw-r--r-- | src/wx/gl_video_view.cc | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc index dc3846e80..c24736570 100644 --- a/src/wx/gl_video_view.cc +++ b/src/wx/gl_video_view.cc @@ -119,15 +119,7 @@ GLVideoView::check_for_butler_errors() void GLVideoView::update() { - if (!_canvas->IsShownOnScreen()) { - return; - } - - /* It appears important to do this from the GUI thread; if we do it from the GL thread - * on Linux we get strange failures to create the context for any version of GL higher - * than 3.2. - */ - ensure_context(); + GLView::update(); #ifdef DCPOMATIC_OSX /* macOS gives errors if we don't do this (and therefore [NSOpenGLContext setView:]) from the main thread */ @@ -136,12 +128,6 @@ GLVideoView::update() _setup_shaders_done = true; } #endif - - start_thread_if_required(); - - request_one_shot(); - - rethrow(); } @@ -292,20 +278,6 @@ enum class FragmentType }; -void -GLVideoView::ensure_context() -{ - if (!_context) { - wxGLContextAttrs attrs; - attrs.PlatformDefaults().CoreProfile().OGLVersion(4, 1).EndList(); - _context = new wxGLContext(_canvas, nullptr, &attrs); - if (!_context->IsOK()) { - boost::throw_exception(GLError("Making GL context", -1)); - } - } -} - - /* Offset and number of indices for the things in the indices array below */ static constexpr int indices_video_texture_offset = 0; static constexpr int indices_video_texture_number = 6; |
