Opened 6 years ago

Closed 5 years ago

#13351 closed Patch - Feature (Fixed)

Allow OpenGL ES renderer by configure

Reported by: warpme Owned by: Peter Bennett
Priority: minor Milestone: 31.0
Component: MythTV - Video/OSD Rendering Version: v30-fixes
Severity: medium Keywords: opengl gles
Cc: Ticket locked: no

Description

OpenGL ES configurability 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 in system - configure will exit with error.

Attachments (4)

0214-Configure-allow-opengl-GLES-selection.patch (3.5 KB) - added by warpme 6 years ago.
Patch for configure to add gles configurability
0215-enable-opengl-GLES.patch (2.1 KB) - added by warpme 6 years ago.
patch to get working gles
0214-Configure-allow-opengl-GLES-selection-v2.patch (4.6 KB) - added by warpme 6 years ago.
v2 for setups where OS has only GLES
0215-enable-opengl-GLES-v2.patch (2.1 KB) - added by warpme 6 years ago.
v2 with removed some android conditionals as now GLES conditional does things

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by warpme

Patch for configure to add gles configurability

Changed 6 years ago by warpme

patch to get working gles

comment:1 Changed 6 years ago by mspieth

Looks good.

It would be nice to auto set opengles in configure if target is android.

comment:2 Changed 6 years ago by Peter Bennett

With these patches both applied, configure fails on android. Normally android build has these:

	--enable-opengl-video \
	--enable-opengl \

I tried two ways, one by changing the enable-opengl to enable-opengles and the other way by having both enable-opengl and enable-opengles. Both ways fail with ERROR: OpenGL not found! It also fails with the same error if I leave just enable-opengl and enable-opengl-video.

Changed 6 years ago by warpme

v2 for setups where OS has only GLES

Changed 6 years ago by warpme

v2 with removed some android conditionals as now GLES conditional does things

comment:3 Changed 6 years ago by warpme

Mark,

thx for looking on this.

This was somehow expected as my initial patches are for case where OS has OpenGL Desktop _and_ OpenGL ES.

I believe Android is case where OS has only OpenGL ES.

V2 should address such case - assuming I'm guessing right placement of libs/*h files in Android.

pls test.

comment:4 Changed 6 years ago by Peter Bennett

With the new patches

Android build with no change (still using --enable-opengl) - the config is successful and reports opengl enabled and opengles disabled. Build then fails this way

In file included from mythrender_opengl.cpp:24:0:
mythrender_opengl1.h:7:19: fatal error: GL/gl.h: No such file or directory
 #include <GL/gl.h>
                   ^
compilation terminated.

I changed --enable-opengl to --enable-opengles and then config gives error -

ERROR: OpenGL ES not found!

comment:5 Changed 6 years ago by warpme

Peter, One of my goals when working on this was proper detection of opengles.

Previously, configure wrongly allows to set opengles on system where opengles isn't properly installed from configure point of view (configure can't see required *.h and *.so files) or there is lack of pkg-config .pc files related to opengles.

Now configure is addressing this, and if system hasn't properly installed opengles - configure output reflects this.

Issue You see is because: GLES2/gl2.h or EGL/egl.h or libglesv2.so or libegl.so are unseen by configure or system is lacking pkg-config's glesv2.pc or egl.pc files.

I think proper approach on android build system should be addressing root caue: make GLES2/gl2.h and EGL/egl.h and libglesv2.so and libegl.so seen by configure or provide proper glesv2.pc an egl.pc files.

Alternative is breaking configure to wrongly report opengles is OK on system where is might be not OK....

comment:6 Changed 6 years ago by Peter Bennett

Milestone: needs_triageunknown

comment:7 Changed 5 years ago by Mark Kendall

Milestone: unknown31.0
Resolution: Fixed
Status: newclosed
Version: Unspecifiedv30-fixes

Piotr - I'm assuming this is now irrelevant:)

Note: See TracTickets for help on using tickets.