mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-14 14:23:08 +05:00
Don't apply lighting to identification lines
This commit is contained in:
parent
12ff6d6f51
commit
b811162086
@ -853,24 +853,14 @@ namespace netgen
|
|||||||
GLfloat identifiedcol[] = { 1, 0, 1, 1 };
|
GLfloat identifiedcol[] = { 1, 0, 1, 1 };
|
||||||
|
|
||||||
glLineWidth (3);
|
glLineWidth (3);
|
||||||
|
glEnable (GL_COLOR_MATERIAL);
|
||||||
// for (i = 1; i <= mesh->GetNSeg(); i++)
|
glDisable (GL_LIGHTING);
|
||||||
|
|
||||||
if (mesh -> HasIdentifications() )
|
if (mesh -> HasIdentifications() )
|
||||||
{
|
{
|
||||||
// if (mesh->GetIdentifications().HasIdentifiedPoints())
|
|
||||||
{
|
{
|
||||||
auto & idpts =
|
auto & idpts =
|
||||||
mesh->GetIdentifications().GetIdentifiedPoints();
|
mesh->GetIdentifications().GetIdentifiedPoints();
|
||||||
|
|
||||||
/*
|
|
||||||
for (int i = 1; i <= idpts.GetNBags(); i++)
|
|
||||||
for (int j = 1; j <= idpts.GetBagSize(i); j++)
|
|
||||||
{
|
|
||||||
INDEX_3 pts;
|
|
||||||
int dummy; // , val;
|
|
||||||
idpts.GetData (i, j, pts, dummy);
|
|
||||||
*/
|
|
||||||
for (auto [hash, val] : idpts)
|
for (auto [hash, val] : idpts)
|
||||||
{
|
{
|
||||||
auto [hash_pts, hash_nr] = hash;
|
auto [hash_pts, hash_nr] = hash;
|
||||||
@ -885,6 +875,7 @@ namespace netgen
|
|||||||
p2 = c + vispar.shrink * (p2 - c);
|
p2 = c + vispar.shrink * (p2 - c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glColor3fv (identifiedcol);
|
||||||
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
|
glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE,
|
||||||
identifiedcol);
|
identifiedcol);
|
||||||
|
|
||||||
@ -896,6 +887,8 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glDisable (GL_COLOR_MATERIAL);
|
||||||
|
glEnable (GL_LIGHTING);
|
||||||
glEndList ();
|
glEndList ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user