示例#1
0
文件: shaderonb.cpp 项目: 2asoft/xray
ShaderParamDlg* OrenNayarBlinnShader::CreateParamDialog(HWND hOldRollup, HWND hwMtlEdit, IMtlParams *imp, StdMat2* theMtl, int rollupOpen, int ) 
{
	Interval v;
	Update(imp->GetTime(),v);
	
	OrenNayarShaderDlg *pDlg = new OrenNayarShaderDlg(hwMtlEdit, imp);
	pDlg->SetThings( theMtl, this  );

	LoadStdShaderResources();
	if ( hOldRollup ) {
		pDlg->hRollup = imp->ReplaceRollupPage( 
			hOldRollup,
			hInstance,
			MAKEINTRESOURCE(IDD_DMTL_BASIC_ONB2),
			OrenNayarShaderDlgProc, 
			GetString(IDS_DS_ON_BASIC),	
			(LPARAM)pDlg , 
			// NS: Bugfix 263414 keep the old category and store it for the current rollup
			rollupOpen|ROLLUP_SAVECAT|ROLLUP_USEREPLACEDCAT
			);
	} else
		pDlg->hRollup = imp->AddRollupPage( 
			hInstance,
			MAKEINTRESOURCE(IDD_DMTL_BASIC_ONB2),
			OrenNayarShaderDlgProc, 
			GetString(IDS_DS_ON_BASIC),	
			(LPARAM)pDlg , 
			rollupOpen
			);

	return (ShaderParamDlg*)pDlg;	
}
示例#2
0
ShaderParamDlg* StraussShader::CreateParamDialog(HWND hOldRollup, HWND hwMtlEdit, IMtlParams *imp, StdMat2* theMtl, int rollupOpen, int ) 
{
   Interval v;
   Update(imp->GetTime(),v);
   int rollupflags = rolloutOpen ? 0  : APPENDROLL_CLOSED;
   
   StraussShaderDlg *pDlg = new StraussShaderDlg(hwMtlEdit, imp);
   pDlg->SetThings( theMtl, this  );

   LoadStdShaderResources();
   if ( hOldRollup ) {
      pDlg->hRollup = imp->ReplaceRollupPage( 
         hOldRollup,
         hInstance,
         MAKEINTRESOURCE(IDD_DMTL_BASIC_STRAUSS3),
         StraussShaderDlgProc, 
         GetString(IDS_KE_STRAUSS_BASIC), // your name here
         (LPARAM)pDlg , 
         // NS: Bugfix 263414 keep the old category and store it for the current rollup
         rollupflags|ROLLUP_SAVECAT|ROLLUP_USEREPLACEDCAT
         );
   } else
      pDlg->hRollup = imp->AddRollupPage( 
         hInstance,
         MAKEINTRESOURCE(IDD_DMTL_BASIC_STRAUSS3),
         StraussShaderDlgProc, 
         GetString(IDS_KE_STRAUSS_BASIC), 
         (LPARAM)pDlg , 
         rollupflags
         );

   return (ShaderParamDlg*)pDlg; 
}