You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Axmol cannot find the required shader, is there a way to handle the error so as to get the names of shader files?
This is happening here, and I would really like to have some kind of onError callback in which you can get an not found file:
(axmol-dev\axmol\renderer\ProgramManager.cpp)
Program* ProgramManager::loadProgram(std::string_view vsName,
std::string_view fsName,
uint32_t progType,
uint64_t progId,
VertexLayoutKind vlk)
{
assert(!vsName.empty() && !fsName.empty());
auto it = _cachedPrograms.find(progId);
if (it != _cachedPrograms.end())
return it->second;
auto fileUtils = FileUtils::getInstance();
auto vertFile = fileUtils->fullPathForFilename(vsName);
auto fragFile = fileUtils->fullPathForFilename(fsName);
-> auto vertSource = fileUtils->getDataFromFile(vertFile);
-> auto fragSource = fileUtils->getDataFromFile(fragFile);
-> auto program = axdrv->createProgram(std::move(vertSource), std::move(fragSource));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
If Axmol cannot find the required shader, is there a way to handle the error so as to get the names of shader files?
This is happening here, and I would really like to have some kind of onError callback in which you can get an not found file:
(axmol-dev\axmol\renderer\ProgramManager.cpp)
Program* ProgramManager::loadProgram(std::string_view vsName,
std::string_view fsName,
uint32_t progType,
uint64_t progId,
VertexLayoutKind vlk)
{
assert(!vsName.empty() && !fsName.empty());
-> auto vertSource = fileUtils->getDataFromFile(vertFile);
-> auto fragSource = fileUtils->getDataFromFile(fragFile);
-> auto program = axdrv->createProgram(std::move(vertSource), std::move(fragSource));
Beta Was this translation helpful? Give feedback.
All reactions