mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
[cogl-primitives] Fix an unused variable warning when building GLES
The 'tex' variable is only used if #ifdef'd GL code so it was throwing an error under GLES. The variable is now moved into a block inside the #ifdef.
This commit is contained in:
parent
f259deafce
commit
b177d24667
@ -1158,7 +1158,6 @@ cogl_polygon (CoglTextureVertex *vertices,
|
|||||||
{
|
{
|
||||||
CoglHandle layer = (CoglHandle)tmp->data;
|
CoglHandle layer = (CoglHandle)tmp->data;
|
||||||
CoglHandle tex_handle = cogl_material_layer_get_texture (layer);
|
CoglHandle tex_handle = cogl_material_layer_get_texture (layer);
|
||||||
CoglTexture *tex = _cogl_texture_pointer_from_handle (tex_handle);
|
|
||||||
|
|
||||||
if (i == 0 && cogl_texture_is_sliced (tex_handle))
|
if (i == 0 && cogl_texture_is_sliced (tex_handle))
|
||||||
{
|
{
|
||||||
@ -1201,11 +1200,14 @@ cogl_polygon (CoglTextureVertex *vertices,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_COGL_GL
|
#ifdef HAVE_COGL_GL
|
||||||
|
{
|
||||||
|
CoglTexture *tex = _cogl_texture_pointer_from_handle (tex_handle);
|
||||||
/* Temporarily change the wrapping mode on all of the slices to use
|
/* Temporarily change the wrapping mode on all of the slices to use
|
||||||
* a transparent border
|
* a transparent border
|
||||||
* XXX: it's doesn't look like we save/restore this, like the comment
|
* XXX: it's doesn't look like we save/restore this, like
|
||||||
* implies? */
|
* the comment implies? */
|
||||||
_cogl_texture_set_wrap_mode_parameter (tex, GL_CLAMP_TO_BORDER);
|
_cogl_texture_set_wrap_mode_parameter (tex, GL_CLAMP_TO_BORDER);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user