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:
Robert Bragg
2011-04-14 18:12:03 +01:00
parent eb109e6cc0
commit 07c0b9f89f
16 changed files with 545 additions and 555 deletions

View File

@@ -68,6 +68,7 @@ IGNORE_HFILES=\
cogl-object-private.h \
cogl-path.h \
cogl-path-private.h \
cogl-depth-state-private.h \
cogl-pipeline-fragend-arbfp-private.h \
cogl-pipeline-fragend-fixed-private.h \
cogl-pipeline-fragend-glsl-private.h \

View File

@@ -455,6 +455,20 @@ cogl_blend_string_error_get_type
cogl_blend_string_error_quark
</SECTION>
<SECTION>
<FILE>cogl-depth-state</FILE>
CoglDepthState
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
</SECTION>
<SECTION>
<FILE>cogl-buffer</FILE>
<TITLE>CoglBuffer: The Base Buffer Type</TITLE>

View File

@@ -66,6 +66,7 @@ IGNORE_HFILES=\
cogl-matrix-private.h \
cogl-object-private.h \
cogl-path-private.h \
cogl-depth-state-private.h \
cogl-pipeline-fragend-arbfp-private.h \
cogl-pipeline-fragend-fixed-private.h \
cogl-pipeline-fragend-glsl-private.h \

View File

@@ -519,14 +519,6 @@ cogl_material_get_layer_wrap_mode_p
cogl_material_wrap_mode_get_type
cogl_material_set_user_program
cogl_material_get_user_program
cogl_material_set_depth_range
cogl_material_get_depth_range
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_foreach_layer
<SUBSECTION Private>
@@ -534,6 +526,20 @@ cogl_blend_string_error_get_type
cogl_blend_string_error_quark
</SECTION>
<SECTION>
<FILE>cogl-depth-state</FILE>
CoglDepthState
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
</SECTION>
<SECTION>
<FILE>cogl-buffer</FILE>
<TITLE>Buffers</TITLE>