[gtk: 2/3] Fix detection of OpenGL 3.3 core GL_ARB_timer_query.



commit 0969d06925a791ed8faee94e067707a9830bba49
Author: David Hogan <david q hogan gmail com>
Date:   Thu Feb 13 07:55:59 2020 +1100

    Fix detection of OpenGL 3.3 core GL_ARB_timer_query.
    
    Some systems (notably macOS) will not allow enumeration of an extension that has been promoted to core 
OpenGL for context in use. This change assumes that GL_ARB_timer_query is available on OpenGL 3.3+.
    
    I could not find definitive information on whether GL_ARB_debug_output or GL_KHR_debug have been added to 
core. Other extensions in use were addressed by https://gitlab.gnome.org/GNOME/gtk/merge_requests/1422 .

 gsk/gl/gskglprofiler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglprofiler.c b/gsk/gl/gskglprofiler.c
index 95f5a794a5..0262bd20f8 100644
--- a/gsk/gl/gskglprofiler.c
+++ b/gsk/gl/gskglprofiler.c
@@ -109,7 +109,7 @@ gsk_gl_profiler_init (GskGLProfiler *self)
   glGenQueries (N_QUERIES, self->gl_queries);
 
   self->first_frame = TRUE;
-  self->has_timer = epoxy_has_gl_extension ("GL_ARB_timer_query");
+  self->has_timer = epoxy_gl_version () >= 33 || epoxy_has_gl_extension ("GL_ARB_timer_query");
 }
 
 GskGLProfiler *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]