コード例 #1
0
void CascadedShadowMapApp::PSSMFactorChangedHandler(UISlider const & sender)
{
	pssm_factor_ = sender.GetValue() * 0.01f;

	std::wostringstream stream;
	stream << L"PSSM Factor: " << pssm_factor_;
	dialog_->Control<UIStatic>(id_pssm_factor_static_)->SetText(stream.str());

	deferred_rendering_->SetViewportCascades(0, num_cascades_, pssm_factor_);
}
コード例 #2
0
ファイル: AreaLighting.cpp プロジェクト: dgkae/KlayGE
void AreaLightingApp::LengthChangedHandler(UISlider const & sender)
{
	float length = sender.GetValue() / 100.0f;

	checked_pointer_cast<TubeAreaLightSource>(tube_area_light_)->Extend(float3(0.1f, 0.1f, length));
	checked_pointer_cast<SceneObjectLightSourceProxy>(tube_area_light_src_)->Scaling(0.1f, 0.1f, length);

	std::wostringstream stream;
	stream << L"Length: " << length;
	dialog_->Control<UIStatic>(id_length_static_)->SetText(stream.str());
}
コード例 #3
0
ファイル: AreaLighting.cpp プロジェクト: dgkae/KlayGE
void AreaLightingApp::RadiusChangedHandler(UISlider const & sender)
{
	float radius = sender.GetValue() / 100.0f;

	checked_pointer_cast<SphereAreaLightSource>(sphere_area_light_)->Radius(radius);
	checked_pointer_cast<SceneObjectLightSourceProxy>(sphere_area_light_src_)->Scaling(radius, radius, radius);

	std::wostringstream stream;
	stream << L"Radius: " << radius;
	dialog_->Control<UIStatic>(id_radius_static_)->SetText(stream.str());
}
コード例 #4
0
ファイル: Sound.cpp プロジェクト: zsnake1209/KlayGE
void SoundApp::VolumeChangedHandler(UISlider const & sender)
{
	volume_ = sender.GetValue() * 0.01f;

	AudioFactory& af = Context::Instance().AudioFactoryInstance();
	AudioEngine& ae = af.AudioEngineInstance();
	ae.SoundVolume(volume_);
	ae.MusicVolume(volume_);	

	std::wostringstream stream;
	stream << L"Volume: " << volume_;
	dialog_->Control<UIStatic>(id_volume_static_)->SetText(stream.str());
}