C ++ library for instantiating 3D primitives with OpenGL Core Mode

1

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?

    
asked by anonymous 25.07.2017 / 17:47

0 answers