gboolean
cogl_material_set_depth_range (CoglHandle handle,
- float near,
- float far,
+ float near_val,
+ float far_val,
GError **error)
{
#ifndef COGL_HAS_GLES
authority = _cogl_material_get_authority (material, state);
depth_state = &authority->big_state->depth_state;
- if (depth_state->depth_range_near == near &&
- depth_state->depth_range_far == far)
+ if (depth_state->depth_range_near == near_val &&
+ depth_state->depth_range_far == far_val)
return TRUE;
/* - Flush journal primitives referencing the current state.
*/
_cogl_material_pre_change_notify (material, state, NULL);
- material->big_state->depth_state.depth_range_near = near;
- material->big_state->depth_state.depth_range_far = far;
+ material->big_state->depth_state.depth_range_near = near_val;
+ material->big_state->depth_state.depth_range_far = far_val;
_cogl_material_update_authority (material, authority, state,
_cogl_material_depth_state_equal);
void
cogl_material_get_depth_range (CoglHandle handle,
- float *near,
- float *far)
+ float *near_val,
+ float *far_val)
{
CoglMaterial *material = COGL_MATERIAL (handle);
CoglMaterial *authority;
authority =
_cogl_material_get_authority (material, COGL_MATERIAL_STATE_DEPTH);
- *near = authority->big_state->depth_state.depth_range_near;
- *far = authority->big_state->depth_state.depth_range_far;
+ *near_val = authority->big_state->depth_state.depth_range_near;
+ *far_val = authority->big_state->depth_state.depth_range_far;
}
unsigned long
/**
* cogl_material_set_depth_range:
* @handle: A CoglMaterial handle
- * @near: The near component of the desired depth range which will be
+ * @near_val: The near component of the desired depth range which will be
* clamped to the range [0, 1]
- * @far: The far component of the desired depth range which will be
+ * @far_val: The far component of the desired depth range which will be
* clamped to the range [0, 1]
* @error: location to store an error of type #CoglError
*
*/
gboolean
cogl_material_set_depth_range (CoglHandle handle,
- float near,
- float far,
+ float near_val,
+ float far_val,
GError **error);
/**
* cogl_material_get_depth_range_mapping:
* @handle: A CoglMaterial handle
- * @near: A pointer to store the near component of the depth range
- * @far: A pointer to store the far component of the depth range
+ * @near_val: A pointer to store the near component of the depth range
+ * @far_val: A pointer to store the far component of the depth range
*
* Gets the current range to which normalized depth values are mapped
* before writing to the depth buffer. This corresponds to the range
*/
void
cogl_material_get_depth_range (CoglHandle handle,
- float *near,
- float *far);
+ float *near_val,
+ float *far_val);
#endif /* COGL_ENABLE_EXPERIMENTAL_API */