mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
skipped loading of texture if mesh has no textures. Thanks to Lorenzo Marchi
This commit is contained in:
parent
93dcfc93c0
commit
9b8f9bfafb
@ -114,9 +114,11 @@ void RenderRFX::Init(QAction *action, MeshModel &mesh,
|
||||
RfxParser theParser(QDir(shaderDir).absoluteFilePath(action->text()));
|
||||
|
||||
// Small hack that allow to use the current mesh textures for the shaders.
|
||||
QFileInfo meshBaseDir(mesh.fileName.c_str());
|
||||
theParser.setMeshTexture(meshBaseDir.absolutePath()+"/"+QString(mesh.cm.textures[0].c_str()));
|
||||
|
||||
if(mesh.cm.textures.size()>0)
|
||||
{
|
||||
QFileInfo meshBaseDir(mesh.fileName.c_str());
|
||||
theParser.setMeshTexture(meshBaseDir.absolutePath()+"/"+QString(mesh.cm.textures[0].c_str()));
|
||||
}
|
||||
assert(theParser.Parse());
|
||||
activeShader = theParser.GetShader();
|
||||
assert(activeShader);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user