mirror of https://github.com/kivy/kivy.git
Adding enforcement of the wanted graphics system GL/GLES
- GRAPHICS=GL/GLES
This commit is contained in:
parent
2e66b17bfc
commit
6adae180a6
10
setup.py
10
setup.py
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue