Skip to content

Commit eb87442

Browse files
minor corrections
1 parent 0fe462f commit eb87442

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tools/nsc/main.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
#include "nabla.h"
12
#include "nbl/system/IApplicationFramework.h"
3+
24
#include <iostream>
35
#include <cstdlib>
46
#include <string>
5-
#include <fstream>
6-
#include <streambuf>
77

88
using namespace nbl;
99
using namespace nbl::system;
@@ -40,7 +40,7 @@ class ShaderCompiler final : public system::IApplicationFramework
4040
std::string file_to_compile = argv.back();
4141

4242
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);
4444
return false;
4545
}
4646
std::string output_filepath = "";
@@ -128,12 +128,10 @@ class ShaderCompiler final : public system::IApplicationFramework
128128
const ICPUShader* open_shader_file(std::string& filepath) {
129129

130130
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));
133131

134132
IAssetLoader::SAssetLoadParams lp = {};
135133
lp.logger = m_logger.get();
136-
lp.workingDirectory = "";
134+
lp.workingDirectory = localInputCWD;
137135
auto assetBundle = m_assetMgr->getAsset(filepath, lp);
138136
const auto assets = assetBundle.getContents();
139137
if (assets.empty()) {

0 commit comments

Comments
 (0)