Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys
authorRobert Bragg <robert@linux.intel.com>
Tue, 28 Jul 2009 01:02:02 +0000 (02:02 +0100)
committerRobert Bragg <robert@linux.intel.com>
Fri, 16 Oct 2009 17:58:50 +0000 (18:58 +0100)
commit43efab46bcf88c14cc429c6c7b659bdbc84f1f71
treee101295bdcf222b84a5d82d65935f2392f670bc3
parent2eea83de75cec3dbc334feecd004a180a7f5b1e5
Intial Re-layout of the Cogl source code and introduction of a Cogl Winsys

As part of an incremental process to have Cogl be a standalone project we
want to re-consider how we organise the Cogl source code.

Currently this is the structure I'm aiming for:
cogl/
    cogl/
<put common source here>
winsys/
   cogl-glx.c
   cogl-wgl.c
driver/
    gl/
    gles/
os/ ?
    utils/
cogl-fixed
cogl-matrix-stack?
        cogl-journal?
        cogl-primitives?
    pango/

The new winsys component is a starting point for migrating window system
code (i.e.  x11,glx,wgl,osx,egl etc) from Clutter to Cogl.

The utils/ and pango/ directories aren't added by this commit, but they are
noted because I plan to add them soon.

Overview of the planned structure:

* The winsys/ API is the API that binds OpenGL to a specific window system,
  be that X11 or win32 etc.  Example are glx, wgl and egl. Much of the logic
  under clutter/{glx,osx,win32 etc} should migrate here.

* Note there is also the idea of a winsys-base that may represent a window
  system for which there are multiple winsys APIs.  An example of this is
  x11, since glx and egl may both be used with x11.  (currently only Clutter
  has the idea of a winsys-base)

* The driver/ represents a specific varient of OpenGL. Currently we have "gl"
  representing OpenGL 1.4-2.1 (mostly fixed function) and "gles" representing
  GLES 1.1 (fixed funciton) and 2.0 (fully shader based)

* Everything under cogl/ should fundamentally be supporting access to the
  GPU.  Essentially Cogl's most basic requirement is to provide a nice GPU
  Graphics API and drawing a line between this and the utility functionality
  we add to support Clutter should help keep this lean and maintainable.

* Code under utils/ as suggested builds on cogl/ adding more convenient
  APIs or mechanism to optimize special cases. Broadly speaking you can
  compare cogl/ to OpenGL and utils/ to GLU.

* clutter/pango will be moved to clutter/cogl/pango

How some of the internal configure.ac/pkg-config terminology has changed:
backendextra -> CLUTTER_WINSYS_BASE # e.g. "x11"
backendextralib -> CLUTTER_WINSYS_BASE_LIB # e.g. "x11/libclutter-x11.la"
clutterbackend -> {CLUTTER,COGL}_WINSYS # e.g. "glx"
CLUTTER_FLAVOUR -> {CLUTTER,COGL}_WINSYS
clutterbackendlib -> CLUTTER_WINSYS_LIB
CLUTTER_COGL -> COGL_DRIVER # e.g. "gl"

Note: The CLUTTER_FLAVOUR and CLUTTER_COGL defines are kept for apps

As the first thing to take advantage of the new winsys component in Cogl;
cogl_get_proc_address() has been moved from cogl/{gl,gles}/cogl.c into
cogl/common/cogl.c and this common implementation first trys
_cogl_winsys_get_proc_address() but if that fails then it falls back to
gmodule.
118 files changed:
Makefile.am
clutter.pc.in
clutter/Makefile.am
clutter/cogl/Makefile.am
clutter/cogl/TODO [deleted file]
clutter/cogl/cogl.pc.in [deleted file]
clutter/cogl/cogl/Makefile.am [new file with mode: 0644]
clutter/cogl/cogl/cogl-bitmap-fallback.c [moved from clutter/cogl/common/cogl-bitmap-fallback.c with 100% similarity]
clutter/cogl/cogl/cogl-bitmap-pixbuf.c [moved from clutter/cogl/common/cogl-bitmap-pixbuf.c with 100% similarity]
clutter/cogl/cogl/cogl-bitmap-private.h [moved from clutter/cogl/common/cogl-bitmap-private.h with 100% similarity]
clutter/cogl/cogl/cogl-bitmap.c [moved from clutter/cogl/common/cogl-bitmap.c with 100% similarity]
clutter/cogl/cogl/cogl-bitmap.h [moved from clutter/cogl/cogl-bitmap.h with 100% similarity]
clutter/cogl/cogl/cogl-blend-string.c [moved from clutter/cogl/common/cogl-blend-string.c with 100% similarity]
clutter/cogl/cogl/cogl-blend-string.h [moved from clutter/cogl/common/cogl-blend-string.h with 100% similarity]
clutter/cogl/cogl/cogl-clip-stack.c [moved from clutter/cogl/common/cogl-clip-stack.c with 100% similarity]
clutter/cogl/cogl/cogl-clip-stack.h [moved from clutter/cogl/common/cogl-clip-stack.h with 100% similarity]
clutter/cogl/cogl/cogl-color.c [moved from clutter/cogl/common/cogl-color.c with 100% similarity]
clutter/cogl/cogl/cogl-color.h [moved from clutter/cogl/cogl-color.h with 100% similarity]
clutter/cogl/cogl/cogl-context.c [moved from clutter/cogl/common/cogl-context.c with 100% similarity]
clutter/cogl/cogl/cogl-context.h [moved from clutter/cogl/common/cogl-context.h with 100% similarity]
clutter/cogl/cogl/cogl-current-matrix.c [moved from clutter/cogl/common/cogl-current-matrix.c with 100% similarity]
clutter/cogl/cogl/cogl-current-matrix.h [moved from clutter/cogl/common/cogl-current-matrix.h with 100% similarity]
clutter/cogl/cogl/cogl-debug.c [moved from clutter/cogl/common/cogl-debug.c with 100% similarity]
clutter/cogl/cogl/cogl-debug.h [moved from clutter/cogl/cogl-debug.h with 100% similarity]
clutter/cogl/cogl/cogl-deprecated.h [moved from clutter/cogl/cogl-deprecated.h with 100% similarity]
clutter/cogl/cogl/cogl-enum-types.c.in [moved from clutter/cogl/common/cogl-enum-types.c.in with 100% similarity]
clutter/cogl/cogl/cogl-enum-types.h.in [moved from clutter/cogl/common/cogl-enum-types.h.in with 100% similarity]
clutter/cogl/cogl/cogl-fixed.c [moved from clutter/cogl/common/cogl-fixed.c with 100% similarity]
clutter/cogl/cogl/cogl-fixed.h [moved from clutter/cogl/cogl-fixed.h with 100% similarity]
clutter/cogl/cogl/cogl-handle.h [moved from clutter/cogl/common/cogl-handle.h with 100% similarity]
clutter/cogl/cogl/cogl-internal.h [moved from clutter/cogl/common/cogl-internal.h with 100% similarity]
clutter/cogl/cogl/cogl-material-private.h [moved from clutter/cogl/common/cogl-material-private.h with 100% similarity]
clutter/cogl/cogl/cogl-material.c [moved from clutter/cogl/common/cogl-material.c with 100% similarity]
clutter/cogl/cogl/cogl-material.h [moved from clutter/cogl/cogl-material.h with 100% similarity]
clutter/cogl/cogl/cogl-matrix-stack.c [moved from clutter/cogl/common/cogl-matrix-stack.c with 100% similarity]
clutter/cogl/cogl/cogl-matrix-stack.h [moved from clutter/cogl/common/cogl-matrix-stack.h with 98% similarity]
clutter/cogl/cogl/cogl-matrix.c [moved from clutter/cogl/common/cogl-matrix.c with 100% similarity]
clutter/cogl/cogl/cogl-matrix.h [moved from clutter/cogl/cogl-matrix.h with 100% similarity]
clutter/cogl/cogl/cogl-offscreen.h [moved from clutter/cogl/cogl-offscreen.h with 100% similarity]
clutter/cogl/cogl/cogl-path.h [moved from clutter/cogl/cogl-path.h with 100% similarity]
clutter/cogl/cogl/cogl-primitives.c [moved from clutter/cogl/common/cogl-primitives.c with 100% similarity]
clutter/cogl/cogl/cogl-primitives.h [moved from clutter/cogl/common/cogl-primitives.h with 96% similarity]
clutter/cogl/cogl/cogl-shader.h [moved from clutter/cogl/cogl-shader.h with 100% similarity]
clutter/cogl/cogl/cogl-texture-driver.h [moved from clutter/cogl/common/cogl-texture-driver.h with 100% similarity]
clutter/cogl/cogl/cogl-texture-private.h [moved from clutter/cogl/common/cogl-texture-private.h with 100% similarity]
clutter/cogl/cogl/cogl-texture.c [moved from clutter/cogl/common/cogl-texture.c with 100% similarity]
clutter/cogl/cogl/cogl-texture.h [moved from clutter/cogl/cogl-texture.h with 100% similarity]
clutter/cogl/cogl/cogl-types.h [moved from clutter/cogl/cogl-types.h with 100% similarity]
clutter/cogl/cogl/cogl-util.c [moved from clutter/cogl/common/cogl-util.c with 100% similarity]
clutter/cogl/cogl/cogl-util.h [moved from clutter/cogl/gles/cogl-util.h with 100% similarity]
clutter/cogl/cogl/cogl-vertex-buffer-private.h [moved from clutter/cogl/common/cogl-vertex-buffer-private.h with 100% similarity]
clutter/cogl/cogl/cogl-vertex-buffer.c [moved from clutter/cogl/common/cogl-vertex-buffer.c with 100% similarity]
clutter/cogl/cogl/cogl-vertex-buffer.h [moved from clutter/cogl/cogl-vertex-buffer.h with 100% similarity]
clutter/cogl/cogl/cogl.c [moved from clutter/cogl/common/cogl.c with 97% similarity]
clutter/cogl/cogl/cogl.h.in [moved from clutter/cogl/cogl.h.in with 99% similarity]
clutter/cogl/cogl/cogl.pc.in [new file with mode: 0644]
clutter/cogl/cogl/driver/Makefile.am [new file with mode: 0644]
clutter/cogl/cogl/driver/gl/Makefile.am [new file with mode: 0644]
clutter/cogl/cogl/driver/gl/cogl-context-driver.c [moved from clutter/cogl/gl/cogl-context-driver.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-context-driver.h [moved from clutter/cogl/gl/cogl-context-driver.h with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-defines.h.in [moved from clutter/cogl/gl/cogl-defines.h.in with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-fbo.c [moved from clutter/cogl/gl/cogl-fbo.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-fbo.h [moved from clutter/cogl/gles/cogl-fbo.h with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-primitives.c [moved from clutter/cogl/gl/cogl-primitives.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-program.c [moved from clutter/cogl/gl/cogl-program.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-program.h [moved from clutter/cogl/gl/cogl-program.h with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-shader-private.h [moved from clutter/cogl/gl/cogl-shader-private.h with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-shader.c [moved from clutter/cogl/gl/cogl-shader.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl-texture-driver.c [moved from clutter/cogl/gl/cogl-texture-driver.c with 100% similarity]
clutter/cogl/cogl/driver/gl/cogl.c [moved from clutter/cogl/gl/cogl.c with 89% similarity]
clutter/cogl/cogl/driver/gles/Makefile.am [new file with mode: 0644]
clutter/cogl/cogl/driver/gles/cogl-context-driver.c [moved from clutter/cogl/gles/cogl-context-driver.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-context-driver.h [moved from clutter/cogl/gles/cogl-context-driver.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-defines.h.in [moved from clutter/cogl/gles/cogl-defines.h.in with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-fbo.c [moved from clutter/cogl/gles/cogl-fbo.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-fbo.h [moved from clutter/cogl/gl/cogl-fbo.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-fixed-fragment-shader.glsl [moved from clutter/cogl/gles/cogl-fixed-fragment-shader.glsl with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-fixed-vertex-shader.glsl [moved from clutter/cogl/gles/cogl-fixed-vertex-shader.glsl with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-gles2-wrapper.c [moved from clutter/cogl/gles/cogl-gles2-wrapper.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-gles2-wrapper.h [moved from clutter/cogl/gles/cogl-gles2-wrapper.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-primitives.c [moved from clutter/cogl/gles/cogl-primitives.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-program.c [moved from clutter/cogl/gles/cogl-program.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-program.h [moved from clutter/cogl/gles/cogl-program.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-shader-private.h [moved from clutter/cogl/gles/cogl-shader-private.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-shader.c [moved from clutter/cogl/gles/cogl-shader.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-texture-driver.c [moved from clutter/cogl/gles/cogl-texture-driver.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-util.c [moved from clutter/cogl/gles/cogl-util.c with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl-util.h [moved from clutter/cogl/common/cogl-util.h with 100% similarity]
clutter/cogl/cogl/driver/gles/cogl.c [moved from clutter/cogl/gles/cogl.c with 91% similarity]
clutter/cogl/cogl/driver/gles/stringify.sh [moved from clutter/cogl/gles/stringify.sh with 100% similarity]
clutter/cogl/cogl/stb_image.c [moved from clutter/cogl/common/stb_image.c with 100% similarity]
clutter/cogl/cogl/winsys/Makefile.am [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-eglnative.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-eglx.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-fruity.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-glx.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-osx.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-sdl.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-win32.c [new file with mode: 0644]
clutter/cogl/cogl/winsys/cogl-winsys.h [new file with mode: 0644]
clutter/cogl/common/Makefile.am [deleted file]
clutter/eglnative/Makefile.am
clutter/eglx/Makefile.am
clutter/fruity/Makefile.am
clutter/glx/Makefile.am
clutter/osx/Makefile.am
clutter/sdl/Makefile.am
clutter/win32/Makefile.am
clutter/win32/clutter-win32.pc.in
clutter/x11/Makefile.am
clutter/x11/clutter-x11.pc.in
configure.ac
doc/reference/clutter/Makefile.am
doc/reference/cogl/Makefile.am
tests/conform/Makefile.am
tests/interactive/Makefile.am
tests/micro-bench/Makefile.am
tests/tools/Makefile.am