[Cogl] [PATCH v2 2/5] Adds libcogl-gles2 frontend GLES2 api

Neil Roberts neil at linux.intel.com
Tue May 15 09:53:47 PDT 2012


Robert Bragg <robert at sixbynine.org> writes:

> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> +/*
> + * This document is licensed under the SGI Free Software B License Version
> + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
> + */
> +
> +#include <cogl/cogl-gles2-types.h>

This probably shouldn't be including other headers within the extern "C"
declaration.

> --- /dev/null
> +++ b/cogl-gles2/GLES2/gl2platform.h
...
> +#include <KHR/khrplatform.h>

This header isn't always available. Maybe we could manually define the
khronos types to the stdint.h types instead? Or change the gl headers to
directly use the stdint types instead of the khronos types?

> +coglgles2includedir = $(includedir)/cogl/cogl-gles2/GLES2
> +coglgles2include_HEADERS = \
> +	GLES2/gl2.h \
> +	GLES2/gl2ext.h \
> +	GLES2/gl2platform.h

These are installed in the wrong directory. I guess it should be
$(includedir)/cogl2/ now. The gl-prototypes headers are also installed
in the wrong directory but presumably that is from the previous patch.

> diff --git a/cogl-gles2/cogl-gles2-experimental.pc.in b/cogl-gles2/cogl-gles2-experimental.pc.in
> new file mode 100644
> index 0000000..a68b1aa
> --- /dev/null
> +++ b/cogl-gles2/cogl-gles2-experimental.pc.in
> @@ -0,0 +1,13 @@
> +prefix=@prefix@
> +exec_prefix=@exec_prefix@
> +libdir=@libdir@
> +includedir=@includedir@
> +apiversion=@COGL_API_VERSION@
> +requires=cogl-2.0-experimental

This package name is now wrong

> diff --git a/cogl/gl-prototypes/cogl-glsl-functions.h b/cogl/gl-prototypes/cogl-glsl-functions.h
> index a2b7abc..d537d25 100644
> --- a/cogl/gl-prototypes/cogl-glsl-functions.h
> +++ b/cogl/gl-prototypes/cogl-glsl-functions.h
> @@ -62,7 +62,7 @@ COGL_EXT_FUNCTION (GLuint, glCreateShader,
>  COGL_EXT_FUNCTION (void, glShaderSource,
>                     (GLuint                shader,
>                      GLsizei               count,
> -                    const char          **string,
> +                    const GLchar * const *string,

Why does it change this back to GLchar? I think some drivers ship GL
headers without GLchar and we've already changed this a couple of times:

http://git.gnome.org/browse/cogl/commit/?id=b2964b6910fe05
http://git.gnome.org/browse/cogl/commit/?id=84dc0ad2eb5a6

Otherwise looks good.

Regards,
- Neil


More information about the Cogl mailing list