From bb770af3a59e5935c108c05ee45490fc5668d4a3 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 14 Jan 2011 17:50:29 +0800 Subject: scons: Add support for GLES. GLES can be enabled by running scons with $ scons gles=yes When gles=yes is given, the build is changed in three ways. First, libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2. This makes DRI drivers and libEGL support and advertise GLES support. Second, GLES libraries will be created. They are libGLESv1_CM, libGLESv2, and libglapi. Last, libGL or opengl32 will link to libglapi. This change is required as _glapi_* will be declared as __declspec(dllimport) in libmesa.a on windows. libmesa.a expects those symbols to be defined in another DLL. Due to this change to GL, GLES support is marked experimental. Note that GLES requires libxml2-python to generate some of its sources. --- src/gallium/targets/egl-static/SConscript | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/gallium/targets/egl-static') diff --git a/src/gallium/targets/egl-static/SConscript b/src/gallium/targets/egl-static/SConscript index 381ef4e862..c978934a0c 100644 --- a/src/gallium/targets/egl-static/SConscript +++ b/src/gallium/targets/egl-static/SConscript @@ -58,10 +58,18 @@ if env['platform'] == 'windows': env.Prepend(LIBS = [ ws_gdi, ]) -else: - # OpenGL - env.Append(CPPDEFINES = ['FEATURE_GL=1']) - env.Prepend(LIBS = ['GL', 'talloc', glsl, mesa]) + +# OpenGL ES and OpenGL +if env['gles']: + env.Append(CPPDEFINES = [ + 'FEATURE_GL=1', + 'FEATURE_ES1=1', + 'FEATURE_ES2=1' + ]) + env.Prepend(LIBPATH = [shared_glapi.dir]) + # manually add LIBPREFIX on windows + glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi' + env.Prepend(LIBS = [glapi_name, talloc, glsl, mesa]) # OpenVG if True: -- cgit v1.2.3