本文整理汇总了C++中CD3DSettingsDlg::SetActive方法的典型用法代码示例。如果您正苦于以下问题:C++ CD3DSettingsDlg::SetActive方法的具体用法?C++ CD3DSettingsDlg::SetActive怎么用?C++ CD3DSettingsDlg::SetActive使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CD3DSettingsDlg
的用法示例。
在下文中一共展示了CD3DSettingsDlg::SetActive方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_TOGGLESPIN:
{
g_bSpinning = g_SampleUI.GetCheckBox( IDC_TOGGLESPIN )->GetChecked();
break;
}
case IDC_EXPLODE_SCALE:
{
WCHAR sz[100];
g_fExplode = ( float )( g_SampleUI.GetSlider( IDC_EXPLODE_SCALE )->GetValue() * 0.01f );
swprintf_s( sz, 100, L"Explode Amount: %0.2f", g_fExplode );
g_SampleUI.GetStatic( IDC_EXPLODE_STATIC )->SetText( sz );
g_pExplodeVariable->SetFloat( g_fExplode );
break;
}
}
}
示例2: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, INT nControlID, CDXUTControl* pControl, void* pUserContext )
{
UNREFERENCED_PARAMETER(pUserContext);
UNREFERENCED_PARAMETER(pControl);
UNREFERENCED_PARAMETER(nEvent);
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
break;
case IDC_TOGGLEDYNAMICLIGHTS:
{
g_Scene.m_DynamicLights = !g_Scene.m_DynamicLights;
break;
}
case IDC_DEBUGRENDERING:
{
g_Scene.m_DebugRendering = (DebugRendering)PtrToUlong( g_DebugRenderingCombo->GetSelectedData() );
break;
}
}
}
示例3: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_SHOWTESSELLATED:
g_bShowTessellated = !g_bShowTessellated;
break;
case IDC_PARTITIONING_INTEGER:
g_Tessellator.SetPartitioningMode( CTessellator::PARTITIONING_MODE_INTEGER );
break;
case IDC_PARTITIONING_POW2:
g_Tessellator.SetPartitioningMode( CTessellator::PARTITIONING_MODE_POW2 );
break;
case IDC_PARTITIONING_FRACTIONAL_ODD:
g_Tessellator.SetPartitioningMode( CTessellator::PARTITIONING_MODE_FRACTIONAL_ODD );
break;
case IDC_PARTITIONING_FRACTIONAL_EVEN:
g_Tessellator.SetPartitioningMode( CTessellator::PARTITIONING_MODE_FRACTIONAL_EVEN );
break;
}
}
示例4: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
CDXUTComboBox* pComboBox = NULL;
CDXUTComboBox* pAABBLevelComboBox = NULL;
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
case IDC_SCENERASTERIZER_MODE:
//CDXUTComboBox* pComboBox = NULL;
pComboBox = ( CDXUTComboBox* )pControl;
g_eSceneRasterizerMode = ( UINT )PtrToInt( pComboBox->GetSelectedData() );
break;
case IDC_AABBSUBLEVEL:
pAABBLevelComboBox = ( CDXUTComboBox* )pControl;
g_CurrentAABBLevel = ( UINT )PtrToInt( pAABBLevelComboBox->GetSelectedData() );
break;
}
}
示例5: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl,
void* pUserContext )
{
if( g_bGuiVisible )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_SUNWIDTH_SLIDER:
WCHAR temp[64];
int iVal = g_HUD.GetSlider( IDC_SUNWIDTH_SLIDER )->GetValue();
g_fSunWidth = ( float( iVal ) / 100.0f ) * 3.0f;
swprintf_s( temp, L"SunWidth = %2.2f", g_fSunWidth );
g_HUD.GetStatic( IDC_SUNWIDTH_TEXT )->SetText( temp );
break;
}
}
}
示例6: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_TOGGLEWARP:
DXUTToggleWARP(); break;
case IDC_TOGGLE_BLUR:
g_bUseMotionBlur = !g_bUseMotionBlur;
break;
case IDC_RENDER_OGRE:
g_bRenderOgre = !g_bRenderOgre;
break;
case IDC_SAMPLE_COUNT:
{
CDXUTComboBox* pComboBox = ( CDXUTComboBox* )pControl;
g_MSAASampleCount = ( UINT )PtrToInt( pComboBox->GetSelectedData() );
HRESULT hr = S_OK;
ID3D10Device* pd3dDevice = DXUTGetD3D10Device();
if( pd3dDevice )
V( CreateRenderTarget( pd3dDevice, g_BackBufferWidth, g_BackBufferHeight, g_MSAASampleCount, 0 ) );
}
break;
}
}
示例7: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen();
break;
case IDC_TOGGLEREF:
DXUTToggleREF();
break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() );
break;
case IDC_DISABLEALBEDO:
g_DisableAlbedo = ((CDXUTCheckBox*)pControl )->GetChecked();
break;
case IDC_PAUSEANIMATION:
g_PauseAnimation = ((CDXUTCheckBox*)pControl )->GetChecked();
break;
case IDC_SHOWNORMALS:
g_ShowNormals = ((CDXUTCheckBox*)pControl )->GetChecked();
break;
case IDC_DISABLESKINING:
g_DisableSkining = ((CDXUTCheckBox*)pControl )->GetChecked();
break;
case IDC_TECHNIQUECOMBO:
g_TechniqueIndex = ((CDXUTComboBox* )pControl)->GetSelectedIndex();
break;
}
}
示例8: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
case IDC_ENABLE_PRESHADER:
{
g_bEnablePreshader = g_SampleUI.GetCheckBox( IDC_ENABLE_PRESHADER )->GetChecked();
if( DXUTGetD3D9Device() != NULL )
{
OnLostDevice( NULL );
OnDestroyDevice( NULL );
OnCreateDevice( DXUTGetD3D9Device(), DXUTGetD3D9BackBufferSurfaceDesc(), NULL );
OnResetDevice( DXUTGetD3D9Device(), DXUTGetD3D9BackBufferSurfaceDesc(), NULL );
}
break;
}
case IDC_ACTIVE_LIGHT:
if( !g_LightControl[g_nActiveLight].IsBeingDragged() )
{
g_nActiveLight++;
g_nActiveLight %= g_nNumActiveLights;
}
break;
case IDC_NUM_LIGHTS:
if( !g_LightControl[g_nActiveLight].IsBeingDragged() )
{
WCHAR sz[100];
swprintf_s( sz, 100, L"# Lights: %d", g_SampleUI.GetSlider( IDC_NUM_LIGHTS )->GetValue() );
g_SampleUI.GetStatic( IDC_NUM_LIGHTS_STATIC )->SetText( sz );
g_nNumActiveLights = g_SampleUI.GetSlider( IDC_NUM_LIGHTS )->GetValue();
g_nActiveLight %= g_nNumActiveLights;
}
break;
case IDC_LIGHT_SCALE:
g_fLightScale = ( float )( g_SampleUI.GetSlider( IDC_LIGHT_SCALE )->GetValue() * 0.10f );
WCHAR sz[100];
swprintf_s( sz, 100, L"Light scale: %0.2f", g_fLightScale );
g_SampleUI.GetStatic( IDC_LIGHT_SCALE_STATIC )->SetText( sz );
break;
}
}
示例9: OnGUIEvent
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
// WCHAR wszInput[MAX_PATH];
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN: DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF: DXUTToggleREF(); break;
case IDC_CHANGEDEVICE: g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
}
}
示例10: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent(UINT /*nEvent*/, int nControlID, CDXUTControl* /*pControl*/, void* /*pUserContext*/)
{
switch (nControlID)
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive(!g_D3DSettingsDlg.IsActive()); break;
}
}
示例11: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
case IDC_TECHNIQUE:
LoadTechniqueObjects( "bat" ); break;
}
}
示例12: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_SettingsDlg.SetActive( !g_SettingsDlg.IsActive() ); break;
case IDC_SAVETOX:
SaveMeshToXFile(); break;
}
}
示例13: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen();
break;
case IDC_TOGGLEREF:
DXUTToggleREF();
break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() );
break;
case IDC_TOGGLEWIRE:
g_bWireFrame = !g_bWireFrame;
break;
// Lighting Controls
case IDC_LIGHT_CONST_AMBIENT:
g_bHemiAmbientLighting = false;
break;
case IDC_LIGHT_HEMI_AMBIENT:
g_bHemiAmbientLighting = true;
break;
case IDC_LIGHT_DIRECT:
g_bDirectLighting = !g_bDirectLighting;
break;
case IDC_LIGHTING_ONLY:
g_bLightingOnly = !g_bLightingOnly;
break;
// Material Controls
case IDC_MATERIAL_PLASTIC:
g_iMaterial = MATERIAL_PLASTIC;
break;
case IDC_MATERIAL_PLASTIC_TEXTURED:
g_iMaterial = MATERIAL_PLASTIC_TEXTURED;
break;
case IDC_MATERIAL_ROUGH:
g_iMaterial = MATERIAL_ROUGH;
break;
case IDC_MATERIAL_ROUGH_TEXTURED:
g_iMaterial = MATERIAL_ROUGH_TEXTURED;
break;
}
}
示例14: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_PAUSE:
paused = !paused;
break;
case IDC_WIREFRAME:
g_wireFrame = !g_wireFrame;
break;
}
}
示例15: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent(UINT nEvent, int nControlID, CDXUTControl* pControl,
void* pUserContext)
{
switch (nControlID)
{
case IDC_TOGGLEFULLSCREEN: DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF: DXUTToggleREF(); break;
case IDC_CHANGEDEVICE: g_D3DSettingsDlg.SetActive(
!g_D3DSettingsDlg.IsActive()); break;
case IDC_DIFF_STEPS:
g_vsObj->diffSteps = g_SampleUI.GetSlider(IDC_DIFF_STEPS)->GetValue();
WCHAR sz[100];
StringCchPrintf(sz, 100, L"Diffusion steps: %d", g_vsObj->diffSteps);
g_SampleUI.GetStatic(IDC_DIFF_STEPS_STATIC)->SetText(sz);
break;
}
}