git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

scenefx/render/fx_renderer/meson.build (1.1K)

 1 renderers = get_option('renderers')
 2 if 'auto' in renderers and get_option('auto_features').enabled()
 3 	renderers = ['gles2']
 4 elif 'auto' in renderers and get_option('auto_features').disabled()
 5 	renderers = []
 6 endif
 7 
 8 scenefx_files += files(
 9 	'util.c',
10 	'tracy.c',
11 	'shaders.c',
12 	'pixel_format.c',
13 	'fx_pass.c',
14 	'fx_framebuffer.c',
15 	'fx_offscreen_buffers.c',
16 	'fx_texture.c',
17 	'fx_renderer.c',
18 )
19 
20 if 'gles2' in renderers or 'auto' in renderers
21 	egl = dependency('egl', required: 'gles2' in renderers)
22 	if egl.found()
23 		eglext_version = cc.get_define(
24 			'EGL_EGLEXT_VERSION',
25 			dependencies: egl,
26 			prefix: '#include <EGL/eglext.h>',
27 		).to_int()
28 		if eglext_version < 20210604
29 			egl = dependency(
30 				'',
31 				required: 'gles2' in renderers,
32 				not_found_message: 'EGL headers too old',
33 			)
34 		endif
35 	endif
36 	gbm = dependency('gbm', required: 'gles2' in renderers)
37 	glesv2 = dependency('glesv2', required: 'gles2' in renderers)
38 
39 	if egl.found() and gbm.found() and glesv2.found()
40 		scenefx_deps += [egl, gbm, glesv2]
41 		features += {'gles2-renderer': true}
42 		internal_features += {'egl': true}
43 	endif
44 
45 	subdir('shaders')
46 
47 endif