I want to make a class for storing of my objects. so far I have made a little class that has a vertex array and a triangle index.
the rendering function is built in in this class so I only make a call like this:
the render function is rendering with singel triangles (GL_TRIANGLES), before the loop I rotate, move and set the material. this information is stored in my object class.
but in the OpenGL book I have (superbibel 2nd ed.) they set the material when they setup the lights, and then they use glColor to set the color of the object.
is there any difference when I set material like this ? why do they set the material when they set the lights ? isn´t the material for the object ?
and then I wan´t to know if there is any difference in speed using single triangles then triangle strips or quads ?
what do I need to have in my object class to draw the object I like ?