Add support for GL_ARB_shading_language_include
Add support for GL_ARB_shading_language_include. Usage is identical to the way GL_GOOGLE_include_directive currently works glslang (since GL_ARB_shading_language_include is inherently a runtime feature and glslang is an offline compiler). Users can simulate their runtime environment by using a custom glslang::TShader::Includer or using filenames that match their GL runtime names. Closes #249.
This commit is contained in:
parent
fa04cdf355
commit
b0df68c490
12 changed files with 59 additions and 6 deletions
|
|
@ -973,7 +973,8 @@ int TPpContext::readCPPline(TPpToken* ppToken)
|
|||
break;
|
||||
case PpAtomInclude:
|
||||
if(!parseContext.isReadingHLSL()) {
|
||||
parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include");
|
||||
const std::array exts = { E_GL_GOOGLE_include_directive, E_GL_ARB_shading_language_include };
|
||||
parseContext.ppRequireExtensions(ppToken->loc, exts, "#include");
|
||||
}
|
||||
token = CPPinclude(ppToken);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue