[Cogl] [PATCH 1/2] Add a COGL_EXT_IN_GLES3 option to specify extensions that are in GLES3

Robert Bragg robert at sixbynine.org
Fri Jun 13 10:53:52 PDT 2014


On Tue, Apr 1, 2014 at 2:54 PM, Neil Roberts <neil at linux.intel.com> wrote:
> diff --git a/cogl/cogl-feature-private.c b/cogl/cogl-feature-private.c
> index 7c75ae2..ea2109a 100644
> --- a/cogl/cogl-feature-private.c
> +++ b/cogl/cogl-feature-private.c
> @@ -53,18 +53,32 @@ _cogl_feature_check (CoglRenderer *renderer,
>  {
>    const char *suffix = NULL;
>    int func_num;
> +  CoglExtGlesAvailability gles_availability;
>    CoglBool in_core;
>
> +  if (driver == COGL_DRIVER_GLES1)
> +    {
> +      gles_availability = COGL_EXT_IN_GLES;
> +    }
> +  else if (driver == COGL_DRIVER_GLES2)
> +    {
> +      gles_availability = COGL_EXT_IN_GLES2;
> +
> +      if (COGL_CHECK_GL_VERSION (gl_major, gl_minor, 3, 0))
> +        gles_availability |= COGL_EXT_IN_GLES3;
> +    }
> +  else
> +    {
> +      gles_availability = 0;
> +    }

Maybe this could be a switch so we get a warning if we add new driver
enums (e.g. WEBGL) and forget to update this.

Apart from that nit, this looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

--
Thanks
Robert


More information about the Cogl mailing list