[Cogl] [PATCH v2 0/5] Adds initial GLES2 integration support

Robert Bragg robert at sixbynine.org
Mon May 14 15:02:16 PDT 2012


From: Robert Bragg <robert at linux.intel.com>

This is a second pass at adding GLES2 integration support to Cogl fixing
the things that Neil highlighted, and adding conformance tests, but also
with some additional features since the last set of patches.

This series also adds an installable convenience library, libcogl-gles2,
that can be used to access the standard GLES2 api without having to
dereference a vtable retrieved from Cogl. This should make it
easy for developers to re-use existing GLES2 based code.

This effectively makes Cogl into an alternative, portable, window system
binding api for OpenGL ES 2.0.

I've added an example of using this new convenience library by porting
es2gears from the mesa-demos repo to use Cogl instead of EGL.

New functions added in this version are
cogl_gles2_texture_2d_new_from_handle() and
cogl_gles2_texture_get_handle(). cogl_gles2_texture_2d_new_from_handle()
makes it possible to render a texture with the Cogl api that was created
with the GLES2 api. cogl_gles2_texture_get_handle() lets you do the
opposite and access textures created via the Cogl api in a GLES2
context.

Robert Bragg (5):
  Adds initial GLES2 integration support
  Adds libcogl-gles2 frontend GLES2 api
  Adds a cogl-gles2-gears example
  conform: Adds a gles2 context test
  Adds gles2-context renderer constraint

 Makefile.am                                      |    4 +
 cogl-gles2/GLES2/gl2.h                           |  170 +++
 cogl-gles2/GLES2/gl2ext.h                        | 1498 ++++++++++++++++++++++
 cogl-gles2/GLES2/gl2platform.h                   |   30 +
 cogl-gles2/Makefile.am                           |   29 +
 cogl-gles2/cogl-gles2-api.c                      | 1041 +++++++++++++++
 cogl-gles2/cogl-gles2-experimental.pc.in         |   13 +
 cogl/Makefile.am                                 |   14 +
 cogl/cogl-context-private.h                      |    7 +
 cogl/cogl-context.c                              |   10 +-
 cogl/cogl-context.h                              |    4 +
 cogl/cogl-framebuffer-private.h                  |   33 +-
 cogl/cogl-framebuffer.c                          |  380 ++++--
 cogl/cogl-gles2-context-private.h                |   63 +
 cogl/cogl-gles2-context.c                        |  463 +++++++
 cogl/cogl-gles2-types.h                          |  472 +++++++
 cogl/cogl-gles2.h                                |  356 +++++
 cogl/cogl-renderer.c                             |   47 +-
 cogl/cogl-renderer.h                             |    7 +-
 cogl/cogl-types.h                                |    3 +-
 cogl/cogl.h                                      |    2 +-
 cogl/gl-prototypes/cogl-glsl-functions.h         |    2 +-
 cogl/gl-prototypes/cogl-in-gles-core-functions.h |    2 +-
 cogl/winsys/cogl-winsys-egl-android.c            |    8 +-
 cogl/winsys/cogl-winsys-egl-gdl.c                |    8 +-
 cogl/winsys/cogl-winsys-egl-kms.c                |    8 +-
 cogl/winsys/cogl-winsys-egl-null.c               |    8 +-
 cogl/winsys/cogl-winsys-egl-private.h            |   13 +-
 cogl/winsys/cogl-winsys-egl-wayland.c            |   10 +-
 cogl/winsys/cogl-winsys-egl-x11.c                |    8 +-
 cogl/winsys/cogl-winsys-egl.c                    |  228 +++-
 cogl/winsys/cogl-winsys-private.h                |   18 +
 configure.ac                                     |   26 +-
 examples/Makefile.am                             |    8 +-
 examples/cogl-gles2-context.c                    |  141 ++
 examples/cogl-gles2-gears.c                      |  814 ++++++++++++
 examples/cogl-info.c                             |    6 +
 tests/conform/Makefile.am                        |    1 +
 tests/conform/test-conform-main.c                |    2 +
 tests/conform/test-gles2-context.c               |  385 ++++++
 tests/conform/test-no-gl-header.c                |    1 +
 tests/conform/test-utils.c                       |    6 +
 tests/conform/test-utils.h                       |   11 +-
 43 files changed, 6153 insertions(+), 207 deletions(-)
 create mode 100644 cogl-gles2/GLES2/gl2.h
 create mode 100644 cogl-gles2/GLES2/gl2ext.h
 create mode 100644 cogl-gles2/GLES2/gl2platform.h
 create mode 100644 cogl-gles2/Makefile.am
 create mode 100644 cogl-gles2/cogl-gles2-api.c
 create mode 100644 cogl-gles2/cogl-gles2-experimental.pc.in
 create mode 100644 cogl/cogl-gles2-context-private.h
 create mode 100644 cogl/cogl-gles2-context.c
 create mode 100644 cogl/cogl-gles2-types.h
 create mode 100644 cogl/cogl-gles2.h
 create mode 100644 examples/cogl-gles2-context.c
 create mode 100644 examples/cogl-gles2-gears.c
 create mode 100644 tests/conform/test-gles2-context.c

-- 
1.7.7.6



More information about the Cogl mailing list