summaryrefslogtreecommitdiff
path: root/src/wx/gl_video_view.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-29 12:33:08 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-30 00:49:35 +0200
commita855b3030e511c130992dec8894e0d96fc811d97 (patch)
tree7e22531163d8313747fa6eb8ea743eed116a4956 /src/wx/gl_video_view.h
parent9751270721fe4560eae0f53ac1e42ad0ebc80028 (diff)
Only support GLVideoView when building with wxWidgets >= 3.1.0.
Diffstat (limited to 'src/wx/gl_video_view.h')
-rw-r--r--src/wx/gl_video_view.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index d7f8429af..7ef7b565a 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -18,14 +18,25 @@
*/
-#include "video_view.h"
-#include "lib/signaller.h"
-#include "lib/position.h"
+
#include "lib/warnings.h"
+
DCPOMATIC_DISABLE_WARNINGS
#include <wx/glcanvas.h>
#include <wx/wx.h>
DCPOMATIC_ENABLE_WARNINGS
+
+/* The OpenGL API in wxWidgets 3.0.x is sufficiently different to make it awkward to support,
+ * and I think it may even have things missing that we require (e.g. the attributes parameter
+ * to wxGLContext). Hence we only support the GLVideoView on wxWidgets 3.1.0 and higher
+ * (which only excludes the old macOS builds, since wxWidgets 3.1.x does not support macOS
+ * 10.9 or earlier).
+ */
+#if wxCHECK_VERSION(3,1,0)
+
+#include "video_view.h"
+#include "lib/signaller.h"
+#include "lib/position.h"
#include <dcp/util.h>
#include <boost/atomic.hpp>
#include <boost/thread.hpp>
@@ -140,3 +151,5 @@ private:
std::map<GLenum, std::string> _information;
};
+
+#endif