[mythtv] #13351: Add OpenGL ES configurability/autodetection
Piotr Oniszczuk
piotr.oniszczuk at gmail.com
Sun Nov 25 19:37:13 UTC 2018
Hi,
Working on ARM HW (AmLogic s905, RPI) I need OpenGL ES support in myth.
I added OpenGL ES configurability and it works in following way: there is new configure switch: —enable-opengles
Overall logic: OpenGL ES is disabled by default (if no switch passed to configure or —disable-opengles passed to configure)
If —enable-opengles is passed to configure, configure will detect all required and set conditional USING_OPENGLES if all is OK.
If anything is missing - configure will exit with error.
So summarising:
A) ./configure WITHOUT —enable-opengles
Result:
OpenGL ES disabled; what OS provides doesn’t matter
USING_OPENGLES is not set
B) ./configure WITH —enable-opengles
B.1) System has proper support for OpenGL ES. This means:
a) pkg-config present to EGL and GLESv2
b) *.h, GLESv2 libs are present
c) Qt provides Open GL ES
Result:
configure sets USING_OPENGLES
B.2) System has broken support for OpenGL ES
(any of a) or b) or c) from B.1 are not valid)
Result:
configure exits with error
Why exit with error?
If user asks for OpenGL ES but system is not properly prepared to build, user should be explicitly notified by this issue.
This way current build bots should still work ok.
Only change is required for android building: now it requires adding —enable-opengles to configure params
I tested it on x86 and RPI3 with fully working OpenGL ES.
Let me know what You think
More information about the mythtv-dev
mailing list