From 06acff400c154ff830fbac636583bfd31fb72785 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Thu, 14 May 2020 07:08:56 +0100 Subject: [PATCH] Fix the blend test sample. We're using a perspective projection where -Z goes into the screen, so we need to shift positive --- samples/blend_test/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/blend_test/main.c b/samples/blend_test/main.c index 65e58ec..2635e9b 100644 --- a/samples/blend_test/main.c +++ b/samples/blend_test/main.c @@ -79,12 +79,11 @@ void DrawGLScene() // RIGHT SECTION // This should draw 2 quad, a red first, then and overlapping blue one. - // This section uses a LOWER Z VALUE(-0.01f), so the blue quad should be in FRONT of the red quad. - // lerabot's note : changing the z value to positive gives the desired output. + // This section uses a HIGHER Z VALUE(0.01f), so the blue quad should be in FRONT of the red quad. glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); DrawQuad(RED); - glTranslatef(1.0, 0, -0.01); + glTranslatef(1.0, 0, 0.01); DrawQuad(BLUE); glDisable(GL_BLEND);