[Mesa-dev] [PATCH] gl.h: define GLeglImageOES depending on GL_EXT_EGL_image_storage

Emil Velikov emil.l.velikov at gmail.com
Tue Aug 7 15:00:06 UTC 2018


On 7 August 2018 at 15:23, Brian Paul <brianp at vmware.com> wrote:
> To avoid duplicate typedef with the definition in glext.h
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107488
> Tested-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  include/GL/gl.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/GL/gl.h b/include/GL/gl.h
> index f5bac36..0f7ae70 100644
> --- a/include/GL/gl.h
> +++ b/include/GL/gl.h
> @@ -2086,7 +2086,7 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLen
>
>
>  /* GL_OES_EGL_image */
> -#ifndef GL_OES_EGL_image
> +#ifndef GL_EXT_EGL_image_storage
>  typedef void* GLeglImageOES;
>  #endif
>
A more robust solution is to check both, as below.
Esp. since the GLES* headers use the OES instance and it's not
uncommon to include both GL and GLES headers.

#if !defined(GL_OES_EGL_image) && !defined(GL_EXT_EGL_image_storage)

Don't have a strong opinion, though. If you keep patch as-is, please
tweak/drop the comment.

Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

-Emil


More information about the mesa-dev mailing list