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.
This commit is contained in:
Robert Bragg 2010-09-14 12:13:30 +01:00
parent 5583d9c12e
commit d5eebedaa3
6 changed files with 9 additions and 3 deletions

View File

@ -30,7 +30,7 @@
#include "cogl-material-private.h" #include "cogl-material-private.h"
const CoglMaterialBackend _cogl_material_arbfp_backend; extern const CoglMaterialBackend _cogl_material_arbfp_backend;
#endif /* __COGL_MATERIAL_ARBFP_PRIVATE_H */ #endif /* __COGL_MATERIAL_ARBFP_PRIVATE_H */

View File

@ -108,6 +108,8 @@ typedef struct _CoglMaterialBackendARBfpPrivate
int next_constant_id; int next_constant_id;
} CoglMaterialBackendARBfpPrivate; } CoglMaterialBackendARBfpPrivate;
const CoglMaterialBackend _cogl_material_arbfp_backend;
static int static int
_cogl_material_backend_arbfp_get_max_texture_units (void) _cogl_material_backend_arbfp_get_max_texture_units (void)
{ {

View File

@ -30,7 +30,7 @@
#include "cogl-material-private.h" #include "cogl-material-private.h"
const CoglMaterialBackend _cogl_material_fixed_backend; extern const CoglMaterialBackend _cogl_material_fixed_backend;
#endif /* __COGL_MATERIAL_FIXED_PRIVATE_H */ #endif /* __COGL_MATERIAL_FIXED_PRIVATE_H */

View File

@ -54,6 +54,8 @@
#include "../gles/cogl-gles2-wrapper.h" #include "../gles/cogl-gles2-wrapper.h"
#endif #endif
const CoglMaterialBackend _cogl_material_fixed_backend;
static int static int
_cogl_material_backend_fixed_get_max_texture_units (void) _cogl_material_backend_fixed_get_max_texture_units (void)
{ {

View File

@ -30,7 +30,7 @@
#include "cogl-material-private.h" #include "cogl-material-private.h"
const CoglMaterialBackend _cogl_material_glsl_backend; extern const CoglMaterialBackend _cogl_material_glsl_backend;
#endif /* __COGL_MATERIAL_GLSL_PRIVATE_H */ #endif /* __COGL_MATERIAL_GLSL_PRIVATE_H */

View File

@ -54,6 +54,8 @@
#include "../gles/cogl-gles2-wrapper.h" #include "../gles/cogl-gles2-wrapper.h"
#endif #endif
const CoglMaterialBackend _cogl_material_glsl_backend;
static int static int
_cogl_material_backend_glsl_get_max_texture_units (void) _cogl_material_backend_glsl_get_max_texture_units (void)
{ {