I have a program which imports models from
.obj files and then draws them with OpenGL. I have a model which contains many shapes (meshes?). Not every shape has texcoords defined inside .obj file (it looks like
1//1 instead of
1/1/1) and I try to use one shader program which depends on texcoords.
What would be the best solution for that problem? Should I use separate programs for shapes that have texcoords and another for shape without texcoords defined?
Maybe there is a way to check if some attributes were passed to shader program?
This is the gist with .obj, .mtl and shader files, maybe that will help you to understand my problem.