mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
[cogl] renamed cogl_enable_* to cogl_set_*_enabled + added getters
cogl_enable_depth_test and cogl_enable_backface_culling have been renamed and now have corresponding getters, the new functions are: cogl_set_depth_test_enabled cogl_get_depth_test_enabled cogl_set_backface_culling_enabled cogl_get_backface_culling_enabled
This commit is contained in:
parent
18193e5322
commit
2f0bda49fc
@ -24,5 +24,6 @@
|
||||
#ifndef COGL_DEPRECATED_H
|
||||
|
||||
#define cogl_color cogl_color_REPLACED_BY_cogl_set_source_color
|
||||
#define cogl_enable_depth_test cogl_enable_depth_test_RENAMED_TO_cogl_set_depth_test_enabled
|
||||
|
||||
#endif
|
||||
|
27
cogl.h.in
27
cogl.h.in
@ -331,7 +331,7 @@ void cogl_set_projection_matrix (CoglMatrix *matrix);
|
||||
void cogl_get_viewport (float v[4]);
|
||||
|
||||
/**
|
||||
* cogl_enable_depth_test:
|
||||
* cogl_set_depth_test_enable:
|
||||
* @setting: %TRUE to enable depth testing or %FALSE to disable.
|
||||
*
|
||||
* Sets whether depth testing is enabled. If it is disabled then the
|
||||
@ -340,10 +340,19 @@ void cogl_get_viewport (float v[4]);
|
||||
* clutter_actor_lower(), otherwise it will also take into account the
|
||||
* actor's depth. Depth testing is disabled by default.
|
||||
*/
|
||||
void cogl_enable_depth_test (gboolean setting);
|
||||
void cogl_set_depth_test_enable (gboolean setting);
|
||||
|
||||
/**
|
||||
* cogl_enable_backface_culling:
|
||||
* cogl_get_depth_test_enable:
|
||||
*
|
||||
* Queries if depth testing has been enabled via cogl_set_depth_test_enable()
|
||||
*
|
||||
* Returns: TRUE if depth testing is enabled else FALSE
|
||||
*/
|
||||
gboolean cogl_get_depth_test_enable (void);
|
||||
|
||||
/**
|
||||
* cogl_set_backface_culling_enabled:
|
||||
* @setting: %TRUE to enable backface culling or %FALSE to disable.
|
||||
*
|
||||
* Sets whether textures positioned so that their backface is showing
|
||||
@ -352,7 +361,17 @@ void cogl_enable_depth_test (gboolean setting);
|
||||
* only affects calls to the cogl_rectangle* family of functions and
|
||||
* cogl_vertex_buffer_draw*. Backface culling is disabled by default.
|
||||
*/
|
||||
void cogl_enable_backface_culling (gboolean setting);
|
||||
void cogl_set_backface_culling_enabled (gboolean setting);
|
||||
|
||||
/**
|
||||
* cogl_get_backface_culling_enabled:
|
||||
*
|
||||
* Queries if backface culling has been enabled via
|
||||
* cogl_set_backface_culling_enabled()
|
||||
*
|
||||
* Returns: TRUE if backface culling is enabled else FALSE
|
||||
*/
|
||||
gboolean cogl_get_backface_culling_enabled (void);
|
||||
|
||||
/**
|
||||
* cogl_set_fog:
|
||||
|
@ -214,30 +214,39 @@ cogl_get_enable ()
|
||||
}
|
||||
|
||||
void
|
||||
cogl_enable_depth_test (gboolean setting)
|
||||
cogl_set_depth_test_enabled (gboolean setting)
|
||||
{
|
||||
if (setting)
|
||||
{
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
glEnable (GL_ALPHA_TEST);
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glAlphaFunc (GL_GREATER, 0.1);
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
glDisable (GL_ALPHA_TEST);
|
||||
}
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
gboolean
|
||||
cogl_get_depth_test_enabled (void)
|
||||
{
|
||||
return glIsEnabled (GL_DEPTH_TEST) == GL_TRUE ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_enable_backface_culling (gboolean setting)
|
||||
cogl_set_backface_culling_enabled (gboolean setting)
|
||||
{
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
ctx->enable_backface_culling = setting;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cogl_get_backface_culling_enabled (void)
|
||||
{
|
||||
_COGL_GET_CONTEXT (ctx, FALSE);
|
||||
|
||||
return ctx->enable_backface_culling;
|
||||
}
|
||||
|
||||
void
|
||||
cogl_set_source_color (const CoglColor *color)
|
||||
{
|
||||
|
@ -40,8 +40,10 @@ cogl_get_viewport
|
||||
<SUBSECTION>
|
||||
cogl_clear
|
||||
cogl_get_bitmasks
|
||||
cogl_enable_depth_test
|
||||
cogl_enable_backface_culling
|
||||
cogl_set_depth_test_enabled
|
||||
cogl_get_depth_test_enabled
|
||||
cogl_set_backface_culling_enabled
|
||||
cogl_get_backface_culling_enabled
|
||||
<SUBSECTION>
|
||||
CoglFogMode
|
||||
cogl_set_fog
|
||||
|
Loading…
Reference in New Issue
Block a user