From 3f1d76cd9f87434e64c1b3757cb77274405b090a Mon Sep 17 00:00:00 2001 From: kichikuou Date: Mon, 3 Oct 2022 21:55:31 +0900 Subject: [PATCH] Fix text rendering issue in OpenGL ES This fixes an issue where text is not rendered on Android. In OpenGL ES3.0, GL_RED is not a valid value for the internalFormat parameter of glTexImage2D. --- src/video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video.c b/src/video.c index 697fedf..9612c0f 100644 --- a/src/video.c +++ b/src/video.c @@ -532,7 +532,7 @@ void gfx_init_texture_amap(struct texture *t, int w, int h, uint8_t *amap, SDL_C void gfx_init_texture_rmap(struct texture *t, int w, int h, uint8_t *rmap) { init_texture(t, w, h); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, w, h, 0, GL_RED, GL_UNSIGNED_BYTE, rmap); + glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, w, h, 0, GL_RED, GL_UNSIGNED_BYTE, rmap); } void gfx_init_texture_blank(struct texture *t, int w, int h)