Based on https://learnopengl.com/Getting-started/Shaders. Set the triangle's color using a uniform buffer. See shaders (VBO) for a sample that uses the vertex buffer to set the color.
Based on https://learnopengl.com/Getting-started/Shaders. Set the triangle's color using a uniform buffer. See shaders (VBO) for a sample that uses the vertex buffer to set the color.