TestEGr 1.5b5 :
- aggiunto comando Nuovo - aggiunta comando Esegui Tsc
This commit is contained in:
+27
-6
@@ -14,12 +14,16 @@
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "TestEgrView.h"
|
||||
#include "TestEGrUtils.h"
|
||||
#include "resource.h"
|
||||
#include "/EgtDev/Include/EgtPerfCounter.h"
|
||||
#include "/EgtDev/Include/EgtILogger.h"
|
||||
#include "/EgtDev/Include/EgnStringUtils.h"
|
||||
#include "/EgtDev/Include/EgnStringConverter.h"
|
||||
#include "/EgtDev/Include/EGrScene.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
@@ -83,14 +87,12 @@ TestEgrView::Create( CWnd* pParent, int nID)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
TestEgrView::StartScene( int nDriver, bool b2Buff, int nColorBits, int nDepthBits,
|
||||
IGeomDB* pGeomDB, ILogger* pLogger)
|
||||
TestEgrView::StartScene( int nDriver, bool b2Buff, int nColorBits, int nDepthBits)
|
||||
{
|
||||
if ( m_pScene == nullptr)
|
||||
return false ;
|
||||
|
||||
// creazione della scena
|
||||
m_pScene->Init( pGeomDB, pLogger) ;
|
||||
if ( ! m_pScene->CreateContext( GetSafeHdc(), nDriver, b2Buff, nColorBits, nDepthBits))
|
||||
return false ;
|
||||
|
||||
@@ -98,9 +100,19 @@ TestEgrView::StartScene( int nDriver, bool b2Buff, int nColorBits, int nDepthBit
|
||||
m_pScene->SetCamera( CT_ISO_SW) ;
|
||||
m_pScene->ZoomAll() ;
|
||||
|
||||
LOG_INFO( pLogger, m_pScene->GetOpenGLInfo().c_str())
|
||||
LOG_INFO( pLogger, m_pScene->GetGLSLInfo().c_str())
|
||||
LOG_INFO( pLogger, m_pScene->GetPixelFormatInfo().c_str())
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
TestEgrView::GetSceneInfo( string& sInfo)
|
||||
{
|
||||
if ( m_pScene == nullptr)
|
||||
return false ;
|
||||
|
||||
sInfo = m_pScene->GetOpenGLInfo() + '\n' +
|
||||
m_pScene->GetGLSLInfo() + '\n' +
|
||||
m_pScene->GetPixelFormatInfo() ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
@@ -134,9 +146,18 @@ TestEgrView::OnPaint( void)
|
||||
if ( m_pScene == nullptr)
|
||||
return ;
|
||||
|
||||
PerformanceCounter Counter ;
|
||||
|
||||
// ridisegno finestra OpenGL
|
||||
Counter.Start() ;
|
||||
m_pScene->Draw() ;
|
||||
ValidateRgn( NULL) ;
|
||||
Counter.Stop() ;
|
||||
|
||||
// emetto info
|
||||
string sOut = "Redraw time = " + ToString( Counter.GetTime(), 2) + " ms" ;
|
||||
::OutInfo( sOut, false) ;
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user