[Fix] (State): start the clear colour at GL's (0, 0, 0, 0), not opaque black

This commit is contained in:
2026-10-02 12:50:36 -04:00
parent 258b946086
commit 8da082f805
2 changed files with 19 additions and 2 deletions
+4 -2
View File
@@ -304,8 +304,10 @@ namespace MobileGL {
Bool DepthClampEnabled = false;
Bool TextureCubeMapSeamlessEnabled = false;
// Clear State
FloatVec4 ClearColor = FloatVec4(0.0f, 0.0f, 0.0f, 1.0f);
// Clear State. GL's initial clear colour is (0, 0, 0, 0) (GL 4.6 core table 23.24): an
// application that never calls glClearColor - or caches it and skips the redundant call -
// clears to transparent, and offscreen layers depend on it.
FloatVec4 ClearColor = FloatVec4(0.0f, 0.0f, 0.0f, 0.0f);
Float ClearDepth = 1.0f;
Uint32 ClearStencil = 0;
FloatVec4 BlendColor = FloatVec4(0.0f, 0.0f, 0.0f, 0.0f);