I have implemented in OpenGL alpha blending for a triangle mesh. I render this mesh using a vector of indices that indicate which vertex from a vertices vector should be drawn. The problem is to correctly apply the translucency triangles should be sorted from back to front (based on the distance from the camera). Sorting just the indices list wont do it because i need 3 indices to create a triangle everytime. Is there a way to sort the vertices list so that the indices point correctly to that list without changing the order of the indices?
Thank you very much,
Any help appreciated!