From 7eff623b96a3bec083b9355d4e66217ec0fc9de7 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 14 Sep 2010 12:13:30 +0100 Subject: [PATCH] material: don't declare backend vtables in headers This fixes the material backends to declare their constant vtable in the c file with a corresponding extern declaration in the header. This should fix complaints about duplicate symbols seen on OSX. --- cogl/cogl-material-arbfp-private.h | 2 +- cogl/cogl-material-arbfp.c | 2 ++ cogl/cogl-material-fixed-private.h | 2 +- cogl/cogl-material-fixed.c | 2 ++ cogl/cogl-material-glsl-private.h | 2 +- cogl/cogl-material-glsl.c | 2 ++ 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cogl/cogl-material-arbfp-private.h b/cogl/cogl-material-arbfp-private.h index f3c472f86..a0a882d68 100644 --- a/cogl/cogl-material-arbfp-private.h +++ b/cogl/cogl-material-arbfp-private.h @@ -30,7 +30,7 @@ #include "cogl-material-private.h" -const CoglMaterialBackend _cogl_material_arbfp_backend; +extern const CoglMaterialBackend _cogl_material_arbfp_backend; #endif /* __COGL_MATERIAL_ARBFP_PRIVATE_H */ diff --git a/cogl/cogl-material-arbfp.c b/cogl/cogl-material-arbfp.c index ec6b71398..724a5f7cb 100644 --- a/cogl/cogl-material-arbfp.c +++ b/cogl/cogl-material-arbfp.c @@ -108,6 +108,8 @@ typedef struct _CoglMaterialBackendARBfpPrivate int next_constant_id; } CoglMaterialBackendARBfpPrivate; +const CoglMaterialBackend _cogl_material_arbfp_backend; + static int _cogl_material_backend_arbfp_get_max_texture_units (void) { diff --git a/cogl/cogl-material-fixed-private.h b/cogl/cogl-material-fixed-private.h index 1af978cde..25704caf3 100644 --- a/cogl/cogl-material-fixed-private.h +++ b/cogl/cogl-material-fixed-private.h @@ -30,7 +30,7 @@ #include "cogl-material-private.h" -const CoglMaterialBackend _cogl_material_fixed_backend; +extern const CoglMaterialBackend _cogl_material_fixed_backend; #endif /* __COGL_MATERIAL_FIXED_PRIVATE_H */ diff --git a/cogl/cogl-material-fixed.c b/cogl/cogl-material-fixed.c index 0167533b4..1e7870c6a 100644 --- a/cogl/cogl-material-fixed.c +++ b/cogl/cogl-material-fixed.c @@ -54,6 +54,8 @@ #include "../gles/cogl-gles2-wrapper.h" #endif +const CoglMaterialBackend _cogl_material_fixed_backend; + static int _cogl_material_backend_fixed_get_max_texture_units (void) { diff --git a/cogl/cogl-material-glsl-private.h b/cogl/cogl-material-glsl-private.h index 64557a022..742e39932 100644 --- a/cogl/cogl-material-glsl-private.h +++ b/cogl/cogl-material-glsl-private.h @@ -30,7 +30,7 @@ #include "cogl-material-private.h" -const CoglMaterialBackend _cogl_material_glsl_backend; +extern const CoglMaterialBackend _cogl_material_glsl_backend; #endif /* __COGL_MATERIAL_GLSL_PRIVATE_H */ diff --git a/cogl/cogl-material-glsl.c b/cogl/cogl-material-glsl.c index 9f0f6fccd..938427f0a 100644 --- a/cogl/cogl-material-glsl.c +++ b/cogl/cogl-material-glsl.c @@ -54,6 +54,8 @@ #include "../gles/cogl-gles2-wrapper.h" #endif +const CoglMaterialBackend _cogl_material_glsl_backend; + static int _cogl_material_backend_glsl_get_max_texture_units (void) {