Commit a22859a6 authored by Robert Bragg's avatar Robert Bragg
Browse files

shaped-texture: never slice shape mask texture

Since Cogl doesn't support multi-texturing with sliced textures and the
shape texture is combined with the texture-from-pixmap texture we need
to make sure we never construct a sliced mask texture. This patch simply
passes the COGL_TEXTURE_NO_SLICE flag to cogl_texture_from_data when
creating the shape mask texture.

https://bugzilla.gnome.org/show_bug.cgi?id=674731
parent c44438b1
......@@ -313,12 +313,17 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
}
else
#endif /* GL_TEXTURE_RECTANGLE_ARB */
priv->mask_texture = cogl_texture_new_from_data (tex_width, tex_height,
COGL_TEXTURE_NONE,
COGL_PIXEL_FORMAT_A_8,
COGL_PIXEL_FORMAT_ANY,
stride,
mask_data);
{
/* Note: we don't allow slicing for this texture because we
* need to use it with multi-texturing which doesn't support
* sliced textures */
priv->mask_texture = cogl_texture_new_from_data (tex_width, tex_height,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_A_8,
COGL_PIXEL_FORMAT_ANY,
stride,
mask_data);
}
g_free (mask_data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment