From 1dbcfdaf81778fcd4635c6ecd62b89477f69f0d8 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 28 Jul 2020 14:02:08 +0200 Subject: render/gles2: remove gles2_procs Move the global into wlr_gles2_renderer. This removes global state and allows us to have multiple renderers with different GL loaders. --- include/render/gles2.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'include/render') diff --git a/include/render/gles2.h b/include/render/gles2.h index a68170bc..a64aa77c 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -14,17 +14,6 @@ #include #include -struct wlr_gles2_procs { - PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; - PFNGLDEBUGMESSAGECALLBACKKHRPROC glDebugMessageCallbackKHR; - PFNGLDEBUGMESSAGECONTROLKHRPROC glDebugMessageControlKHR; - PFNGLPOPDEBUGGROUPKHRPROC glPopDebugGroupKHR; - PFNGLPUSHDEBUGGROUPKHRPROC glPushDebugGroupKHR; - PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES; -}; - -extern struct wlr_gles2_procs gles2_procs; - struct wlr_gles2_pixel_format { enum wl_shm_format wl_format; GLint gl_format, gl_type; @@ -55,6 +44,15 @@ struct wlr_gles2_renderer { bool egl_image_oes; } exts; + struct { + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; + PFNGLDEBUGMESSAGECALLBACKKHRPROC glDebugMessageCallbackKHR; + PFNGLDEBUGMESSAGECONTROLKHRPROC glDebugMessageControlKHR; + PFNGLPOPDEBUGGROUPKHRPROC glPopDebugGroupKHR; + PFNGLPUSHDEBUGGROUPKHRPROC glPushDebugGroupKHR; + PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES; + } procs; + struct { struct { GLuint program; -- cgit v1.2.3