EgtExecutor :
- migliorie nella funzione ExeGetImageEx per gestione errori e per modalità driver OpenGL 1.
This commit is contained in:
+9
-4
@@ -1008,7 +1008,7 @@ CALLBACK SceneBoxProc( HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
// imposto dimensione box e picture
|
||||
const int WIN_MAX_DIM = 1024 ;
|
||||
const int WIN_MAX_DIM = ( s_nDriver == 1 ? 512 : 1024) ;
|
||||
int nWinW = ( s_nWidth >= s_nHeight ? WIN_MAX_DIM : ( WIN_MAX_DIM * s_nWidth) / s_nHeight) ;
|
||||
int nWinH = ( s_nHeight >= s_nWidth ? WIN_MAX_DIM : ( WIN_MAX_DIM * s_nHeight) / s_nWidth) ;
|
||||
HWND hPic = GetDlgItem( hwndDlg, IDC_PICTURE1) ;
|
||||
@@ -1023,10 +1023,15 @@ CALLBACK SceneBoxProc( HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
s_nContext = nContext ;
|
||||
pGseCtx->m_pScene->SetCamera( s_nCameraDir) ;
|
||||
pGseCtx->m_pScene->ZoomAll() ;
|
||||
pGseCtx->m_pScene->GetImage( s_nShowMode, s_colBackTop, s_colBackBottom, s_nWidth, s_nHeight, s_sImageFile) ;
|
||||
if ( ! pGseCtx->m_pScene->GetImage( s_nShowMode, s_colBackTop, s_colBackBottom, s_nWidth, s_nHeight, s_sImageFile))
|
||||
s_nContext = -s_nContext ;
|
||||
MyResetGroupObjGraphics( pGseCtx->m_pGeomDB, GDB_ID_ROOT) ;
|
||||
EndDialog( hwndDlg, wParam) ;
|
||||
}
|
||||
else {
|
||||
s_nContext = 0 ;
|
||||
EndDialog( hwndDlg, wParam) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
s_nContext = 0 ;
|
||||
@@ -1063,9 +1068,9 @@ ExeGetImageEx( int nDriver, bool b2Buff, int nColorBits, int nDepthBits,
|
||||
// lancio dialogo
|
||||
HWND hTopWnd = ExeGetMainWindowHandle() ;
|
||||
DialogBox( GetModuleIstance(), MAKEINTRESOURCE( IDD_LUASCENE), hTopWnd, (DLGPROC)SceneBoxProc) ;
|
||||
bool bOk = ( s_nContext != 0) ;
|
||||
bool bOk = ( s_nContext > 0) ;
|
||||
// elimino la scena dal contesto
|
||||
GseContext* pGseCtx = GetGseContext( s_nContext) ;
|
||||
GseContext* pGseCtx = GetGseContext( abs( s_nContext)) ;
|
||||
if ( pGseCtx != nullptr) {
|
||||
delete pGseCtx->m_pScene ;
|
||||
pGseCtx->m_pScene = nullptr ;
|
||||
|
||||
Reference in New Issue
Block a user