From d17fd56dc42fcd35ef8cf2fe9e4cd7a26ce8ba2a Mon Sep 17 00:00:00 2001 From: Rye Date: Tue, 10 Dec 2024 20:21:24 -0500 Subject: Fix crashes from shader load failures under RenderMaxOpenGLVersion 3.1/3.2/3.3 (#3184) --- indra/llrender/llshadermgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 47f1032c34..254ead2bd8 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -580,7 +580,8 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev } else { - if (type == GL_GEOMETRY_SHADER) + // OpenGL 3.2 had GLSL version 1.50. anything after that the version numbers match. + if (type == GL_GEOMETRY_SHADER || minor_version >= 50) { //set version to 1.50 shader_code_text[shader_code_count++] = strdup("#version 150\n"); -- cgit v1.2.3