mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-13 03:28:07 +00:00
Renderer.cs - Add SetClearColor function
This commit is contained in:
@@ -36,5 +36,10 @@ namespace PckStudio.Rendering
|
||||
{
|
||||
GL.Viewport(size);
|
||||
}
|
||||
|
||||
public static void SetClearColor(Color color)
|
||||
{
|
||||
GL.ClearColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user