EgtGraphics 1.5f1 :
- a parità di Zdepth le entità disegnate dopo sovrascivono le precedenti - aggiunta visualizzazione testi.
This commit is contained in:
Binary file not shown.
@@ -286,6 +286,9 @@ ObjNewGraphics::Draw( int nStat, int nMark)
|
||||
|
||||
// se marcato, disegno halo
|
||||
if ( nMark == GDB_MK_ON) {
|
||||
// cambio test di depth per non sovrascrivere il disegno appena fatto
|
||||
glDepthFunc( GL_LESS) ;
|
||||
|
||||
// dimensioni per halo
|
||||
glPointSize( 7) ;
|
||||
glLineWidth( 5) ;
|
||||
@@ -308,6 +311,8 @@ ObjNewGraphics::Draw( int nStat, int nMark)
|
||||
// non si impostano i colori, si usa quello di marcatura
|
||||
}
|
||||
}
|
||||
// ripristino test di depth
|
||||
glDepthFunc( GL_LEQUAL) ;
|
||||
}
|
||||
|
||||
// se necessario, ripristino la normale visualizzazione
|
||||
|
||||
@@ -211,6 +211,9 @@ ObjOldGraphics::Draw( int nStat, int nMark)
|
||||
|
||||
// se marcato, disegno halo
|
||||
if ( nMark == GDB_MK_ON) {
|
||||
// cambio test di depth per non sovrascrivere il disegno appena fatto
|
||||
glDepthFunc( GL_LESS) ;
|
||||
|
||||
// dimensioni per halo
|
||||
glPointSize( 7) ;
|
||||
glLineWidth( 5) ;
|
||||
@@ -236,6 +239,8 @@ ObjOldGraphics::Draw( int nStat, int nMark)
|
||||
// non si impostano i colori, si usa quello di marcatura
|
||||
}
|
||||
}
|
||||
// ripristino test di depth
|
||||
glDepthFunc( GL_LEQUAL) ;
|
||||
}
|
||||
|
||||
// se necessario, ripristino la normale visualizzazione
|
||||
|
||||
+1
-1
@@ -627,7 +627,7 @@ Scene::Draw( void)
|
||||
return false ;
|
||||
|
||||
// imposto l'utilizzo dello Zbuffer
|
||||
glDepthFunc( GL_LESS) ;
|
||||
glDepthFunc( GL_LEQUAL) ;
|
||||
glEnable( GL_DEPTH_TEST) ;
|
||||
|
||||
// aggiorno il colore di default
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
#include "/EgtDev/Include/EGkCurve.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EGkGdbFunct.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -278,6 +279,21 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, MdStMk siObj)
|
||||
}
|
||||
pGraphics->EndTriangles() ;
|
||||
}
|
||||
// se testo
|
||||
else if ( nGeoType == EXT_TEXT) {
|
||||
// recupero il testo
|
||||
const IExtText* pTXT = GetExtText( pGeoObj) ;
|
||||
if ( pTXT == nullptr)
|
||||
return false ;
|
||||
// calcolo la grafica
|
||||
POLYLINELIST lstPL ;
|
||||
pTXT->ApproxWithLines( 0.01, 5, lstPL) ;
|
||||
pGraphics->Clear() ;
|
||||
pGraphics->AddColor( cCol) ;
|
||||
POLYLINELIST::iterator Iter ;
|
||||
for ( Iter = lstPL.begin() ; Iter != lstPL.end() ; ++ Iter)
|
||||
pGraphics->AddPolyLine( *Iter) ;
|
||||
}
|
||||
}
|
||||
|
||||
// se hiddenline
|
||||
|
||||
Reference in New Issue
Block a user