In my earlier code, I looped through the objects in the model and set each object’s color with glUniform3fv before drawing it with glDrawElements.
But now I’m combining all the object data into one VBO and drawing it with glMultiDrawElements. This is convenient because I’m using OpenGL-OpenCL interoperability. But how can I set uniform data for each object if I’m not drawing each object separately? Do I need to set the color on a per-vertex basis?
Thanks.