EgtGraphics 1.5i4 :

- tolto controllo antidebug da release per VB.NET
- ora VAO/VBO è usato solo con superfici grandi, per altri modo immediato (problemi con più di 300000 curve).
This commit is contained in:
Dario Sassi
2014-09-18 14:59:35 +00:00
parent c6a97c8bfc
commit 4b93467bcd
4 changed files with 20 additions and 11 deletions
+12 -4
View File
@@ -151,7 +151,15 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, MdStMk siObj)
// se non esiste grafica associata, la creo
if ( pGeoObj->GetObjGraphics() == nullptr) {
ObjEGrGraphics* pGraphics = CreateObjEGrGraphics( m_bNewWay) ;
// nuova modalità grafica solo per superfici con molti triangoli
const int N_MIN_TRIA_NEWWAY = 100 ;
bool bNewWay = false ;
if ( m_bNewWay && nGeoType == SRF_TRIMESH) {
const ISurfTriMesh* pSTM = GetSurfTriMesh( pGeoObj) ;
if ( pSTM != nullptr && pSTM->GetTriangleNum() > N_MIN_TRIA_NEWWAY)
m_bNewWay = true ;
}
ObjEGrGraphics* pGraphics = CreateObjEGrGraphics( bNewWay) ;
if ( pGraphics == nullptr)
return false ;
pGraphics->SetScene( this) ;
@@ -219,9 +227,9 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, MdStMk siObj)
pGraphics->AddColor( cCol) ;
pGraphics->AddPolyLine( PL) ;
// eventuali segni ausiliari (frecce,...)
Point3d ptStart ;
if ( PL.GetFirstPoint( ptStart))
pGraphics->AddPoint( ptStart, true) ;
//Point3d ptStart ;
//if ( PL.GetFirstPoint( ptStart))
// pGraphics->AddPoint( ptStart, true) ;
PolyLine PLA ;
if ( CalcCurveTipArrow( PL, PLA))
pGraphics->AddPolyLine( PLA, true) ;