cogl-material: Fix the warning for when too many layers are used
The warning displayed when too many layers are used had an off-by-one error so that it would display even if exactly the maximum number is used. There was also a missing space at the end of the line in the message which looked wrong when displayed on the terminal. http://bugzilla.openedhand.com/show_bug.cgi?id=2064
This commit is contained in:
parent
a3bc4a6009
commit
3c2bb33cbd
@ -831,7 +831,7 @@ cogl_material_set_layer (CoglHandle material_handle,
|
|||||||
_cogl_material_pre_change_notify (material, FALSE, NULL);
|
_cogl_material_pre_change_notify (material, FALSE, NULL);
|
||||||
|
|
||||||
material->n_layers = g_list_length (material->layers);
|
material->n_layers = g_list_length (material->layers);
|
||||||
if (material->n_layers >= _cogl_get_max_texture_image_units ())
|
if (material->n_layers > _cogl_get_max_texture_image_units ())
|
||||||
{
|
{
|
||||||
if (!(material->flags & COGL_MATERIAL_FLAG_SHOWN_SAMPLER_WARNING))
|
if (!(material->flags & COGL_MATERIAL_FLAG_SHOWN_SAMPLER_WARNING))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user