EgtGraphics 2.6c2 :

- aggiunta possibilità di visualizzare curve di entità solo in shading
- utilizzata questa possibilità per spigoli vivi di TriMesh e Zmap.
This commit is contained in:
Dario Sassi
2024-03-10 10:22:18 +01:00
parent 49dac32893
commit 7930a229f9
9 changed files with 122 additions and 55 deletions
+11 -4
View File
@@ -165,7 +165,7 @@ ObjNewGraphics::AddPoints( const PNTVECTOR& vPnt, bool bAux)
//----------------------------------------------------------------------------
bool
ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux)
ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux, bool bSurfSha)
{
if ( m_pScene == nullptr || ! m_pScene->MakeCurrent())
return false ;
@@ -195,7 +195,7 @@ ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux)
glEnableClientState( GL_VERTEX_ARRAY) ;
glBindVertexArray( 0) ;
// aggiungo i dati in lista
AddNgaVerts( GL_LINES, nCount, nVaoId, nVboId, bAux) ;
AddNgaVerts( GL_LINES, nCount, nVaoId, nVboId, bAux, bSurfSha) ;
// dichiaro valida la grafica
m_bValid = true ;
@@ -204,7 +204,7 @@ ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux)
//----------------------------------------------------------------------------
bool
ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux)
ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux, bool bSurfSha)
{
if ( m_pScene == nullptr || ! m_pScene->MakeCurrent())
return false ;
@@ -236,7 +236,7 @@ ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux)
glEnableClientState( GL_VERTEX_ARRAY) ;
glBindVertexArray( 0) ;
// aggiungo i dati in lista
AddNgaVerts( GL_LINE_STRIP, nCount, nVaoId, nVboId, bAux) ;
AddNgaVerts( GL_LINE_STRIP, nCount, nVaoId, nVboId, bAux, bSurfSha) ;
// dichiaro valida la grafica
m_bValid = true ;
@@ -424,6 +424,13 @@ ObjNewGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
glBindVertexArray( 0) ;
}
break ;
case NgAtom::VERTS_S :
if ( bSurfSha && Nga.m_nCount > 0 && Nga.m_nVaoId != 0) {
glBindVertexArray( Nga.m_nVaoId) ;
glDrawArrays( Nga.m_nMode, 0, Nga.m_nCount) ;
glBindVertexArray( 0) ;
}
break ;
case NgAtom::COLOR :
glColor4fv( ( bStdCol ? AdjustColor( Nga.m_fCol, bDark) : fSelMarkCol)) ;
break ;