Add #include processing to glslang (though turned off by default).
When an include directive is recognized by the preprocessor, it executes a callback on the filepath argument to obtain the file contents. That way the compilation client can deal with the file system, include paths, etc. Currently only accepts quoted filepaths -- no angle brackets yet.
This commit is contained in:
parent
1363fcd60b
commit
7be4b8282d
14 changed files with 142 additions and 21 deletions
|
|
@ -83,8 +83,8 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace glslang {
|
||||
|
||||
TPpContext::TPpContext(TParseContext& pc) :
|
||||
preamble(0), strings(0), parseContext(pc), inComment(false)
|
||||
TPpContext::TPpContext(TParseContext& pc, const TShader::Includer& inclr) :
|
||||
preamble(0), strings(0), parseContext(pc), includer(inclr), inComment(false)
|
||||
{
|
||||
InitAtomTable();
|
||||
InitScanner();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue