Add CoglDepthState API
Instead of simply extending the cogl_pipeline_ namespace to add api for controlling the depth testing state we now break the api out. This adds a CoglDepthState type that can be stack allocated. The members of the structure are private but we have the following API to setup the state: cogl_depth_state_init cogl_depth_state_set_test_enabled cogl_depth_state_get_test_enabled cogl_depth_state_set_test_function cogl_depth_state_get_test_function cogl_depth_state_set_writing_enabled cogl_depth_state_get_writing_enabled cogl_depth_state_set_range cogl_depth_state_get_range This removes the following experimental API which is now superseded: cogl_material_set_depth_test_enabled cogl_material_get_depth_test_enabled cogl_material_set_depth_test_function cogl_material_get_depth_test_function cogl_material_set_depth_writing_enabled cogl_material_get_depth_writing_enabled cogl_material_set_depth_range cogl_material_get_depth_range Once a CoglDepthState structure is setup it can be set on a pipeline using cogl_pipeline_set_depth_state().
This commit is contained in:
@@ -190,7 +190,8 @@ _cogl_gl_update_features (CoglContext *context)
|
||||
_cogl_get_gl_version (&gl_major, &gl_minor);
|
||||
|
||||
flags = (COGL_FEATURE_TEXTURE_READ_PIXELS
|
||||
| COGL_FEATURE_UNSIGNED_INT_INDICES);
|
||||
| COGL_FEATURE_UNSIGNED_INT_INDICES
|
||||
| COGL_FEATURE_DEPTH_RANGE);
|
||||
|
||||
gl_extensions = (const char *)glGetString (GL_EXTENSIONS);
|
||||
|
||||
|
Reference in New Issue
Block a user