diff options
author | Simon Ser <contact@emersion.fr> | 2020-07-28 14:02:08 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-07-28 06:59:07 -0600 |
commit | 1dbcfdaf81778fcd4635c6ecd62b89477f69f0d8 (patch) | |
tree | ec99a7a92a62545a34393a85aa0a9e0f507dd4be /include/render | |
parent | 62da61716f28754a2d3b7151348e1ea40bc6cf66 (diff) |
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.
Diffstat (limited to 'include/render')
-rw-r--r-- | include/render/gles2.h | 20 |
1 files changed, 9 insertions, 11 deletions
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 <wlr/render/wlr_texture.h> #include <wlr/util/log.h> -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; @@ -56,6 +45,15 @@ struct wlr_gles2_renderer { } exts; struct { + PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES; + PFNGLDEBUGMESSAGECALLBACKKHRPROC glDebugMessageCallbackKHR; + PFNGLDEBUGMESSAGECONTROLKHRPROC glDebugMessageControlKHR; + PFNGLPOPDEBUGGROUPKHRPROC glPopDebugGroupKHR; + PFNGLPUSHDEBUGGROUPKHRPROC glPushDebugGroupKHR; + PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES; + } procs; + + struct { struct { GLuint program; GLint proj; |