From: Mikko Rasa Date: Mon, 11 Oct 2021 13:27:46 +0000 (+0300) Subject: Adjust GLSL features factory function names X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d1e4737;p=libs%2Fgl.git Adjust GLSL features factory function names Make it clear these functions deal with OpenGL versions. --- diff --git a/source/glsl/features.cpp b/source/glsl/features.cpp index 943f3b06..eff7dd8d 100644 --- a/source/glsl/features.cpp +++ b/source/glsl/features.cpp @@ -4,7 +4,7 @@ namespace Msp { namespace GL { namespace SL { -Features Features::from_version(const Version &ver) +Features Features::from_opengl_version(const Version &ver) { Features features; features.target_api = OPENGL; @@ -24,9 +24,9 @@ Features Features::from_version(const Version &ver) return features; } -Features Features::latest() +Features Features::opengl_latest() { - return from_version(Version(4, 60)); + return from_opengl_version(Version(4, 60)); } } // namespace SL diff --git a/source/glsl/features.h b/source/glsl/features.h index 14cc2b37..b72aa3d9 100644 --- a/source/glsl/features.h +++ b/source/glsl/features.h @@ -23,8 +23,8 @@ struct Features unsigned uniform_binding_range = 84; unsigned texture_binding_range = 96; - static Features from_version(const Version &); - static Features latest(); + static Features from_opengl_version(const Version &); + static Features opengl_latest(); }; } // namespace SL diff --git a/tools/glslcompiler.cpp b/tools/glslcompiler.cpp index 458a56ce..5dfd520d 100644 --- a/tools/glslcompiler.cpp +++ b/tools/glslcompiler.cpp @@ -28,7 +28,7 @@ using namespace std; using namespace Msp; GlslCompiler::GlslCompiler(int argc, char **argv): - features(GL::SL::Features::latest()), + features(GL::SL::Features::opengl_latest()), compile_mode(GL::SL::Compiler::PROGRAM), parse_only(false), combined(false), @@ -54,7 +54,7 @@ GlslCompiler::GlslCompiler(int argc, char **argv): getopt(argc, argv); if(target_version) - features = GL::SL::Features::from_version(GL::Version(target_version/100, target_version%100)); + features = GL::SL::Features::from_opengl_version(GL::Version(target_version/100, target_version%100)); if(as_module) {