b6b9ac0b85
This adds a version header which contains macros to define which version of Cogl the application is being compiled against. This helps applications that want to support multiple incompatible versions of Cogl at compile time. The macros are called COGL_VERSION_{MAJOR,MINOR,MICRO}. This does not match Clutter which names them CLUTTER_{MAJOR,MINOR,MICRO}_VERSION but I think the former is nicer and it at least matches Cairo and Pango. The values of the macro are defined to COGL_VERSION_*_INTERNAL which is generated by the configure script into cogl-defines.h. There is also a macro for the entire version as a string called COGL_VERSION_STRING. The internal utility macros for encoding a 3 part version number into a single integer have been moved into the new header so they can be used publicly as a convenient way to check if the version is within a particular range. There is also a COGL_VERSION_CHECK macro for the very common case that a feature will be used since a particular version of Cogl. There is a macro called COGL_VERSION which contains the pre-encoded version of Cogl being compiled against for convenience. Unlike in Clutter this patch does not add any runtime version identification mechanism. A test case is also added which just contains static asserts to sanity check the macros. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 3480cf140dc355fa87ab3fbcf0aeeb0124798a8f) |
||
---|---|---|
.. | ||
config.env.in | ||
Makefile.am | ||
run-tests.sh | ||
test-atlas-migration.c | ||
test-backface-culling.c | ||
test-bitmask.c | ||
test-blend-strings.c | ||
test-color-mask.c | ||
test-conform-main.c | ||
test-custom-attributes.c | ||
test-depth-test.c | ||
test-fixed.c | ||
test-fixtures.c | ||
test-just-vertex-shader.c | ||
test-launcher.sh.in | ||
test-materials.c | ||
test-multitexture.c | ||
test-no-gl-header.c | ||
test-npot-texture.c | ||
test-object.c | ||
test-offscreen.c | ||
test-path.c | ||
test-pipeline-uniforms.c | ||
test-pipeline-user-matrix.c | ||
test-pixel-buffer.c | ||
test-point-size.c | ||
test-point-sprite.c | ||
test-premult.c | ||
test-primitive.c | ||
test-read-texture-formats.c | ||
test-readpixels.c | ||
test-snippets.c | ||
test-sparse-pipeline.c | ||
test-sub-texture.c | ||
test-texture-3d.c | ||
test-texture-get-set-data.c | ||
test-texture-mipmaps.c | ||
test-texture-pixmap-x11.c | ||
test-texture-rectangle.c | ||
test-utils.c | ||
test-utils.h | ||
test-version.c | ||
test-vertex-buffer-contiguous.c | ||
test-vertex-buffer-interleved.c | ||
test-vertex-buffer-mutability.c | ||
test-viewport.c | ||
test-wrap-modes.c | ||
test-write-texture-formats.c |