From: Mikko Rasa Date: Wed, 31 Mar 2021 19:39:18 +0000 (+0300) Subject: Fill in the required version if empty X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=429c48f064b094d5bb3e010b41aaae8dcabff901 Fill in the required version if empty Most of the version checks won't trigger for GLSL 1.20 and none will for GLSL 1.10. --- diff --git a/source/glsl/finalize.cpp b/source/glsl/finalize.cpp index 0725b739..8a525e37 100644 --- a/source/glsl/finalize.cpp +++ b/source/glsl/finalize.cpp @@ -89,7 +89,12 @@ void LegacyConverter::apply(Stage &s, const Features &feat) stage = &s; features = feat; if(supports_stage(s.type)) + { s.content.visit(*this); + + if(!stage->required_features.glsl_version) + stage->required_features.glsl_version = Version(1, (stage->required_features.gl_api==OPENGL_ES2 ? 0 : 10)); + } else unsupported(format("Stage %s is not supported", Stage::get_stage_name(s.type))); }