From: Mikko Rasa Date: Sat, 24 Apr 2021 19:35:30 +0000 (+0300) Subject: Compile SPIR-V modules from GLSL if needed X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=01a513693c7856a3d7ab8860667d7dc68852af18;p=libs%2Fgl.git Compile SPIR-V modules from GLSL if needed --- diff --git a/source/resources/resources.cpp b/source/resources/resources.cpp index c9db211b..11dc2d32 100644 --- a/source/resources/resources.cpp +++ b/source/resources/resources.cpp @@ -210,6 +210,15 @@ Module *Resources::create_module(const string &name) return module.release(); } } + else if(ext==".spv") + { + if((io = open_raw(FS::basepart(name)+".glsl"))) + { + RefPtr module = new SpirVModule; + module->load_source(*io, this, name); + return module.release(); + } + } return 0; }