diff options
author | Robert Bragg <robert@linux.intel.com> | 2010-05-26 11:33:32 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2010-06-15 15:26:28 +0100 |
commit | dab4ddc7184b25274c24fcec4c1e2d9dfff5e94a (patch) | |
tree | 7b9691360d1eb7c5807a473152530d84c183ce71 /cogl/cogl-types.h | |
parent | fca054e949476d3434df28f3f0ded9a9ca37f345 (diff) | |
download | cogl-dab4ddc7184b25274c24fcec4c1e2d9dfff5e94a.tar.gz |
material: Make CoglMaterial responsible for depth state
This redirects the legacy depth testing APIs through CoglMaterial and
adds a new experimental cogl_material_ API for handling the depth
testing state.
This adds the following new functions:
cogl_material_set_depth_test_enabled
cogl_material_get_depth_test_enabled
cogl_material_set_depth_writing_enabled
cogl_material_get_depth_writing_enabled
cogl_material_set_depth_test_function
cogl_material_get_depth_test_function
cogl_material_set_depth_range
cogl_material_get_depth_range
As with other experimental Cogl API you need to define
COGL_ENABLE_EXPERIMENTAL_API to access them and their stability isn't
yet guaranteed.
Diffstat (limited to 'cogl/cogl-types.h')
-rw-r--r-- | cogl/cogl-types.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/cogl/cogl-types.h b/cogl/cogl-types.h index 68b6dca4..54d6d5e2 100644 --- a/cogl/cogl-types.h +++ b/cogl/cogl-types.h @@ -233,6 +233,7 @@ typedef enum { /*< prefix=COGL_PIXEL_FORMAT >*/ * @COGL_FEATURE_UNSIGNED_INT_INDICES: Set if * %COGL_INDICES_TYPE_UNSIGNED_INT is supported in * cogl_vertex_buffer_indices_new(). + * @COGL_FEATURE_DEPTH_RANGE: cogl_material_set_depth_range() support * * Flags for the supported features. * @@ -252,7 +253,8 @@ typedef enum COGL_FEATURE_STENCIL_BUFFER = (1 << 10), COGL_FEATURE_VBOS = (1 << 11), COGL_FEATURE_PBOS = (1 << 12), - COGL_FEATURE_UNSIGNED_INT_INDICES = (1 << 13) + COGL_FEATURE_UNSIGNED_INT_INDICES = (1 << 13), + COGL_FEATURE_DEPTH_RANGE = (1 << 14) } CoglFeatureFlags; /** @@ -403,6 +405,27 @@ typedef enum { /*< prefix=COGL_BLEND_STRING_ERROR >*/ GQuark cogl_blend_string_error_quark (void); +#define COGL_ERROR (_cogl_error_quark ()) + +/** + * CoglError: + * @COGL_ERROR_MISSING_FEATURE: You tried to use a feature not + * currently available; likely because of missing driver support. + * + * Error enumeration for Cogl + * + * Currently this is only used by Cogl API marked as experimental so + * this enum should also be considered experimental. + * + * Since: 1.4 + */ +typedef enum { /*< prefix=COGL_ERROR >*/ + COGL_ERROR_MISSING_FEATURE +} CoglError; + +GQuark +_cogl_error_quark (void); + G_END_DECLS #endif /* __COGL_TYPES_H__ */ |