View Full Version : Objects, different materials, efficiency

12-26-2015, 09:48 PM
Suppose we have a room with the following description. I have a cot in a corner, completely made of wood, with a bed on it. The wood material and bed material are different. I have a table and a chair in another corner, also made of wood, but for the sake of present discussion lets assume they are different from the wood of cot. I have a lamp on the table. The lamp stand is of metal and the bulb covering is of transparent plastic. The three walls of the room are covered with tapestries which, for our discussion, means are yet of another new material. The fourth wall has a window which has metal(again different from the metal of lamp) grills. The flour of the room has a carpet with same material parameters as that of the tapestries.

Now I have vertices, light parameters, textures, material parameters with me. I am interested in how opengl pros tackle this situation. I mean the way they combine objects for submitting calls, how often they change texture, material states etc. This is my first project and its bit overwhelming :D