Shaders are loaded using absolute paths. This causes issues when the simulator is called from a different path. It was always rendering red frames because of this.
I have a simple solution where you can set a shadersPath member to the MatterSim class, and define a setShadersPath() method to assign the variable. The shaders path would then be accessed as shadersPath + "/vertex.sh" (or) shadersPath + "/fragment.sh". I can send a pull request if this is acceptable.
Shaders are loaded using absolute paths. This causes issues when the simulator is called from a different path. It was always rendering red frames because of this.
https://github.com/peteanderson80/Matterport3DSimulator/blob/229af69ad059183f2bbf8358213ff9f054492255/src/lib/MatterSim.cpp#L176
I have a simple solution where you can set a
shadersPath
member to theMatterSim
class, and define asetShadersPath()
method to assign the variable. The shaders path would then be accessed asshadersPath + "/vertex.sh"
(or)shadersPath + "/fragment.sh"
. I can send a pull request if this is acceptable.