I am working with opengl 3.1+GLSL 1.4 on ubuntu.
I am developing an application to display 3D meshes in order to some processing on it.
Till now I can display the mesh using Assimp library.
My question is : How can i change the color of some vertex?
Knowing that the set of points to change color is variable (the number and position is not fixed),
I load them from a file.
Any help is appreciated.
There is no quick way to do this. One options is to keep the colour component of all vertices in a separate buffer and reload that buffer with the set of colours each draw. Another is to build an index buffer of vertices for each colour you need to render and set a uniform for the colour
Thank you tonyo_au.
The first method looks more simple. But i guess it is RAM consuming since the color change will be done on CPU. Thats why i think that the second method is more sophisticated.