summaryrefslogtreecommitdiff
path: root/src/wx/gl_video_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-12 01:26:47 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commite9ae050b0b15c91c3f591ad84938e60d271357b3 (patch)
tree334279b2851e5b80068c4bf2669f498c0ca0cbc7 /src/wx/gl_video_view.cc
parent4f4561c4b5bb1e8a2fa8e673606d18ffa25aec6c (diff)
Fix GL information fetching.
Diffstat (limited to 'src/wx/gl_video_view.cc')
-rw-r--r--src/wx/gl_video_view.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 16d42499b..7c26ae616 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -277,6 +277,18 @@ GLVideoView::setup_shaders ()
}
#endif
+ auto get_information = [this](GLenum name) {
+ auto s = glGetString (name);
+ if (s) {
+ _information[name] = std::string (reinterpret_cast<char const *>(s));
+ }
+ };
+
+ get_information (GL_VENDOR);
+ get_information (GL_RENDERER);
+ get_information (GL_VERSION);
+ get_information (GL_SHADING_LANGUAGE_VERSION);
+
unsigned int indices[] = {
0, 1, 3, // texture triangle #1
1, 2, 3, // texture triangle #2