mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Refactor EGL/GL API loading
Remove glapi.sh code generation, replace it with hand-written loading
code that checks extension strings before calling eglGetProcAddress.
The GLES2 renderer still uses global state because of:
- {PUSH,POP}_GLES2_DEBUG macros
- wlr_gles2_texture_from_* taking a wlr_egl instead of the renderer
This commit is contained in:
parent
774548696c
commit
515679e4fe
11 changed files with 191 additions and 245 deletions
|
|
@ -14,6 +14,16 @@
|
|||
#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;
|
||||
};
|
||||
|
||||
extern struct wlr_gles2_procs gles2_procs;
|
||||
|
||||
struct wlr_gles2_pixel_format {
|
||||
enum wl_shm_format wl_format;
|
||||
GLint gl_format, gl_type;
|
||||
|
|
@ -33,7 +43,6 @@ struct wlr_gles2_renderer {
|
|||
struct wlr_renderer wlr_renderer;
|
||||
|
||||
struct wlr_egl *egl;
|
||||
const char *exts_str;
|
||||
|
||||
struct {
|
||||
bool read_format_bgra_ext;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue