From 5d62185f1ce14a20eb78a227cf5da1f3c112984c Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Wed, 12 Sep 2012 21:25:11 +0100 Subject: [PATCH] Re-organize the source layout As part of an effort towards being able to write non-opengl based backends for Cogl this moves most of the opengl specific code under drivers/gl. drivers/gl and drivers/gles have been moved to drivers/gl/gl and drivers/gl/es respectively. Reviewed-by: Neil Roberts (cherry picked from commit 7dc482facb0a265c7f48660079e7e12dd7a2813e) --- cogl/Makefile.am | 53 ++++++++++--------- .../gl}/cogl-framebuffer-gl-private.h | 0 cogl/{ => driver/gl}/cogl-framebuffer-gl.c | 0 .../gl}/cogl-pipeline-fragend-fixed-private.h | 0 .../gl}/cogl-pipeline-fragend-fixed.c | 0 .../gl}/cogl-pipeline-fragend-glsl-private.h | 0 .../gl}/cogl-pipeline-fragend-glsl.c | 0 .../gl}/cogl-pipeline-opengl-private.h | 0 cogl/{ => driver/gl}/cogl-pipeline-opengl.c | 0 .../gl}/cogl-pipeline-progend-fixed-private.h | 0 .../gl}/cogl-pipeline-progend-fixed.c | 0 .../gl}/cogl-pipeline-progend-glsl-private.h | 0 .../gl}/cogl-pipeline-progend-glsl.c | 0 .../gl}/cogl-pipeline-vertend-fixed-private.h | 0 .../gl}/cogl-pipeline-vertend-fixed.c | 0 .../gl}/cogl-pipeline-vertend-glsl-private.h | 0 .../gl}/cogl-pipeline-vertend-glsl.c | 0 .../gl/{cogl-gl.c => gl/cogl-driver-gl.c} | 0 .../gl}/cogl-pipeline-fragend-arbfp-private.h | 0 .../gl/gl}/cogl-pipeline-fragend-arbfp.c | 0 .../gl/{ => gl}/cogl-texture-driver-gl.c | 0 .../gles/cogl-driver-gles.c} | 0 .../{ => gl}/gles/cogl-texture-driver-gles.c | 0 23 files changed, 28 insertions(+), 25 deletions(-) rename cogl/{ => driver/gl}/cogl-framebuffer-gl-private.h (100%) rename cogl/{ => driver/gl}/cogl-framebuffer-gl.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-fragend-fixed-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-fragend-fixed.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-fragend-glsl-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-fragend-glsl.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-opengl-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-opengl.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-progend-fixed-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-progend-fixed.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-progend-glsl-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-progend-glsl.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-vertend-fixed-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-vertend-fixed.c (100%) rename cogl/{ => driver/gl}/cogl-pipeline-vertend-glsl-private.h (100%) rename cogl/{ => driver/gl}/cogl-pipeline-vertend-glsl.c (100%) rename cogl/driver/gl/{cogl-gl.c => gl/cogl-driver-gl.c} (100%) rename cogl/{ => driver/gl/gl}/cogl-pipeline-fragend-arbfp-private.h (100%) rename cogl/{ => driver/gl/gl}/cogl-pipeline-fragend-arbfp.c (100%) rename cogl/driver/gl/{ => gl}/cogl-texture-driver-gl.c (100%) rename cogl/driver/{gles/cogl-gles.c => gl/gles/cogl-driver-gles.c} (100%) rename cogl/driver/{ => gl}/gles/cogl-texture-driver-gles.c (100%) diff --git a/cogl/Makefile.am b/cogl/Makefile.am index 2639a06d6..3f9c62fe7 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -20,7 +20,9 @@ INCLUDES = \ -I$(top_builddir) \ -I$(srcdir)/tesselator \ -I$(srcdir)/winsys \ - -I$(srcdir)/driver/$(COGL_DRIVER) \ + -I$(srcdir)/driver/gl \ + -I$(srcdir)/driver/gl/gl \ + -I$(srcdir)/driver/gl/gles \ $(NULL) AM_CPPFLAGS = \ @@ -128,6 +130,7 @@ cogl_experimental_h = \ cogl_nodist_experimental_h = \ $(NULL) +# gl driver sources cogl_gl_prototypes_h = \ $(srcdir)/gl-prototypes/cogl-gles2-functions.h \ $(srcdir)/gl-prototypes/cogl-core-functions.h \ @@ -137,19 +140,37 @@ cogl_gl_prototypes_h = \ $(NULL) # driver sources -cogl_driver_sources = +cogl_driver_sources = \ + $(srcdir)/driver/gl/cogl-framebuffer-gl.c \ + $(srcdir)/driver/gl/cogl-pipeline-opengl.c \ + $(srcdir)/driver/gl/cogl-pipeline-opengl-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-fragend-glsl.c \ + $(srcdir)/driver/gl/cogl-pipeline-fragend-glsl-private.h \ + $(srcdir)/driver/gl/gl/cogl-pipeline-fragend-arbfp.c \ + $(srcdir)/driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-fragend-fixed.c \ + $(srcdir)/driver/gl/cogl-pipeline-fragend-fixed-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-vertend-glsl.c \ + $(srcdir)/driver/gl/cogl-pipeline-vertend-glsl-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-vertend-fixed.c \ + $(srcdir)/driver/gl/cogl-pipeline-vertend-fixed-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-progend-fixed.c \ + $(srcdir)/driver/gl/cogl-pipeline-progend-fixed-private.h \ + $(srcdir)/driver/gl/cogl-pipeline-progend-glsl.c \ + $(srcdir)/driver/gl/cogl-pipeline-progend-glsl-private.h \ + $(NULL) if COGL_DRIVER_GL_SUPPORTED cogl_driver_sources += \ - $(srcdir)/driver/gl/cogl-gl.c \ - $(srcdir)/driver/gl/cogl-texture-driver-gl.c \ + $(srcdir)/driver/gl/gl/cogl-driver-gl.c \ + $(srcdir)/driver/gl/gl/cogl-texture-driver-gl.c \ $(NULL) endif if COGL_DRIVER_GLES_SUPPORTED cogl_driver_sources += \ - $(srcdir)/driver/gles/cogl-gles.c \ - $(srcdir)/driver/gles/cogl-texture-driver-gles.c \ + $(srcdir)/driver/gl/gles/cogl-driver-gles.c \ + $(srcdir)/driver/gl/gles/cogl-texture-driver-gles.c \ $(NULL) endif @@ -286,22 +307,6 @@ cogl_sources_c = \ $(srcdir)/cogl-pipeline-layer-state.c \ $(srcdir)/cogl-pipeline-state-private.h \ $(srcdir)/cogl-pipeline-debug.c \ - $(srcdir)/cogl-pipeline-opengl.c \ - $(srcdir)/cogl-pipeline-opengl-private.h \ - $(srcdir)/cogl-pipeline-fragend-glsl.c \ - $(srcdir)/cogl-pipeline-fragend-glsl-private.h \ - $(srcdir)/cogl-pipeline-fragend-arbfp.c \ - $(srcdir)/cogl-pipeline-fragend-arbfp-private.h \ - $(srcdir)/cogl-pipeline-fragend-fixed.c \ - $(srcdir)/cogl-pipeline-fragend-fixed-private.h \ - $(srcdir)/cogl-pipeline-vertend-glsl.c \ - $(srcdir)/cogl-pipeline-vertend-glsl-private.h \ - $(srcdir)/cogl-pipeline-vertend-fixed.c \ - $(srcdir)/cogl-pipeline-vertend-fixed-private.h \ - $(srcdir)/cogl-pipeline-progend-fixed.c \ - $(srcdir)/cogl-pipeline-progend-fixed-private.h \ - $(srcdir)/cogl-pipeline-progend-glsl.c \ - $(srcdir)/cogl-pipeline-progend-glsl-private.h \ $(srcdir)/cogl-pipeline-snippet-private.h \ $(srcdir)/cogl-pipeline-snippet.c \ $(srcdir)/cogl-pipeline-cache.h \ @@ -357,8 +362,8 @@ cogl_sources_c = \ $(srcdir)/cogl-point-in-poly-private.h \ $(srcdir)/cogl-point-in-poly.c \ $(srcdir)/cogl-clutter.c \ - $(srcdir)/winsys/cogl-winsys-stub-private.h \ $(srcdir)/cogl-queue.h \ + $(srcdir)/winsys/cogl-winsys-stub-private.h \ $(srcdir)/winsys/cogl-winsys-stub.c \ $(srcdir)/cogl-config-private.h \ $(srcdir)/cogl-config.c \ @@ -382,8 +387,6 @@ cogl_sources_c = \ $(srcdir)/cogl-magazine.c \ $(srcdir)/cogl-gles2-context-private.h \ $(srcdir)/cogl-gles2-context.c \ - $(srcdir)/cogl-framebuffer-gl-private.h \ - $(srcdir)/cogl-framebuffer-gl.c \ $(NULL) if USE_GLIB diff --git a/cogl/cogl-framebuffer-gl-private.h b/cogl/driver/gl/cogl-framebuffer-gl-private.h similarity index 100% rename from cogl/cogl-framebuffer-gl-private.h rename to cogl/driver/gl/cogl-framebuffer-gl-private.h diff --git a/cogl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c similarity index 100% rename from cogl/cogl-framebuffer-gl.c rename to cogl/driver/gl/cogl-framebuffer-gl.c diff --git a/cogl/cogl-pipeline-fragend-fixed-private.h b/cogl/driver/gl/cogl-pipeline-fragend-fixed-private.h similarity index 100% rename from cogl/cogl-pipeline-fragend-fixed-private.h rename to cogl/driver/gl/cogl-pipeline-fragend-fixed-private.h diff --git a/cogl/cogl-pipeline-fragend-fixed.c b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c similarity index 100% rename from cogl/cogl-pipeline-fragend-fixed.c rename to cogl/driver/gl/cogl-pipeline-fragend-fixed.c diff --git a/cogl/cogl-pipeline-fragend-glsl-private.h b/cogl/driver/gl/cogl-pipeline-fragend-glsl-private.h similarity index 100% rename from cogl/cogl-pipeline-fragend-glsl-private.h rename to cogl/driver/gl/cogl-pipeline-fragend-glsl-private.h diff --git a/cogl/cogl-pipeline-fragend-glsl.c b/cogl/driver/gl/cogl-pipeline-fragend-glsl.c similarity index 100% rename from cogl/cogl-pipeline-fragend-glsl.c rename to cogl/driver/gl/cogl-pipeline-fragend-glsl.c diff --git a/cogl/cogl-pipeline-opengl-private.h b/cogl/driver/gl/cogl-pipeline-opengl-private.h similarity index 100% rename from cogl/cogl-pipeline-opengl-private.h rename to cogl/driver/gl/cogl-pipeline-opengl-private.h diff --git a/cogl/cogl-pipeline-opengl.c b/cogl/driver/gl/cogl-pipeline-opengl.c similarity index 100% rename from cogl/cogl-pipeline-opengl.c rename to cogl/driver/gl/cogl-pipeline-opengl.c diff --git a/cogl/cogl-pipeline-progend-fixed-private.h b/cogl/driver/gl/cogl-pipeline-progend-fixed-private.h similarity index 100% rename from cogl/cogl-pipeline-progend-fixed-private.h rename to cogl/driver/gl/cogl-pipeline-progend-fixed-private.h diff --git a/cogl/cogl-pipeline-progend-fixed.c b/cogl/driver/gl/cogl-pipeline-progend-fixed.c similarity index 100% rename from cogl/cogl-pipeline-progend-fixed.c rename to cogl/driver/gl/cogl-pipeline-progend-fixed.c diff --git a/cogl/cogl-pipeline-progend-glsl-private.h b/cogl/driver/gl/cogl-pipeline-progend-glsl-private.h similarity index 100% rename from cogl/cogl-pipeline-progend-glsl-private.h rename to cogl/driver/gl/cogl-pipeline-progend-glsl-private.h diff --git a/cogl/cogl-pipeline-progend-glsl.c b/cogl/driver/gl/cogl-pipeline-progend-glsl.c similarity index 100% rename from cogl/cogl-pipeline-progend-glsl.c rename to cogl/driver/gl/cogl-pipeline-progend-glsl.c diff --git a/cogl/cogl-pipeline-vertend-fixed-private.h b/cogl/driver/gl/cogl-pipeline-vertend-fixed-private.h similarity index 100% rename from cogl/cogl-pipeline-vertend-fixed-private.h rename to cogl/driver/gl/cogl-pipeline-vertend-fixed-private.h diff --git a/cogl/cogl-pipeline-vertend-fixed.c b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c similarity index 100% rename from cogl/cogl-pipeline-vertend-fixed.c rename to cogl/driver/gl/cogl-pipeline-vertend-fixed.c diff --git a/cogl/cogl-pipeline-vertend-glsl-private.h b/cogl/driver/gl/cogl-pipeline-vertend-glsl-private.h similarity index 100% rename from cogl/cogl-pipeline-vertend-glsl-private.h rename to cogl/driver/gl/cogl-pipeline-vertend-glsl-private.h diff --git a/cogl/cogl-pipeline-vertend-glsl.c b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c similarity index 100% rename from cogl/cogl-pipeline-vertend-glsl.c rename to cogl/driver/gl/cogl-pipeline-vertend-glsl.c diff --git a/cogl/driver/gl/cogl-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c similarity index 100% rename from cogl/driver/gl/cogl-gl.c rename to cogl/driver/gl/gl/cogl-driver-gl.c diff --git a/cogl/cogl-pipeline-fragend-arbfp-private.h b/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h similarity index 100% rename from cogl/cogl-pipeline-fragend-arbfp-private.h rename to cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp-private.h diff --git a/cogl/cogl-pipeline-fragend-arbfp.c b/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c similarity index 100% rename from cogl/cogl-pipeline-fragend-arbfp.c rename to cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c diff --git a/cogl/driver/gl/cogl-texture-driver-gl.c b/cogl/driver/gl/gl/cogl-texture-driver-gl.c similarity index 100% rename from cogl/driver/gl/cogl-texture-driver-gl.c rename to cogl/driver/gl/gl/cogl-texture-driver-gl.c diff --git a/cogl/driver/gles/cogl-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c similarity index 100% rename from cogl/driver/gles/cogl-gles.c rename to cogl/driver/gl/gles/cogl-driver-gles.c diff --git a/cogl/driver/gles/cogl-texture-driver-gles.c b/cogl/driver/gl/gles/cogl-texture-driver-gles.c similarity index 100% rename from cogl/driver/gles/cogl-texture-driver-gles.c rename to cogl/driver/gl/gles/cogl-texture-driver-gles.c