@@ -203,7 +203,7 @@ static void GfxAddVertices(const TriVertex arr[][3], int arrCount, unsigned int
203203 GfxFlushIfOverBudget ();
204204}
205205
206- // Modern Shader for Switch OpenGL 4.3 Core Profile
206+ // Modern Shader with diagnostic BLUE tint for Switch
207207static constexpr const char *SHADER_CODE = R"DELIMITER(
208208#ifdef VERTEX
209209 layout(location = 0) in vec3 position;
@@ -228,10 +228,14 @@ static constexpr const char *SHADER_CODE = R"DELIMITER(
228228 in vec2 v2f_uv;
229229 out vec4 fragColor;
230230 void main() {
231+ vec4 baseColor;
231232 if (UseTexture == 1)
232- fragColor = texture2D (TextureSamp, v2f_uv) * v2f_color;
233+ baseColor = texture (TextureSamp, v2f_uv) * v2f_color;
233234 else
234- fragColor = v2f_color;
235+ baseColor = v2f_color;
236+
237+ // ADD BLUE TINT FOR DIAGNOSIS: If we see CYAN, the drawing is working but textures might be black.
238+ fragColor = baseColor + vec4(0.0, 0.0, 0.3, 0.0);
235239 }
236240#endif
237241)DELIMITER" ;
@@ -1174,8 +1178,8 @@ void GLInterface::UpdateViewport()
11741178 glViewport (0 , 0 , width, height);
11751179 mPresentationRect = Rect (0 , 0 , width, height);
11761180
1177- // Debug Pink Background to verify rendering is active
1178- glClearColor (1 .0f , 0 .0f , 1 .0f , 1 .0f );
1181+ // Debug GREEN Background to confirm build is NEW
1182+ glClearColor (0 .0f , 1 .0f , 0 .0f , 1 .0f );
11791183 glClear (GL_COLOR_BUFFER_BIT);
11801184 Flush ();
11811185#else
@@ -1229,6 +1233,7 @@ int GLInterface::Init(bool IsWindowed)
12291233 if (!inited)
12301234 {
12311235 inited = true ;
1236+ printf (" \n >>> [GLInterface] Pipeline Init: OpenGL 4.3 Modern <<<\n\n " );
12321237 PlatformGLInit ();
12331238
12341239 gProgram = shaderLoad (SHADER_CODE);
@@ -1262,8 +1267,8 @@ int GLInterface::Init(bool IsWindowed)
12621267 glGetIntegerv (GL_MAX_TEXTURE_SIZE, &aMaxSize);
12631268 MAX_TEXTURE_SIZE = aMaxSize;
12641269
1265- // Gray clear color for debugging (change to 0,0,0,1 later )
1266- glClearColor (0 .1f , 0 . 1f , 0 .1f , 1 .0f );
1270+ // GREEN clear color for debugging (matches UpdateViewport )
1271+ glClearColor (0 .0f , 1 . 0f , 0 .0f , 1 .0f );
12671272 glClear (GL_COLOR_BUFFER_BIT);
12681273
12691274 gTextureSizeMustBePow2 = false ;
@@ -1294,9 +1299,9 @@ int GLInterface::Init(bool IsWindowed)
12941299 glDisable (GL_DEPTH_TEST);
12951300 glDisable (GL_CULL_FACE);
12961301#ifndef NINTENDO_SWITCH
1297- glDisable (GL_FRAMEBUFFER_SRGB); // Prevent double gamma correction (already sRGB passthrough)
1302+ glDisable (GL_FRAMEBUFFER_SRGB);
12981303#endif
1299- glGetError (); // clear GL_INVALID_ENUM on pure GLES implementations
1304+ glGetError ();
13001305
13011306 mRGBBits = 32 ;
13021307 mRedBits = 8 ; mGreenBits = 8 ; mBlueBits = 8 ;
0 commit comments