Renderer.cs - Add SetClearColor function

This commit is contained in:
miku-666
2024-02-12 20:52:17 +01:00
parent c6e800be63
commit 051cc56977
2 changed files with 6 additions and 1 deletions

View File

@@ -36,5 +36,10 @@ namespace PckStudio.Rendering
{
GL.Viewport(size);
}
public static void SetClearColor(Color color)
{
GL.ClearColor(color);
}
}
}

View File

@@ -278,6 +278,7 @@ namespace PckStudio.Rendering
InitializeShaders();
InitializeFramebuffer();
UploadMeshData();
Renderer.SetClearColor(BackColor);
initialized = true;
}
@@ -677,7 +678,6 @@ namespace PckStudio.Rendering
MakeCurrent();
framebuffer.Bind();
GL.ClearColor(BackColor);
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.Enable(EnableCap.DepthTest); // Enable correct Z Drawings