summaryrefslogtreecommitdiff
path: root/src/wx/gl_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/gl_util.h')
-rw-r--r--src/wx/gl_util.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/wx/gl_util.h b/src/wx/gl_util.h
new file mode 100644
index 000000000..83dbf06d4
--- /dev/null
+++ b/src/wx/gl_util.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 2025 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ DCP-o-matic is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include <wx/wx.h>
+
+
+/* This will only build on an new-enough wxWidgets: see the comment in gl_video_view.h */
+#if wxCHECK_VERSION(3,1,0)
+
+#ifdef DCPOMATIC_OSX
+#define GL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED
+#include <OpenGL/OpenGL.h>
+#include <OpenGL/gl3.h>
+#endif
+
+#ifdef DCPOMATIC_LINUX
+#include <GL/glu.h>
+#include <GL/glext.h>
+#endif
+
+#ifdef DCPOMATIC_WINDOWS
+#include <GL/glu.h>
+#include <GL/wglext.h>
+#endif
+
+extern void check_gl_error(char const* last);
+
+#endif
+