From 6931571861960f0393aebb3a688c13b5a81bd8b0 Mon Sep 17 00:00:00 2001 From: Jan CW Kroeze Date: Thu, 11 Mar 2021 21:13:25 +0100 Subject: [PATCH] Note GL blend state for stb_truetype --- stb_truetype.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stb_truetype.h b/stb_truetype.h index 62595a1..542a890 100644 --- a/stb_truetype.h +++ b/stb_truetype.h @@ -297,6 +297,8 @@ void my_stbtt_initfont(void) void my_stbtt_print(float x, float y, char *text) { // assume orthographic projection with units = screen pixels, origin at top left + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, ftex); glBegin(GL_QUADS);