I am trying to implement a class Sphere in C++.
Therefore I want to calculate the vertices in the constructor of the class (or in a seperate function..). Although I read tons of articles about creating spheres in different ways (UV Sphere, Quad Sphere, Icosphere etc.) I did not understand how to create the vertices for my buffer object.
I decided to use the UV Sphere since it is easy to map a texture on it.
A "UV sphere" in this sense is one where the (quad) edges run like lines of latitude and longitude, and the texture is mapped to the sphere like an equirectangular projection.

(Equirectangular Earth texture by Strebe via Wikimedia Commons, CC BY-SA 3.0)
But how can I calculate all the vertices? Do I have to / Should I use indices?
Is it better to use the drawing method with GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN? Or is it just a matter of tastevertex positions and texture coordinates?
For my vertices I use a Vertex struct:
struct Vertex
{
glm::vec3 position;
glm::vec2 texture;
};