ENH: enable wireframe

This reverts commit ed6e149381240fd83b61da70891127d400f30a39.

Change-Id: I010871fcf22322214c627fe907539c0916fa6ff5
This commit is contained in:
lane.wei 2022-10-22 21:37:48 +08:00 committed by Lane.Wei
parent 5e024f75b9
commit 79b5c94f4f
10 changed files with 263 additions and 38 deletions

View file

@ -112,6 +112,7 @@ protected:
// BBS
struct TrianglePatch {
std::vector<float> patch_vertices;
std::vector<int> triangle_indices;
std::vector<int> facet_indices;
EnforcerBlockerType type = EnforcerBlockerType::NONE;
@ -160,11 +161,15 @@ protected:
void clear()
{
// BBS
this->m_vertices_VBO_ids.clear();
this->m_triangle_indices_VBO_ids.clear();
this->m_triangle_indices_sizes.clear();
for (TrianglePatch& patch : this->m_triangle_patches)
{
patch.patch_vertices.clear();
patch.triangle_indices.clear();
}
this->m_triangle_patches.clear();
}
@ -174,7 +179,7 @@ protected:
return this->m_triangle_indices_VBO_ids[triangle_indices_idx] != 0;
}
std::vector<float> m_patch_vertices;
//std::vector<float> m_patch_vertices;
std::vector<TrianglePatch> m_triangle_patches;
// When the triangle indices are loaded into the graphics card as Vertex Buffer Objects,
@ -183,7 +188,8 @@ protected:
// IDs of the Vertex Array Objects, into which the geometry has been loaded.
// Zero if the VBOs are not sent to GPU yet.
unsigned int m_vertices_VBO_id{ 0 };
//unsigned int m_vertices_VBO_id{ 0 };
std::vector<unsigned int> m_vertices_VBO_ids;
std::vector<unsigned int> m_triangle_indices_VBO_ids;
std::vector<std::array<float, 4>> m_ebt_colors;