From 713b85522f34cc768a31ecf0fd8f28410d0ec1f6 Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Fri, 14 Oct 2022 17:11:19 +0200 Subject: [PATCH] feat(OpenGL): Address rule CA1822 --- src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs b/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs index 279e7e750d..6f87ff19ee 100644 --- a/src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs +++ b/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)