예제 #1
0
void CascadedShadowMapApp::CSMTypeChangedHandler(UIComboBox const & sender)
{
	CascadedShadowLayerType type = static_cast<CascadedShadowLayerType>(sender.GetSelectedIndex() + 1);
	deferred_rendering_->SetCascadedShadowType(type);
	dialog_->Control<UIStatic>(id_pssm_factor_static_)->SetEnabled(CSLT_PSSM == type);
	dialog_->Control<UISlider>(id_pssm_factor_slider_)->SetEnabled(CSLT_PSSM == type);
}
예제 #2
0
void DeferredRenderingApp::BufferChangedHandler(UIComboBox const & sender)
{
	buffer_type_ = sender.GetSelectedIndex();
	deferred_rendering_->Display(static_cast<DeferredRenderingLayer::DisplayType>(buffer_type_));

	if (dialog_->Control<UICheckBox>(id_aa_)->GetChecked())
	{
		anti_alias_enabled_ = 1 + (DeferredRenderingLayer::DT_Edge == buffer_type_);
		RenderEngine& re = Context::Instance().RenderFactoryInstance().RenderEngineInstance();
		re.PPAAEnabled(anti_alias_enabled_);
	}
}
예제 #3
0
void AreaLightingApp::LightTypeChangedHandler(UIComboBox const & sender)
{
	switch (sender.GetSelectedIndex())
	{
	case 0:
		point_light_->Enabled(true);
		point_light_src_->Visible(true);
		sphere_area_light_->Enabled(false);
		sphere_area_light_src_->Visible(false);
		tube_area_light_->Enabled(false);
		tube_area_light_src_->Visible(false);
		dialog_->Control<UIStatic>(id_radius_static_)->SetVisible(false);
		dialog_->Control<UISlider>(id_radius_slider_)->SetVisible(false);
		dialog_->Control<UIStatic>(id_length_static_)->SetVisible(false);
		dialog_->Control<UISlider>(id_length_slider_)->SetVisible(false);
		break;

	case 1:
		point_light_->Enabled(false);
		point_light_src_->Visible(false);
		sphere_area_light_->Enabled(true);
		sphere_area_light_src_->Visible(true);
		tube_area_light_->Enabled(false);
		tube_area_light_src_->Visible(false);
		dialog_->Control<UIStatic>(id_radius_static_)->SetVisible(true);
		dialog_->Control<UISlider>(id_radius_slider_)->SetVisible(true);
		dialog_->Control<UIStatic>(id_length_static_)->SetVisible(false);
		dialog_->Control<UISlider>(id_length_slider_)->SetVisible(false);
		break;

	case 2:
		point_light_->Enabled(false);
		point_light_src_->Visible(false);
		sphere_area_light_->Enabled(false);
		sphere_area_light_src_->Visible(false);
		tube_area_light_->Enabled(true);
		tube_area_light_src_->Visible(true);
		dialog_->Control<UIStatic>(id_radius_static_)->SetVisible(false);
		dialog_->Control<UISlider>(id_radius_slider_)->SetVisible(false);
		dialog_->Control<UIStatic>(id_length_static_)->SetVisible(true);
		dialog_->Control<UISlider>(id_length_slider_)->SetVisible(true);
		break;

	default:
		break;
	}
}
예제 #4
0
void GlobalIlluminationApp::IllumChangedHandler(UIComboBox const & sender)
{
    deferred_rendering_->DisplayIllum(sender.GetSelectedIndex());
}
예제 #5
0
void CascadedShadowMapApp::CascadesChangedHandler(UIComboBox const & sender)
{
	num_cascades_ = sender.GetSelectedIndex() + 1;
	deferred_rendering_->SetViewportCascades(0, num_cascades_, pssm_factor_);
}