So I have this
.obj model on which I want to run a custom shader, but it simply display the gray 3D model like if the shader wasn’t loaded at all.
I have no error, and it’s working fine with any other 3D primitive.
Also if I simply use
texture.unbind(), the texture is correctly applied (the
.obj have its
model.draw(OF_MESH_FILL); // boring gray model
plane.draw(); // shader works as expected
Somebody have any insight on this ?
What happens if you try your shader with another model? it it works with the primitives, and it works with another model, then it is a problem in the way the model is created.
btw, draw(OF_MESH_FILL) and drawFaces() are the same thing
Yeah, I’ve tried with a whole batch of models with the same result.
getMesh() seems to work but the meshes are very small.
Nonetheless it is still weird that I can use
setColor() on a model but not a shader (even a basic red color shader produces the same output) …
Ok so I got it !
I went and look into the ofxAssimpModelLoader source and found this that was presumably overriding my shader :
model.disableMaterials(); and it works now