当前位置: 首页>>代码示例>>C++>>正文


C++ CDXUTDialog::EnableKeyboardInput方法代码示例

本文整理汇总了C++中CDXUTDialog::EnableKeyboardInput方法的典型用法代码示例。如果您正苦于以下问题:C++ CDXUTDialog::EnableKeyboardInput方法的具体用法?C++ CDXUTDialog::EnableKeyboardInput怎么用?C++ CDXUTDialog::EnableKeyboardInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDXUTDialog的用法示例。


在下文中一共展示了CDXUTDialog::EnableKeyboardInput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: InitApp

static void InitApp()
{
	g_pCamManager = new S3UTCameraManager();
	g_pCamManager->ConfigCameras("Cameras.txt");
	g_pCamManager->DumpCameraStatus("DumpResult.txt");


    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 10; 
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 35, iY, 125, 22, VK_F2 );

    g_SampleUI.EnableKeyboardInput( true );
    g_SampleUI.SetCallback( OnGUIEvent );
    
    iY = 10;
    g_SampleUI.AddStatic( IDC_SHADOW_ALGORITHM_LABEL, L"Shadow algorithm:", 35, iY, 125, 22 );
    CDXUTComboBox *pComboBox;
    g_SampleUI.AddComboBox( IDC_SHADOW_ALGORITHM, 35, iY += 20, 125, 30, 0, false, &pComboBox);
    pComboBox->AddItem(L"StandardBP", NULL);
    pComboBox->AddItem(L"BP_MSSM_KERNEL", NULL);
    pComboBox->AddItem(L"STD_VSM", NULL);
    pComboBox->AddItem(L"MipVSM", NULL);
    pComboBox->AddItem(L"HirBP", NULL);
    pComboBox->AddItem(L"BPGI", NULL);
    pComboBox->AddItem(L"NoShadows", NULL);
    pComboBox->AddItem(L"SingleLight", NULL);
    pComboBox->AddItem(L"PCSS", NULL);

    
	g_SampleUI.AddStatic( IDC_COMMON_LABEL, L"Light Zn", 35, iY += 25, 125, 22 );
    g_SampleUI.AddSlider( IDC_LIGHT_ZN, 160, iY, 124, 22, 0, 100, g_fCtrledLightZn*5 );
	g_SampleUI.AddStatic( IDC_COMMON_LABEL, L"Light Zf", 35, iY += 25, 125, 22 );
    g_SampleUI.AddSlider( IDC_LIGHT_ZF, 160, iY, 124, 22, 0, 100, g_fCtrledLightZf - 10 );
	g_SampleUI.AddStatic( IDC_COMMON_LABEL, L"Light FOV", 35, iY += 25, 125, 22 );
    g_SampleUI.AddSlider( IDC_LIGHT_FOV, 160, iY, 124, 22, 0, 100, g_fCtrledLightFov * 100 );
    g_SampleUI.AddStatic( IDC_LIGHT_SIZE_LABEL, L"Light source size:", 35, iY += 25, 125, 22 );
    g_SampleUI.AddSlider( IDC_LIGHT_SIZE, 160, iY, 124, 22, 0, 100, 0 );


	g_SampleUI.AddStatic(IDC_COMMON_LABEL, L"NumLightSample", 35, iY += 25, 125, 22 );
	g_SampleUI.AddSlider(IDC_NUM_LIGHT_SAMPLE, 160, iY, 124, 22, 0, 16, 0 );

	g_SampleUI.AddStatic(IDC_COMMON_LABEL, L"fDefaultDepthBias", 35, iY += 25, 125, 22 );
	g_SampleUI.AddSlider(IDC_fDefaultDepthBias, 160, iY, 124, 22, 0, 100, 40 );
	
	g_SampleUI.AddStatic(IDC_COMMON_LABEL, L"3rd depth delta", 35, iY += 25, 125, 22 );
	g_SampleUI.AddSlider(IDC_BIAS_3RD_DEPTH, 160, iY, 124, 22, 0, 100, 40 );

	g_SampleUI.AddStatic(IDC_COMMON_LABEL, L"1st depth delta", 35, iY += 25, 125, 22 );
	g_SampleUI.AddSlider(IDC_BIAS_1ST_DEPTH, 160, iY, 124, 22, 0, 100, 40 );

    g_SampleUI.AddCheckBox( IDC_BTEXTURED, L"Enable Texturing", 15, iY += 25, 124, 22, false);
	g_SampleUI.AddCheckBox( IDC_SHOW_3DWIDGET, L"Show 3D Widget", 150, iY, 124, 22, true);
    g_SampleUI.AddCheckBox( IDC_BMOVECAMERA, L"Move Camera", 15, iY += 25, 124, 22, true);
	g_SampleUI.AddCheckBox( IDC_FRAME_DUMP, L"Dump Frame", 150, iY, 124, 22, false);
    g_SampleUI.AddCheckBox( IDC_BDUMP_SHADOWMAP, L"Dump Shadow Map", 15, iY+=25, 124, 22, false);
    g_SampleUI.AddCheckBox( IDC_BDUMP_LIGHT_PAR, L"Dump Light Para", 150, iY, 124, 22, false);
    g_SampleUI.AddCheckBox( IDC_STATIC, L"Freeze Model", 15, iY += 25, 124, 22, false);
    g_SampleUI.AddCheckBox( IDC_ANIMATE, L"Show Animated Model", 150, iY, 124, 22, false);
    g_SampleUI.AddCheckBox( IDC_SCENE, L"Show scene", 15, iY += 25, 124, 22, true);
	g_SampleUI.AddCheckBox( IDC_FAN, L"Show Fan", 150, iY, 124, 22, false);

	g_CameraUI.Init( &g_DialogResourceManager );
	g_CameraUI.EnableKeyboardInput( true );
	g_CameraUI.SetCallback( OnGUIEvent );
	{
		g_pCamManager->SetupCameraUI( g_CameraUI );
	}


}
开发者ID:SenichiFSeiei,项目名称:oursavsm,代码行数:74,代码来源:SoftShadows.cpp


注:本文中的CDXUTDialog::EnableKeyboardInput方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。