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
+7 -6
View File
@@ -44,12 +44,13 @@ DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
{
if ( dwReason == DLL_PROCESS_ATTACH) {
#if defined( NDEBUG)
BOOL IsDbgPresent = FALSE ;
CheckRemoteDebuggerPresent( GetCurrentProcess(), &IsDbgPresent) ;
if ( IsDbgPresent)
return 0 ;
#endif
// Controllo commentato per problemi con VB.NET
//#if defined( NDEBUG)
// BOOL IsDbgPresent = FALSE ;
// CheckRemoteDebuggerPresent( GetCurrentProcess(), &IsDbgPresent) ;
// if ( IsDbgPresent)
// return 0 ;
//#endif
s_hModule = hModule ;
EGT_TRACE( "EgtGraphics.dll Initializing!\n") ;
}
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -275,7 +275,7 @@ ObjNewGraphics::EndTriangles( void)
bool
ObjNewGraphics::Draw( int nStat, int nMark, bool bShowAux)
{
if ( m_pScene == nullptr || ! m_pScene->MakeCurrent())
if ( ! m_bValid || m_pScene == nullptr || ! m_pScene->MakeCurrent())
return false ;
// se vuoto non faccio alcunché
+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) ;