mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
Merge branch 'master' into 1.0-integration
* master: [cogl-vertex-buffer] Ensure the clip state before rendering [test-text-perf] Small fix-ups Add a test for text performance [build] Ensure that cogl-debug is disabled by default [build] The cogl GE macro wasn't passing an int according to the format string Use the right internal format for GL_ARB_texture_rectangle [actor_paint] Ensure painting is a NOP for actors with opacity = 0 Make backface culling work with vertex buffers
This commit is contained in:
commit
3db47a8da3
@ -325,9 +325,9 @@ void cogl_enable_depth_test (gboolean setting);
|
||||
*
|
||||
* Sets whether textures positioned so that their backface is showing
|
||||
* should be hidden. This can be used to efficiently draw two-sided
|
||||
* textures or fully closed cubes without enabling depth testing. Only
|
||||
* calls to cogl_texture_rectangle() and cogl_texture_polygon() are
|
||||
* affected. Backface culling is disabled by default.
|
||||
* textures or fully closed cubes without enabling depth testing. This
|
||||
* 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);
|
||||
|
||||
|
@ -62,6 +62,7 @@ const gchar *cogl_gl_error_to_string (GLenum error_code);
|
||||
{ \
|
||||
g_warning ("%s: GL error (%d): %s\n", \
|
||||
G_STRLOC, \
|
||||
__err, \
|
||||
cogl_gl_error_to_string (__err)); \
|
||||
} } G_STMT_END
|
||||
|
||||
|
@ -1647,6 +1647,9 @@ enable_state_for_drawing_buffer (CoglVertexBuffer *buffer)
|
||||
|
||||
enable_flags |= cogl_material_get_cogl_enable_flags (ctx->source_material);
|
||||
|
||||
if (ctx->enable_backface_culling)
|
||||
enable_flags |= COGL_ENABLE_BACKFACE_CULLING;
|
||||
|
||||
cogl_enable (enable_flags);
|
||||
}
|
||||
|
||||
@ -1723,6 +1726,8 @@ cogl_vertex_buffer_draw (CoglHandle handle,
|
||||
if (!cogl_is_vertex_buffer (handle))
|
||||
return;
|
||||
|
||||
cogl_clip_ensure ();
|
||||
|
||||
buffer = _cogl_vertex_buffer_pointer_from_handle (handle);
|
||||
|
||||
enable_state_for_drawing_buffer (buffer);
|
||||
@ -1751,6 +1756,8 @@ cogl_vertex_buffer_draw_elements (CoglHandle handle,
|
||||
if (!cogl_is_vertex_buffer (handle))
|
||||
return;
|
||||
|
||||
cogl_clip_ensure ();
|
||||
|
||||
buffer = _cogl_vertex_buffer_pointer_from_handle (handle);
|
||||
|
||||
enable_state_for_drawing_buffer (buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user