mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-29 03:33:48 +00:00
bind texture only when we're really about to render
This commit is contained in:
parent
f466e1e7c8
commit
f91d66a0e0
1 changed files with 19 additions and 19 deletions
|
@ -560,6 +560,8 @@ void RenderObject::renderCall(const RenderState& rs) const
|
||||||
(*i)->render(rs);
|
(*i)->render(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rs.pass == RENDER_ALL || rs.pass == renderPass)
|
||||||
|
{
|
||||||
if (texture)
|
if (texture)
|
||||||
{
|
{
|
||||||
if (texture->textures[0] != lastTextureApplied || repeatTexture != lastTextureRepeat)
|
if (texture->textures[0] != lastTextureApplied || repeatTexture != lastTextureRepeat)
|
||||||
|
@ -579,8 +581,6 @@ void RenderObject::renderCall(const RenderState& rs) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rs.pass == RENDER_ALL || rs.pass == renderPass)
|
|
||||||
{
|
|
||||||
// RenderState color applies to everything in the scene graph,
|
// RenderState color applies to everything in the scene graph,
|
||||||
// so that needs to be multiplied in unconditionally
|
// so that needs to be multiplied in unconditionally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue