I'm not sure that my question is clear enough so here the explanations : I'm working on a voxel engine using opengl, it's working fine but I want to improve it a bit with some optimisations. I started to use VBO for the vertices of the cube, I earn some fps so that's great. But now I want to do the same thiong with the color of the cube and I didn't find an answer that please me because I have specifics needed :
I only use 3 float for the color, so even if it works glVertexAttribPointer() doesn't seems to be a good way to go because if I use it I'll need to use 108 float per cube against 3.
I want to draw MANY cubes so use glUniform3f isn't good neither because send 3 float per cubes would be really slow with many cubes to draw.
So with the context my question is, is there a way to store values in the memory of the GPU (like a VBO) and when I draw the cube I would only tell to the shader where are those values ?
Thanks for reading, and may be answering :)