mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 14:34:34 +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);
|
||||
}
|
||||
|
||||
if (rs.pass == RENDER_ALL || rs.pass == renderPass)
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
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,
|
||||
// so that needs to be multiplied in unconditionally
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue