Skip to content

Commit

Permalink
Take out check for GL Error on FrambufferRenderbuffer commands in Set…
Browse files Browse the repository at this point in the history
…RenderTargets.
  • Loading branch information
kjpou1 committed Feb 28, 2013
1 parent ffc647d commit 60ad782
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions MonoGame.Framework/Graphics/GraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1663,11 +1663,17 @@ internal void ApplyRenderTargets(RenderTargetBinding[] renderTargets)
if (renderTarget.DepthStencilFormat != DepthFormat.None)
{
GL.FramebufferRenderbuffer(GLFramebuffer, GLDepthAttachment, GLRenderbuffer, renderTarget.glDepthStencilBuffer);
GraphicsExtensions.CheckGLError();
// http://www.songho.ca/opengl/gl_fbo.html
// FramebufferRenderbuffer should be checked with CheckFramebufferStatus(GLFramebuffer) which is being done
// below. If we check for GLError here we could be catching errors from previous commands and not this.
//GraphicsExtensions.CheckGLError();
if (renderTarget.DepthStencilFormat == DepthFormat.Depth24Stencil8)
{
GL.FramebufferRenderbuffer(GLFramebuffer, GLStencilAttachment, GLRenderbuffer, renderTarget.glDepthStencilBuffer);
GraphicsExtensions.CheckGLError();
// http://www.songho.ca/opengl/gl_fbo.html
// FramebufferRenderbuffer should be checked with CheckFramebufferStatus(GLFramebuffer) which is being done
// below. If we check for GLError here we could be catching errors from previous commands and not this.
//GraphicsExtensions.CheckGLError();
}
}

Expand Down

0 comments on commit 60ad782

Please sign in to comment.