Use Assimp library
Mesh
I use a mesh class to store vertices, intices and texture coords.
Set up
Render
We get correspond uniform value name from 0 to n per texture type. like “material.texture_diffuse0”, “material.texture_specular1”. Give the value to active texture unit and bind the texture.
Model
Use Assimp to load model and get assimp scene and assimp mesh.
We need to get data from assimp mesh to set up the mesh that we defined.
Also we need to be careful that sometimes the model does not have texture images. Instead, it has a default texture that is from the modeling software