EgtGraphics 1.5k1 :

- aggiunta gestione mark e selezione di superfici in modalità shading.
This commit is contained in:
Dario Sassi
2014-11-11 10:31:03 +00:00
parent a8d269ecf2
commit c2fe3e19e6
9 changed files with 76 additions and 22 deletions
+6 -1
View File
@@ -63,7 +63,8 @@ Scene::Scene( void)
// GeomData
m_pGeomDB = nullptr ;
m_colDef.Set( 0, 0, 0) ;
m_colMark.Set( 192, 192, 0) ;
m_colMark.Set( 255, 255, 0) ;
m_colSelSurf.Set( 255, 255, 192) ;
// Extension
SetExtension( BBox3d( -MIN_EXTENSION, -MIN_EXTENSION, -MIN_EXTENSION,
MIN_EXTENSION, MIN_EXTENSION, MIN_EXTENSION)) ;
@@ -719,10 +720,14 @@ Scene::Draw( void)
glEnable( GL_LIGHT1) ;
// disegno le geometrie del DB
// prima passata per superfici con illuminazione abilitata
glEnable( GL_POLYGON_OFFSET_FILL) ;
glPolygonOffset( 1.0, 1.0) ;
glEnable( GL_LIGHTING) ;
DrawGroup( GDB_ID_ROOT, 1, MdStMk( GDB_MD_STD, GDB_ST_ON, GDB_MK_OFF)) ;
glDisable( GL_POLYGON_OFFSET_FILL) ;
// seconda passata per 0dim e curve con illuminazione disabilitata
glDisable( GL_LIGHTING) ;
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE) ;
DrawGroup( GDB_ID_ROOT, 2, MdStMk( GDB_MD_STD, GDB_ST_ON, GDB_MK_OFF)) ;
break ;
}