Original Post
Hi, I am currently working on a small modelformat and I am at the point of implementing a simple material system. Anyways, I could need some input on how to properly do this. Lets say each material only links to one texture for simplicity. How can I avoid that I load the texture twice if I have to different models using the same materials? I thought about having a materialManager class or something which loads all the materials of the requested models at once so you would basically have one class that knows about all the materials in the scene and avoids loading stuff twice for instance. Is there a common way to do this? (my first idea was to simply load the materials from the modelLoader class but that way its not global and does not know which materials are used in other models) And also, doesnt it make sense to draw all the faces of the same material in a scene at once? or do you usually only sort faces by material per model? thanks! [Edited by - mokaschitta on November 12, 2009 5:30:43 AM]