EgtGraphics 1.5c5 :
- nel disegno si tiene conto dello stato dell'oggetto (ON, SEL, OFF) - gli oggetti selezionati vengono evidenziati.
This commit is contained in:
+19
-1
@@ -17,7 +17,11 @@
|
||||
#include "Scene.h"
|
||||
#include "GraphObjs.h"
|
||||
#include "/EgtDev/Include/EGkPolyLine.h"
|
||||
#include "/EgtDev/Include/EGkGdbConst.h"
|
||||
|
||||
|
||||
//--------------------------- Macro ------------------------------------------
|
||||
// Per funzioni glew dipendenti dal context
|
||||
#define glewGetContext() (( m_pScene != nullptr) ? m_pScene->glewGetContext() : nullptr)
|
||||
|
||||
|
||||
@@ -129,11 +133,19 @@ ObjNewGraphics::AddPolyLine( const PolyLine& PL)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ObjNewGraphics::Draw( void)
|
||||
ObjNewGraphics::Draw( int nStat)
|
||||
{
|
||||
if ( m_pScene == nullptr || ! m_pScene->MakeCurrent())
|
||||
return false ;
|
||||
|
||||
// gestione stato di visualizzazione
|
||||
if ( nStat == GDB_ST_OFF)
|
||||
return true ;
|
||||
if ( nStat == GDB_ST_SEL) {
|
||||
glPointSize( 5) ;
|
||||
glLineWidth( 3) ;
|
||||
}
|
||||
|
||||
// ciclo di disegno
|
||||
NGALIST::iterator iIter ;
|
||||
for ( iIter = m_ngaList.begin() ; iIter != m_ngaList.end() ; ++ iIter) {
|
||||
@@ -151,6 +163,12 @@ ObjNewGraphics::Draw( void)
|
||||
}
|
||||
}
|
||||
|
||||
// se necessario, ripristino la normale visualizzazione
|
||||
if ( nStat == GDB_ST_SEL) {
|
||||
glPointSize( 3) ;
|
||||
glLineWidth( 1) ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user