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:
Simon Ser 2019-11-10 14:31:33 +01:00 committed by Scott Anderson
parent 774548696c
commit 515679e4fe
11 changed files with 191 additions and 245 deletions

View file

@ -1,12 +1,3 @@
glgen = find_program('../glgen.sh')
glapi = custom_target(
'glapi',
input: 'glapi.txt',
output: ['@BASENAME@.c', '@BASENAME@.h'],
command: [glgen, '@INPUT@', '@OUTDIR@'],
)
lib_wlr_render = static_library(
'wlr_render',
files(
@ -20,7 +11,6 @@ lib_wlr_render = static_library(
'wlr_renderer.c',
'wlr_texture.c',
),
glapi,
include_directories: wlr_inc,
dependencies: [
egl,
@ -33,5 +23,4 @@ lib_wlr_render = static_library(
wlr_render = declare_dependency(
link_with: lib_wlr_render,
sources: glapi[1],
)