I am trying to implement some face based operations in a fragment shader…
My thoughts then are to use some combination of VBOs / uniforms / normal maths, or even the fixed function FrontColor / BackColor uniforms to get the required info into the fragment shader.
Is this the best way to do it?
Any better suggestions?
Without a geometry-shader, you should draw each face independently (meaning: no index-buffer-object, you should use glDrawArrays), and as Jan said - duplicate the same per-face “attribute” onto the 3 vertices. This will increase the size of the VBO many times and ignore gpus’ cache of already-computed vertices.