From 6da80f58ba8f51fc768f177f28a7d818b03c434e Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 13 Jul 2017 09:12:50 -0700 Subject: Allow GLSL `#version` to be selected based on profile Fixes #83 - The basic idea is that I added a bunch of more specific profile names line `glsl_vertex_430` which indicate the desired GLSL version the user wants. - An explicit `#version` line in the code always overrides one specified by profile, though --- source/slang/compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/compiler.cpp') diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp index 284bb200a..4c3885ebf 100644 --- a/source/slang/compiler.cpp +++ b/source/slang/compiler.cpp @@ -72,7 +72,7 @@ namespace Slang Profile Profile::LookUp(char const* name) { #define PROFILE(TAG, NAME, STAGE, VERSION) if(strcmp(name, #NAME) == 0) return Profile::TAG; - #define PROFILE_ALIAS(TAG, NAME) if(strcmp(name, #NAME) == 0) return Profile::TAG; + #define PROFILE_ALIAS(TAG, DEF, NAME) if(strcmp(name, #NAME) == 0) return Profile::TAG; #include "profile-defs.h" return Profile::Unknown; -- cgit v1.2.3