Skip to content

Commit

Permalink
Fixed|libgui|ModelDrawable: Initialize UV bounds of maps not included…
Browse files Browse the repository at this point in the history
… in material

Previously if, say, a diffuse map was not defined in a material, the
diffuse UV bounds would be uninitialized and would fall back to using
the entire atlas.
  • Loading branch information
skyjake committed Aug 17, 2015
1 parent 6a0698f commit e6aaabc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doomsday/sdk/libgui/src/graphics/modeldrawable.cpp
Expand Up @@ -872,6 +872,15 @@ DENG2_PIMPL(ModelDrawable)
{
*texBounds[t] = atlas->imageRectf(material.texIds[map]).xywh();
}
else if(defaultTexIds[map])
{
*texBounds[t] = atlas->imageRectf(defaultTexIds[map]).xywh();
}
else
{
// Not included in material.
*texBounds[t] = Vector4f();
}
}
}

Expand Down

0 comments on commit e6aaabc

Please sign in to comment.