EgtGraphics 2.6h2 :
- modifiche per permettere Mark di tipo 2.
This commit is contained in:
+9
-6
@@ -245,6 +245,9 @@ AdjustColor( const float fCol[4], bool bDark)
|
||||
bool
|
||||
ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlpha, bool bShowAux)
|
||||
{
|
||||
if ( ! m_bValid || m_pScene == nullptr || ! m_pScene->MakeCurrent())
|
||||
return false ;
|
||||
|
||||
// se vuoto non faccio alcunché
|
||||
if ( m_ogaVect.size() == 0)
|
||||
return true ;
|
||||
@@ -262,9 +265,9 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
|
||||
float fSelMarkCol[4] = { 1, 1, 1, 1} ;
|
||||
float fSelMarkBackCol[4] = { 0.75, 0.75, 0.75, 1} ;
|
||||
if ( bSurfSha) {
|
||||
if ( nMark == GDB_MK_ON) {
|
||||
if ( nMark == GDB_MK_ON || nMark == GDB_MK_ON_2) {
|
||||
bStdCol = false ;
|
||||
Color colMark = ( ( GetScene() != nullptr) ? GetScene()->GetMark() : Color( 255, 255, 0)) ;
|
||||
Color colMark = m_pScene->GetMark( nMark) ;
|
||||
colMark.SetAlpha( nAlpha) ;
|
||||
colMark.GetFloat( fSelMarkCol) ;
|
||||
Color colMarkBack = GetSurfBackColor( colMark) ;
|
||||
@@ -273,7 +276,7 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
|
||||
}
|
||||
else if ( nStat == GDB_ST_SEL) {
|
||||
bStdCol = false ;
|
||||
Color colSelSurf = ( ( GetScene() != nullptr) ? GetScene()->GetSelSurf() : Color( 255, 255, 192)) ;
|
||||
Color colSelSurf = m_pScene->GetSelSurf() ;
|
||||
colSelSurf.SetAlpha( nAlpha) ;
|
||||
colSelSurf.GetFloat( fSelMarkCol) ;
|
||||
Color colSelSurfBack = GetSurfBackColor( colSelSurf) ;
|
||||
@@ -370,7 +373,7 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
|
||||
}
|
||||
|
||||
// se marcato e non superficie in shading, disegno halo
|
||||
if ( nMark == GDB_MK_ON && ! bSurfSha) {
|
||||
if ( ( nMark == GDB_MK_ON || nMark == GDB_MK_ON_2) && ! bSurfSha) {
|
||||
// cambio test di depth per non sovrascrivere il disegno appena fatto
|
||||
glDepthFunc( GL_LESS) ;
|
||||
|
||||
@@ -379,7 +382,7 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
|
||||
glLineWidth( (float) m_pScene->GetMarkLineWidth()) ;
|
||||
|
||||
// colore di marcatura
|
||||
Color colMark = ( ( GetScene() != nullptr) ? GetScene()->GetMark() : Color( 192, 192, 0)) ;
|
||||
Color colMark = m_pScene->GetMark( nMark) ;
|
||||
glColor4f( colMark.GetRed(), colMark.GetGreen(), colMark.GetBlue(), colMark.GetAlpha()) ;
|
||||
|
||||
// ciclo di disegno
|
||||
@@ -433,7 +436,7 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph
|
||||
}
|
||||
|
||||
// se necessario, ripristino la normale visualizzazione
|
||||
if ( nStat == GDB_ST_SEL || nMark == GDB_MK_ON) {
|
||||
if ( nStat == GDB_ST_SEL || nMark == GDB_MK_ON || nMark == GDB_MK_ON_2) {
|
||||
glPointSize( (float) m_pScene->GetPointSize()) ;
|
||||
glLineWidth( (float) m_pScene->GetLineWidth()) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user