ScreenEffectManager's render callbacks should wrap effect render calls with SpriteBatch begin/end itself
This commit is contained in:
parent
35399fd724
commit
c7afe523ef
|
@ -135,11 +135,13 @@ namespace Blarg.GameFramework.Graphics.ScreenEffects
|
|||
if (_numLocalEffects == 0)
|
||||
return;
|
||||
|
||||
_spriteBatch.Begin();
|
||||
for (var node = _effects.First; node != null; node = node.Next)
|
||||
{
|
||||
if (node.Value.IsLocal)
|
||||
node.Value.Effect.OnRender(delta, _spriteBatch);
|
||||
}
|
||||
_spriteBatch.End();
|
||||
}
|
||||
|
||||
public void OnRenderGlobal(float delta)
|
||||
|
@ -147,11 +149,13 @@ namespace Blarg.GameFramework.Graphics.ScreenEffects
|
|||
if (_numGlobalEffects == 0)
|
||||
return;
|
||||
|
||||
_spriteBatch.Begin();
|
||||
for (var node = _effects.First; node != null; node = node.Next)
|
||||
{
|
||||
if (!node.Value.IsLocal)
|
||||
node.Value.Effect.OnRender(delta, _spriteBatch);
|
||||
}
|
||||
_spriteBatch.End();
|
||||
}
|
||||
|
||||
public void OnResize()
|
||||
|
|
Reference in a new issue