EgtGraphics 1.5c2 :
- migliorata gestione colore di default.
This commit is contained in:
+16
-10
@@ -20,6 +20,7 @@
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include "/EgtDev/Include/EGkGdbConst.h"
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -38,22 +39,26 @@ CreateEGrScene( void)
|
||||
//----------------------------------------------------------------------------
|
||||
Scene::Scene( void)
|
||||
{
|
||||
m_pGeomDB = nullptr ;
|
||||
// Context data
|
||||
m_hDC = nullptr ;
|
||||
m_hRC = nullptr ;
|
||||
memset( &m_wglewc, 0, sizeof( WGLEWContext)) ;
|
||||
memset( &m_glewc, 0, sizeof( GLEWContext)) ;
|
||||
m_bNewWay = false ;
|
||||
// Geom data
|
||||
SetExtension( BBox3d( -MIN_EXTENSION, -MIN_EXTENSION, -MIN_EXTENSION,
|
||||
MIN_EXTENSION, MIN_EXTENSION, MIN_EXTENSION)) ;
|
||||
// Viewport
|
||||
m_nViewportW = 0 ;
|
||||
m_nViewportH = 0 ;
|
||||
// View data
|
||||
// Camera e viewport
|
||||
m_ptCenter = ORIG ;
|
||||
SetCamera( 0, 0, 0) ;
|
||||
m_nViewportW = 0 ;
|
||||
m_nViewportH = 0 ;
|
||||
// Sfondo
|
||||
m_BackTop.Set( 128, 128, 128) ;
|
||||
m_BackBottom.Set( 128, 128, 128) ;
|
||||
// GeomData
|
||||
m_pGeomDB = nullptr ;
|
||||
m_colDef.Set( 0, 0, 0) ;
|
||||
// Extension
|
||||
SetExtension( BBox3d( -MIN_EXTENSION, -MIN_EXTENSION, -MIN_EXTENSION,
|
||||
MIN_EXTENSION, MIN_EXTENSION, MIN_EXTENSION)) ;
|
||||
// WinRect
|
||||
m_bOutlineWR = true ;
|
||||
m_colorWR.Set( 0, 0, 0) ;
|
||||
@@ -616,8 +621,9 @@ Scene::Draw( void)
|
||||
glDepthFunc( GL_LESS) ;
|
||||
glEnable( GL_DEPTH_TEST) ;
|
||||
|
||||
// colore di default
|
||||
glColor4f( 1, 1, 1, 1) ;
|
||||
// aggiorno il colore di default
|
||||
if ( m_pGeomDB != nullptr)
|
||||
m_pGeomDB->GetDefaultColor( m_colDef) ;
|
||||
|
||||
// disegno le geometrie del DB
|
||||
DrawGroup( GDB_ID_ROOT) ;
|
||||
|
||||
Reference in New Issue
Block a user