Browse Source

feat(OpenGL): Address rule CA1822

pull/9189/head
Giuseppe Lippolis 4 years ago
parent
commit
713b85522f
  1. 8
      src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs

8
src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs

@ -27,7 +27,7 @@ namespace Avalonia.OpenGL.Controls
_context.GlInterface.BindFramebuffer(GL_FRAMEBUFFER, _fb);
EnsureTextureAttachment();
EnsureDepthBufferAttachment(_context.GlInterface);
if(!CheckFramebufferStatus(_context.GlInterface))
if(!OpenGlControlBase.CheckFramebufferStatus(_context.GlInterface))
return;
OnOpenGlRender(_context.GlInterface, _fb);
@ -38,7 +38,7 @@ namespace Avalonia.OpenGL.Controls
base.Render(context);
}
private void CheckError(GlInterface gl)
private static void CheckError(GlInterface gl)
{
int err;
while ((err = gl.GetError()) != GL_NO_ERROR)
@ -186,7 +186,7 @@ namespace Avalonia.OpenGL.Controls
EnsureDepthBufferAttachment(gl);
EnsureTextureAttachment();
return CheckFramebufferStatus(gl);
return OpenGlControlBase.CheckFramebufferStatus(gl);
}
catch(Exception e)
{
@ -197,7 +197,7 @@ namespace Avalonia.OpenGL.Controls
}
}
private bool CheckFramebufferStatus(GlInterface gl)
private static bool CheckFramebufferStatus(GlInterface gl)
{
var status = gl.CheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE)

Loading…
Cancel
Save