From ea2df9655f86c9a4bbd6d2c08b6edf24b417b71c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 18 Aug 2014 09:00:14 +0000 Subject: [PATCH] EgtGraphics 1.5h2 : - corretto errore con OldGraphics - aggiunto a info dato su tipo driver (old/new way). --- EgtGraphics.rc | Bin 11390 -> 11390 bytes ObjOldGraphics.cpp | 8 +++++--- ObjOldGraphics.h | 4 ++-- SceneBasic.cpp | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/EgtGraphics.rc b/EgtGraphics.rc index 5a74e376985e535ec7c3bdaf7f240611067a4778..8abc5624715326b00cf5fb5b87d77f5cad29c7f2 100644 GIT binary patch delta 81 zcmewt@h@V-H#SD2&G%&mnSs F+yK2>8_xg$ delta 81 zcmewt@h@V-H#SDY&G%&mnSs F+yJ~O8^-_u diff --git a/ObjOldGraphics.cpp b/ObjOldGraphics.cpp index fee8ef2..149b615 100644 --- a/ObjOldGraphics.cpp +++ b/ObjOldGraphics.cpp @@ -173,11 +173,12 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bShowAux) } // ciclo di disegno - bool bStartA ; + bool bStartA = false ; OGALIST::iterator iIter ; for ( iIter = m_ogaList.begin() ; iIter != m_ogaList.end() ; ++ iIter) { switch ( iIter->m_nType) { case OgAtom::START : + bStartA = false ; glBegin( iIter->m_nMode) ; break ; case OgAtom::START_A : @@ -232,11 +233,12 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bShowAux) glColor4f( colMark.GetRed(), colMark.GetGreen(), colMark.GetBlue(), colMark.GetAlpha()) ; // ciclo di disegno - bool bStartA ; + bool bStartA = false ; OGALIST::iterator iIter ; for ( iIter = m_ogaList.begin() ; iIter != m_ogaList.end() ; ++ iIter) { switch ( iIter->m_nType) { case OgAtom::START : + bStartA = false ; glBegin( iIter->m_nMode) ; break ; case OgAtom::START_A : @@ -250,7 +252,7 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bShowAux) break ; case OgAtom::VERT : if ( ! bStartA || bShowAux) - glVertex3fv( iIter->m_fVal) ; + glVertex3fv( iIter->m_fVal) ; break ; // non si imposta la normale sono solo curve // non si impostano i colori, si usa quello di marcatura diff --git a/ObjOldGraphics.h b/ObjOldGraphics.h index 7117c49..804b28c 100644 --- a/ObjOldGraphics.h +++ b/ObjOldGraphics.h @@ -93,11 +93,11 @@ class ObjOldGraphics : public ObjEGrGraphics oga.m_nType = ( bAux ? OgAtom::START_A : OgAtom::START) ; oga.m_nMode = nMode ; return AddOgAtom( oga) ; } - bool AddEnd( void) + bool AddEnd( void) { OgAtom oga ; oga.m_nType = OgAtom::END ; return AddOgAtom( oga) ; } - bool AddVert3f( const Point3d& ptP) + bool AddVert3f( const Point3d& ptP) { OgAtom oga ; oga.m_nType = OgAtom::VERT ; oga.m_fX = float( ptP.x) ; oga.m_fY = float( ptP.y) ; oga.m_fZ = float( ptP.z) ; diff --git a/SceneBasic.cpp b/SceneBasic.cpp index 5e05c60..cd42f07 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -243,6 +243,7 @@ Scene::GetOpenGLInfo( void) const char* p ; if ( ( p = reinterpret_cast ( glGetString( GL_VERSION))) != nullptr) sInfo += p ; + sInfo += ( m_bNewWay ? " (new way)" : " (old way)") ; sInfo += " " ; if ( ( p = reinterpret_cast ( glGetString( GL_VENDOR))) != nullptr) sInfo += p ;