windows logging
This commit is contained in:
@@ -87,7 +87,6 @@ ResourceBuffer PolyvoxFilamentPlugin::loadResource(const char *name) {
|
|||||||
targetFilePath = exeDir.wstring() + L"data/flutter_assets/" +
|
targetFilePath = exeDir.wstring() + L"data/flutter_assets/" +
|
||||||
assetPath;
|
assetPath;
|
||||||
}
|
}
|
||||||
std::wcout << "Loading from " << targetFilePath << std::endl;
|
|
||||||
std::streampos length;
|
std::streampos length;
|
||||||
|
|
||||||
std::ifstream is(targetFilePath.c_str(), std::ios::binary);
|
std::ifstream is(targetFilePath.c_str(), std::ios::binary);
|
||||||
@@ -97,6 +96,7 @@ ResourceBuffer PolyvoxFilamentPlugin::loadResource(const char *name) {
|
|||||||
}
|
}
|
||||||
is.seekg(0, std::ios::end);
|
is.seekg(0, std::ios::end);
|
||||||
length = is.tellg();
|
length = is.tellg();
|
||||||
|
|
||||||
char *buffer;
|
char *buffer;
|
||||||
buffer = new char[length];
|
buffer = new char[length];
|
||||||
is.seekg(0, std::ios::beg);
|
is.seekg(0, std::ios::beg);
|
||||||
@@ -105,6 +105,9 @@ ResourceBuffer PolyvoxFilamentPlugin::loadResource(const char *name) {
|
|||||||
auto id = _resources.size();
|
auto id = _resources.size();
|
||||||
auto rb = ResourceBuffer(buffer, length, id);
|
auto rb = ResourceBuffer(buffer, length, id);
|
||||||
_resources.emplace(id, rb);
|
_resources.emplace(id, rb);
|
||||||
|
|
||||||
|
std::wcout << "Loaded resource of length " << length << " from path " << targetFilePath << std::endl;
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user