@@ -451,7 +451,6 @@ void CRender::destroy()
451451 // _RELEASE (q_sync_point[0]);
452452 for (u32 i = 0 ; i < HW.Caps .iGPUNum ; ++i)
453453 _RELEASE (q_sync_point[i]);
454-
455454 HWOCC.occq_destroy ();
456455 xr_delete (Models);
457456 xr_delete (Target);
@@ -531,15 +530,7 @@ void CRender::reset_end()
531530 // that some data is not ready in the first frame (for example device camera position)
532531 m_bFirstFrameAfterReset = true ;
533532}
534- /*
535- void CRender::OnFrame()
536- {
537- Models->DeleteQueue ();
538- if (ps_r2_ls_flags.test(R2FLAG_EXP_MT_CALC)) {
539- Device.seqParallel.insert (Device.seqParallel.begin(),
540- fastdelegate::FastDelegate0<>(&HOM,&CHOM::MT_RENDER));
541- }
542- }*/
533+
543534void CRender::OnFrame ()
544535{
545536 Models->DeleteQueue ();
@@ -564,7 +555,7 @@ void CRender::model_Delete(IRenderVisual*& V, BOOL bDiscard)
564555{
565556 dxRender_Visual* pVisual = (dxRender_Visual*)V;
566557 Models->Delete (pVisual, bDiscard);
567- V = 0 ;
558+ V = nullptr ;
568559}
569560IRender_DetailModel* CRender::model_CreateDM (IReader* F)
570561{
@@ -579,7 +570,7 @@ void CRender::model_Delete(IRender_DetailModel*& F)
579570 CDetail* D = (CDetail*)F;
580571 D->Unload ();
581572 xr_delete (D);
582- F = NULL ;
573+ F = nullptr ;
583574 }
584575}
585576IRenderVisual* CRender::model_CreatePE (LPCSTR name)
@@ -919,7 +910,6 @@ static HRESULT create_shader(LPCSTR const pTarget, DWORD const* buffer, u32 cons
919910 return _result;
920911}
921912
922- // --------------------------------------------------------------------------------------------------------------
923913class includer : public ID3DInclude
924914{
925915public:
@@ -929,11 +919,11 @@ class includer : public ID3DInclude
929919 string_path pname;
930920 strconcat (sizeof (pname), pname, GEnv.Render ->getShaderPath (), pFileName);
931921 IReader* R = FS.r_open (" $game_shaders$" , pname);
932- if (0 == R)
922+ if (nullptr == R)
933923 {
934924 // possibly in shared directory or somewhere else - open directly
935925 R = FS.r_open (" $game_shaders$" , pFileName);
936- if (0 == R)
926+ if (nullptr == R)
937927 return E_FAIL;
938928 }
939929
@@ -1454,33 +1444,32 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
14541444 sh_name[len] = ' \0 ' ;
14551445
14561446 // finish
1457- defines[def_it].Name = 0 ;
1458- defines[def_it].Definition = 0 ;
1447+ defines[def_it].Name = nullptr ;
1448+ defines[def_it].Definition = nullptr ;
14591449 def_it++;
14601450
1461- //
14621451 if (0 == xr_strcmp (pFunctionName, " main" ))
14631452 {
14641453 if (' v' == pTarget[0 ])
14651454 {
14661455 if (HW.pDevice1 == 0 )
1467- pTarget = D3D10GetVertexShaderProfile (HW.pDevice ); // vertex "vs_4_0"; //
1456+ pTarget = D3D10GetVertexShaderProfile (HW.pDevice ); // vertex "vs_4_0";
14681457 else
1469- pTarget = " vs_4_1" ; // pixel "ps_4_0"; //
1458+ pTarget = " vs_4_1" ; // pixel "ps_4_0";
14701459 }
14711460 else if (' p' == pTarget[0 ])
14721461 {
14731462 if (HW.pDevice1 == 0 )
1474- pTarget = D3D10GetPixelShaderProfile (HW.pDevice ); // pixel "ps_4_0"; //
1463+ pTarget = D3D10GetPixelShaderProfile (HW.pDevice ); // pixel "ps_4_0";
14751464 else
1476- pTarget = " ps_4_1" ; // pixel "ps_4_0"; //
1465+ pTarget = " ps_4_1" ; // pixel "ps_4_0";
14771466 }
14781467 else if (' g' == pTarget[0 ])
14791468 {
14801469 if (HW.pDevice1 == 0 )
1481- pTarget = D3D10GetGeometryShaderProfile (HW.pDevice ); // geometry "gs_4_0"; //
1470+ pTarget = D3D10GetGeometryShaderProfile (HW.pDevice ); // geometry "gs_4_0";
14821471 else
1483- pTarget = " gs_4_1" ; // pixel "ps_4_0"; //
1472+ pTarget = " gs_4_1" ; // pixel "ps_4_0";
14841473 }
14851474 }
14861475
@@ -1549,12 +1538,11 @@ HRESULT CRender::shader_compile(LPCSTR name, DWORD const* pSrcData, UINT SrcData
15491538 file->w (pShaderBuf->GetBufferPointer (), (u32 )pShaderBuf->GetBufferSize ());
15501539 FS.w_close (file);
15511540
1552- _result = create_shader (pTarget, (DWORD*)pShaderBuf->GetBufferPointer (), ( u32 ) pShaderBuf->GetBufferSize (),
1541+ _result = create_shader (pTarget, (DWORD*)pShaderBuf->GetBufferPointer (), pShaderBuf->GetBufferSize (),
15531542 file_name, result, o.disasm );
15541543 }
15551544 else
15561545 {
1557- // Msg ( "! shader compilation failed" );
15581546 Log (" ! " , file_name);
15591547 if (pErrorBuf)
15601548 Log (" ! error: " , (LPCSTR)pErrorBuf->GetBufferPointer ());
0 commit comments