Adding enforcement of the wanted graphics system GL/GLES

- GRAPHICS=GL/GLES
This commit is contained in:
Thomas-Karl Pietrowski 2014-02-17 22:22:40 +01:00
parent 2e66b17bfc
commit 6adae180a6
1 changed files with 23 additions and 13 deletions

View File

@ -74,6 +74,15 @@ c_options['use_x11'] = False
c_options['use_gstreamer'] = False c_options['use_gstreamer'] = False
c_options['use_avfoundation'] = platform == 'darwin' c_options['use_avfoundation'] = platform == 'darwin'
if environ.get('GRAPHICS') is not None:
print('\nForcing to use this graphics system: %s' %repr(environ.get('GRAPHICS')))
if environ.get('GRAPHICS') == "GL":
c_options['use_opengl_es2'] = False
elif environ.get('GRAPHICS') == "GLES":
c_options['use_opengl_es2'] = True
else:
print("WARNING: Unknown graphics system choosen - using defaults!")
# now check if environ is changing the default values # now check if environ is changing the default values
for key in list(c_options.keys()): for key in list(c_options.keys()):
ukey = key.upper() ukey = key.upper()
@ -177,6 +186,7 @@ elif platform == 'win32':
print('Windows platform detected, force GLEW usage.') print('Windows platform detected, force GLEW usage.')
c_options['use_glew'] = True c_options['use_glew'] = True
else: else:
if environ.get('GRAPHICS') is None:
# searching GLES headers # searching GLES headers
default_header_dirs = ['/usr/include', '/usr/local/include'] default_header_dirs = ['/usr/include', '/usr/local/include']
found = False found = False