I need a C ++ library that provides abstract data types for 3D primitives (cubes, spheres, pyramids, etc.) and works in OpenGL Core mode. A fictitious example of what I'm looking for is the following:
int num_segments = 32;
float radius = 5.0f;
float height = 20.0f;
GLfloat* sphere_vertices = Sphere(num_segments, radius);
GLfloat* cylinder = Cylinder(num_segments, radius, height);
GLuint VAO, VBO;
// Some OpenGL function calls
Are there any libraries with these features?