File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change
1
+ #include " nabla.h"
1
2
#include " nbl/system/IApplicationFramework.h"
3
+
2
4
#include < iostream>
3
5
#include < cstdlib>
4
6
#include < string>
5
- #include < fstream>
6
- #include < streambuf>
7
7
8
8
using namespace nbl ;
9
9
using namespace nbl ::system;
@@ -40,7 +40,7 @@ class ShaderCompiler final : public system::IApplicationFramework
40
40
std::string file_to_compile = argv.back ();
41
41
42
42
if (!m_system->exists (file_to_compile, IFileBase::ECF_READ)) {
43
- m_logger->log (" Incorrect arguments. Expecting second argument to be filename of the shader intended to compile." , ILogger::ELL_ERROR);
43
+ m_logger->log (" Incorrect arguments. Expecting last argument to be filename of the shader intended to compile." , ILogger::ELL_ERROR);
44
44
return false ;
45
45
}
46
46
std::string output_filepath = " " ;
@@ -128,12 +128,10 @@ class ShaderCompiler final : public system::IApplicationFramework
128
128
const ICPUShader* open_shader_file (std::string& filepath) {
129
129
130
130
m_assetMgr = make_smart_refctd_ptr<asset::IAssetManager>(smart_refctd_ptr (m_system));
131
- auto resourceArchive = make_smart_refctd_ptr<system::CMountDirectoryArchive>(path (localInputCWD), logger_opt_smart_ptr (smart_refctd_ptr (m_logger)), m_system.get ());
132
- m_system->mount (std::move (resourceArchive));
133
131
134
132
IAssetLoader::SAssetLoadParams lp = {};
135
133
lp.logger = m_logger.get ();
136
- lp.workingDirectory = " " ;
134
+ lp.workingDirectory = localInputCWD ;
137
135
auto assetBundle = m_assetMgr->getAsset (filepath, lp);
138
136
const auto assets = assetBundle.getContents ();
139
137
if (assets.empty ()) {
You can’t perform that action at this time.
0 commit comments