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


C++ CD3DSettingsDlg::SetActive方法代码示例

本文整理汇总了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;
        }
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:32,代码来源:Tutorial13.cpp

示例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;  
    }  
  }
}
开发者ID:JasSra,项目名称:GPU-Pro-6,代码行数:33,代码来源:AdvancedLighting.cpp

示例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;
    }
}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:34,代码来源:AdaptiveTessellationCS40.cpp

示例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;
    }
}
开发者ID:softwarekid,项目名称:DXFunctionDraw,代码行数:28,代码来源:MeshFromOBJ10.cpp

示例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;
        }
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:28,代码来源:ContactHardeningShadows11.cpp

示例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;
    }
}
开发者ID:marselas,项目名称:Zombie-Direct3D-Samples,代码行数:35,代码来源:MotionBlur10.cpp

示例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;
		
		
	}
}
开发者ID:SergeyMakeev,项目名称:Quaternions-Revisited,代码行数:35,代码来源:QuaternionsRevisited.cpp

示例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;
    }

}
开发者ID:KNeal,项目名称:Oculus,代码行数:59,代码来源:BasicHLSL.cpp

示例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;
    }
}
开发者ID:dimroc,项目名称:sunborn_igf,代码行数:10,代码来源:GPUTerrainProject.cpp

示例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;
    }

}
开发者ID:marselas,项目名称:Zombie-Direct3D-Samples,代码行数:16,代码来源:main.cpp

示例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;
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:17,代码来源:LocalDeformablePRT.cpp

示例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;
    }
}
开发者ID:KNeal,项目名称:Oculus,代码行数:17,代码来源:MeshFromObj.cpp

示例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;

    }
 

}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:52,代码来源:DynamicShaderLinkageFX11.cpp

示例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;
    }

}
开发者ID:AndreAhmed,项目名称:directxgameengine,代码行数:22,代码来源:cloth_renderer.cpp

示例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;
	}
}
开发者ID:maleiwhat,项目名称:vectorizing-project,代码行数:23,代码来源:VolSurfaces10.cpp


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