- replaced the missing modified files by the originals
- added a reference to a vector of floats in traits so that it fills it instead of drawing the bboxes
I don't really understand why it is called points+normals as it never was the normals, but anyway.
The problem is that the points are drawn twice, once with draw and once with draw_edges.
No more gluTessPolygon, which means the light does not reveal strange triangles in the surface, but the way nef_Polyhedron deals with the vertices from an OFF file makes a Triangulation mandatory for every polygon, even if it already is triangulated.
I moved the texture drawing in the fragment shader, this way the drawing is done by pixel and not by primitive. Forgot about that before I code inimplicit_fuction where it was obvious.
The spheres appears with quads in the wiremode. It was just an implementation of the conversion code from triangles to lines when filling the positions_wire_spheres vector.
Polylines now use shaders, and spheres are made without gluSphere. The displayList has been replaced bay an Instanced drawing of the shperes with the function DrawArraysInstanced.
The textured polyhedron now use shaders to display an abject and its textures. The draw function doesn't call the Textured_Polyhedron.h function anymore, only to compute the normals.
The test to know if a polygon is triangulated is now done once per changed() call,
and it iterates the faces until it finds one that is not a triangle.
Facets and Edges have now each their own program.
I had to change attrib_uniform to get a parameter which precise which program we are using.
GlUseProgram is now done in attrib_uniform.
I changed a few details in polygon_soup_item, like the sizeof(float) or the size of the location array.
Fixed the bug that deformed an item in polyhedron_item, caused by glGet(GL_POLYGON_MODE) that takes an array of 2 int and not a single int.
Implemented the color changes in polyhedron_item depending of the selection.
uniform_attrib() takes the viewer as argument. That way, `mvp_mat` and
`mv_mat` can be local variables of the method.
The two drawing method draw() and draw_points() both take the viewer as
argument, and no longer setup the buffers (they only use them).
Add cleanup code at the end of the drawing methods.
(See ../../../Mesh_3/demo/Mesh_3/Scene_segmented_image_item.cpp for a
very clean OpenGL code.)
New function initialize_buffers(), that is called in
changed(). compile_shaders() is only call once, in the constructor (but
it should be a static initialization).
glGenBuffers() and others are also called in the constructor.
Add cleanup code at the end of initialize_buffers().