[vlc-devel] [vlc-commits] libvlc: callbacks: compile with the OpenGL C flags (for real)

Alexandre Janniaux ajanni at videolabs.io
Mon Feb 10 16:27:31 CET 2020


Hi,

On Mon, Feb 10, 2020 at 03:04:11PM +0100, Steve Lhomme wrote:
> On 2020-02-10 14:37, Alexandre Janniaux wrote:
> > Hi,
> >
> > If you only need GL_RGBA, it's probably better to just import
> > the define in your code.
>
> Is the value the same everywhere ?

Yes:

/usr/include/GL/gl.h:#define GL_RGBA                                    0x1908
/usr/include/GL/glew.h:#define GL_RGBA 0x1908
/usr/include/GLES2/gl2.h:#define GL_RGBA                           0x1908
/usr/include/GLES3/gl31.h:#define GL_RGBA                           0x1908
/usr/include/GLES3/gl32.h:#define GL_RGBA                           0x1908

The android doc:

https://developer.android.com/reference/android/opengl/GLES20.html#GL_RGBA

And in a more general fashion, the registry from which those
headers are generated:

https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xml

Halide runtime is doing exactly this for core for example.

Regards,
--
Alexandre Janniaux
Videolabs

>
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> >
> > On Mon, Feb 10, 2020 at 02:18:26PM +0100, Steve Lhomme wrote:
> > > For now it's just to assert if the host doesn't set GL_RGBA or expects
> > > something else to work.
> > >
> > > In the future it should be possible to use different values and have the
> > > OpenGL layer deal with the tone mapping/shader tweaking to adapt the source
> > > and destination.
> > >
> > > On 2020-02-10 14:11, Alexandre Janniaux wrote:
> > > > Hi,
> > > >
> > > > Actually, vgl should already be independant of OpenGL,
> > > > you should not need adding new cflags or defines for it?
> > > >
> > > > The removal of override on libgles2_plugin_la_CFLAGS only
> > > > should fix the build issue.
> > > >
> > > > Regards,
> > > > --
> > > > Alexandre Janniaux
> > > > Videolabs
> > > >
> > > > On Mon, Feb 10, 2020 at 02:03:46PM +0100, Alexandre Janniaux wrote:
> > > > > Hi,
> > > > >
> > > > > On Mon, Feb 10, 2020 at 02:52:54PM +0200, Rémi Denis-Courmont wrote:
> > > > > > Err, I don't think you can have GL and GLES headers simultaneously.
> > > > >
> > > > > Yes you can, you even probably have on your machine, and if
> > > > > you enable GLESv2 support you will have both opengl and gles
> > > > > in VLC on linux.
> > > > >
> > > > > For android here, GL_CFLAGS will be empty but we probably
> > > > > want the vgl module to not depends upon GL/GLES headers
> > > > > anyway in the long run.
> > > > >
> > > > > Regards,
> > > > > --
> > > > > Alexandre Janniaux
> > > > > Videolabs
> > > > >
> > > > > >
> > > > > > Le 10 février 2020 13:52:04 GMT+02:00, Steve Lhomme <git at videolan.org> a écrit :
> > > > > > > vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Feb 10
> > > > > > > 11:51:49 2020 +0100| [8a54db4ca4c6a591b694a3442ba3c9bcb436a086] |
> > > > > > > committer: Steve Lhomme
> > > > > > >
> > > > > > > libvlc: callbacks: compile with the OpenGL C flags (for real)
> > > > > > >
> > > > > > > Android is compiled with OpenGL ES2. We just need the headers anyway.
> > > > > > >
> > > > > > > >
> > > > > > > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8a54db4ca4c6a591b694a3442ba3c9bcb436a086
> > > > > > > ---
> > > > > > >
> > > > > > > modules/video_output/Makefile.am | 5 ++++-
> > > > > > > 1 file changed, 4 insertions(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/modules/video_output/Makefile.am
> > > > > > > b/modules/video_output/Makefile.am
> > > > > > > index 23a5b6809c..bcb19e2949 100644
> > > > > > > --- a/modules/video_output/Makefile.am
> > > > > > > +++ b/modules/video_output/Makefile.am
> > > > > > > @@ -335,7 +335,10 @@ libwextern_plugin_la_SOURCES =
> > > > > > > video_output/wextern.c
> > > > > > > libyuv_plugin_la_SOURCES = video_output/yuv.c
> > > > > > >
> > > > > > > libvgl_plugin_la_SOURCES = video_output/vgl.c
> > > > > > > -libgles2_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS) $(GLES2_CFLAGS)
> > > > > > > +libvgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS)
> > > > > > > +if HAVE_ANDROID
> > > > > > > +libvgl_plugin_la_CFLAGS += $(GLES2_CFLAGS) -DUSE_OPENGL_ES2
> > > > > > > +endif
> > > > > > >
> > > > > > > vout_LTLIBRARIES += \
> > > > > > > 	libflaschen_plugin.la \
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > vlc-commits mailing list
> > > > > > > vlc-commits at videolan.org
> > > > > > > https://mailman.videolan.org/listinfo/vlc-commits
> > > > > >
> > > > > > --
> > > > > > Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
> > > > >
> > > > > > _______________________________________________
> > > > > > vlc-devel mailing list
> > > > > > To unsubscribe or modify your subscription options:
> > > > > > https://mailman.videolan.org/listinfo/vlc-devel
> > > > > _______________________________________________
> > > > > vlc-devel mailing list
> > > > > To unsubscribe or modify your subscription options:
> > > > > https://mailman.videolan.org/listinfo/vlc-devel
> > > > _______________________________________________
> > > > vlc-devel mailing list
> > > > To unsubscribe or modify your subscription options:
> > > > https://mailman.videolan.org/listinfo/vlc-devel
> > > >
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list