From f0cb8cdc5ce551b103991e0e36ef7aa0f6dbdd62 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Thu, 12 Aug 2021 21:29:43 +1000 Subject: [PATCH] GL/Texture: Don't set max level on GLES2 --- src/common/gl/texture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/gl/texture.cpp b/src/common/gl/texture.cpp index c36e55ecc..d22d5b45c 100644 --- a/src/common/gl/texture.cpp +++ b/src/common/gl/texture.cpp @@ -55,7 +55,9 @@ bool Texture::Create(u32 width, u32 height, u32 samples, GLenum internal_format, glTexParameteri(target, GL_TEXTURE_WRAP_T, wrap ? GL_REPEAT : GL_CLAMP_TO_EDGE); } - glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 1); + // This doesn't exist on GLES2. + if (!GLAD_GL_ES_VERSION_2_0 || GLAD_GL_ES_VERSION_3_0) + glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, 1); GLenum error = glGetError(); if (error != GL_NO_ERROR)