2019-04-04 17:29:27 +03:00
|
|
|
if not get_option('renderer-gl')
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
|
|
|
config_h.set('ENABLE_EGL', '1')
|
|
|
|
|
2020-11-25 14:22:26 +03:00
|
|
|
vertex_glsl = custom_target(
|
|
|
|
'vertex-shader.h',
|
|
|
|
command: cmd_xxd + [ '-n', 'vertex_shader' ],
|
|
|
|
input: 'vertex.glsl',
|
|
|
|
output: 'vertex-shader.h',
|
|
|
|
)
|
|
|
|
|
2020-11-25 16:47:10 +03:00
|
|
|
fragment_glsl = custom_target(
|
|
|
|
'fragment-shader.h',
|
|
|
|
command: cmd_xxd + [ '-n', 'fragment_shader' ],
|
|
|
|
input: 'fragment.glsl',
|
|
|
|
output: 'fragment-shader.h',
|
|
|
|
)
|
|
|
|
|
2019-04-04 17:29:27 +03:00
|
|
|
srcs_renderer_gl = [
|
2019-09-23 14:54:49 +03:00
|
|
|
'egl-glue.c',
|
2020-11-25 16:47:10 +03:00
|
|
|
fragment_glsl,
|
2019-04-04 17:29:27 +03:00
|
|
|
'gl-renderer.c',
|
2020-11-24 15:27:28 +03:00
|
|
|
'gl-shaders.c',
|
2021-03-09 17:40:25 +03:00
|
|
|
'gl-shader-config-color-transformation.c',
|
2019-04-04 17:29:27 +03:00
|
|
|
linux_dmabuf_unstable_v1_protocol_c,
|
|
|
|
linux_dmabuf_unstable_v1_server_protocol_h,
|
2020-11-25 14:22:26 +03:00
|
|
|
vertex_glsl,
|
2019-04-04 17:29:27 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
deps_renderer_gl = [
|
2019-10-17 16:17:57 +03:00
|
|
|
dep_libm,
|
2019-04-04 17:29:27 +03:00
|
|
|
dep_pixman,
|
2019-04-18 16:43:55 +03:00
|
|
|
dep_libweston_private,
|
2019-04-04 17:29:27 +03:00
|
|
|
dep_libdrm_headers,
|
|
|
|
dep_vertex_clipping
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach name : [ 'egl', 'glesv2' ]
|
|
|
|
d = dependency(name, required: false)
|
|
|
|
if not d.found()
|
|
|
|
error('gl-renderer requires @0@ which was not found. Or, you can use \'-Drenderer-gl=false\'.'.format(name))
|
|
|
|
endif
|
|
|
|
deps_renderer_gl += d
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
plugin_gl = shared_library(
|
|
|
|
'gl-renderer',
|
|
|
|
srcs_renderer_gl,
|
2019-04-05 17:09:28 +03:00
|
|
|
include_directories: common_inc,
|
2019-04-04 17:29:27 +03:00
|
|
|
dependencies: deps_renderer_gl,
|
|
|
|
name_prefix: '',
|
|
|
|
install: true,
|
|
|
|
install_dir: dir_module_libweston
|
|
|
|
)
|
|
|
|
env_modmap += 'gl-renderer.so=@0@;'.format(plugin_gl.full_path())
|