Hi,
I want to use some free 3d models from the internet which provide the obj files and also the texture files. However, there are multiple texture files for the 3d model and up to now I only know how to associate one image file to a 3d model. I know that in the 3d model is broken down into different objects but how do I in the code associate a texture file to a specific object on the model?
Thanks in advance.:)
-David
The simplest approach is to render each texture group separately. Bind all the vertices/texcoords/etc. that correspond to one texture, and bind that texture. Render that group using glDrawElements (or glDrawArrays). Then repeat with the next group.
- Kim