[vlc-devel] [PATCH 01/24] opengl: move compat definition to gl_common.h

Romain Vimont rom1v at videolabs.io
Tue Jan 28 16:39:47 CET 2020


On 1/28/20 4:32 PM, Alexandre Janniaux wrote:
> Hi,
> 
> I wonder if this change is really needed, those defines are
> only used by the interop_sw.c right ?

It is not really necessary, but I think that gl_common.h should define 
all compatibility-related stuff, regardless of whether it is used by one 
or more files.

Btw, other values defined in gl_common.h are used by exactly one file 
(GL_RG16, GL_LUMINANCE16, GL_TEXTURE_LUMINANCE_SIZE, ...).

> Regards,
> --
> Alexandre Janniaux
> Videolabs
> 
> On Mon, Jan 27, 2020 at 09:19:51PM +0100, Romain Vimont wrote:
>> ---
>>   modules/video_output/opengl/gl_common.h   | 13 +++++++++++++
>>   modules/video_output/opengl/interop_sw.c  | 11 -----------
>>   modules/video_output/opengl/vout_helper.c |  4 ----
>>   3 files changed, 13 insertions(+), 15 deletions(-)
>>
>> diff --git a/modules/video_output/opengl/gl_common.h b/modules/video_output/opengl/gl_common.h
>> index 384d3bddae..f5f7f54a9f 100644
>> --- a/modules/video_output/opengl/gl_common.h
>> +++ b/modules/video_output/opengl/gl_common.h
>> @@ -80,6 +80,19 @@
>>   # define GL_TEXTURE_LUMINANCE_SIZE 0x8060
>>   #endif
>>
>> +#ifndef GL_CLAMP_TO_EDGE
>> +# define GL_CLAMP_TO_EDGE 0x812F
>> +#endif
>> +#ifndef GL_UNPACK_ROW_LENGTH
>> +# define GL_UNPACK_ROW_LENGTH 0x0CF2
>> +#endif
>> +#ifndef GL_PIXEL_UNPACK_BUFFER
>> +# define GL_PIXEL_UNPACK_BUFFER 0x88EC
>> +#endif
>> +#ifndef GL_DYNAMIC_DRAW
>> +# define GL_DYNAMIC_DRAW 0x88E8
>> +#endif
>> +
>>   #ifndef APIENTRY
>>   # define APIENTRY
>>   #endif
>> diff --git a/modules/video_output/opengl/interop_sw.c b/modules/video_output/opengl/interop_sw.c
>> index 6e4376c7b6..11c0946c5d 100644
>> --- a/modules/video_output/opengl/interop_sw.c
>> +++ b/modules/video_output/opengl/interop_sw.c
>> @@ -29,17 +29,6 @@
>>   #include <vlc_common.h>
>>   #include "internal.h"
>>
>> -#ifndef GL_UNPACK_ROW_LENGTH
>> -# define GL_UNPACK_ROW_LENGTH 0x0CF2
>> -#endif
>> -
>> -#ifndef GL_PIXEL_UNPACK_BUFFER
>> -# define GL_PIXEL_UNPACK_BUFFER 0x88EC
>> -#endif
>> -#ifndef GL_DYNAMIC_DRAW
>> -# define GL_DYNAMIC_DRAW 0x88E8
>> -#endif
>> -
>>   #define PBO_DISPLAY_COUNT 2 /* Double buffering */
>>   typedef struct
>>   {
>> diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
>> index 7697f364bb..a8c73074fb 100644
>> --- a/modules/video_output/opengl/vout_helper.c
>> +++ b/modules/video_output/opengl/vout_helper.c
>> @@ -42,10 +42,6 @@
>>   #include "vout_helper.h"
>>   #include "internal.h"
>>
>> -#ifndef GL_CLAMP_TO_EDGE
>> -# define GL_CLAMP_TO_EDGE 0x812F
>> -#endif
>> -
>>   #define SPHERE_RADIUS 1.f
>>
>>   /* FIXME: GL_ASSERT_NOERROR disabled for now because:
>> --
>> 2.25.0
>>
>> _______________________________________________
>> 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