From 01a513693c7856a3d7ab8860667d7dc68852af18 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 24 Apr 2021 22:35:30 +0300 Subject: [PATCH] Compile SPIR-V modules from GLSL if needed --- source/resources/resources.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- 2.45.2