1
0
Fork 0
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:
fgenesis 2022-05-25 01:05:52 +02:00
parent f466e1e7c8
commit f91d66a0e0

View file

@ -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
{ {