Skip to content

Commit

Permalink
to make sure that re-create framebuffer will clear exist frame buffer…
Browse files Browse the repository at this point in the history
… also.
  • Loading branch information
andy840119 committed Oct 6, 2021
1 parent 64cb04a commit ebecbc6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public MultiShaderBufferedDrawNodeSharedData(RenderbufferInternalFormat[] format

public void CreateDefaultFrameBuffers(IShader[] shaders)
{
shaderBuffers.Clear();
clearBuffers();

var filterMode = PixelSnapping ? All.Nearest : All.Linear;

Expand Down Expand Up @@ -57,7 +57,11 @@ public FrameBuffer[] GetDrawFrameBuffers()
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
clearBuffers();
}

private void clearBuffers()
{
// clear all frame in the dictionary.
foreach (var shaderBuffer in shaderBuffers)
{
Expand Down

0 comments on commit ebecbc6

Please sign in to comment.