I'm creating an app that uses VBO's for drawing. The app draws line segments of multiple colors. Therefore, I'm creating a vertex and index array for each color, and sorting the segments into the appropriate array by color.
However, I'd like the user to be able to set the color of any line segment. Therefore, my potential number of colors is virtually unlimited (obviously not really, but it might as well be). I'm guessing that generating say 2,000 VBO's to hold 1,000 vertex and index arrays to support 1,000 colors would not be a good thing.
Obviously one could generate a limited number of VBO's and copy new data in each time it was time to draw a new color's vertex array, but that seems incredibly inefficient.
Any suggestions for handling this situation?