17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 02:49:19 +02:00

Structure gauge: no red highlight of the intruding triangles

This commit is contained in:
maj00r
2026-10-04 02:27:52 +02:00
parent 1ab5e1e8c3
commit e69601dfa0
4 changed files with 13 additions and 28 deletions

View File

@@ -23,7 +23,6 @@ struct editor_overlay
{
glm::vec4 color{1.0f};
unsigned int type{0}; // GL primitive
bool offset{false}; // pulled towards the camera, to show over the coplanar surfaces
std::vector<glm::vec3> points; // relative to the origin
};
glm::dvec3 origin{0.0};

View File

@@ -4531,14 +4531,8 @@ void opengl33_renderer::Render_editor_overlay()
{
if (batches[i].points.empty() || m_editor_overlay_geometry[i] == null_handle)
continue;
if (batches[i].offset)
{
::glEnable(GL_POLYGON_OFFSET_FILL);
::glPolygonOffset(-2.f, -2.f);
}
model_ubs.param[0] = batches[i].color;
draw(m_editor_overlay_geometry[i]);
::glDisable(GL_POLYGON_OFFSET_FILL);
++m_renderpass.draw_stats.drawcalls;
}
::glDepthMask(GL_TRUE);