mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 21:40:15 +00:00
added advance 3D rendering user settings section
This commit is contained in:
parent
4b921c3876
commit
5a1ce4943e
@ -350,7 +350,7 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
|
|||||||
// internal setting - may be switched on or off by the use of shader configurations
|
// internal setting - may be switched on or off by the use of shader configurations
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false");
|
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false");
|
||||||
|
|
||||||
std::string num_lights = mUserSettings.setting("Objects/num_lights", QString("8")).toStdString();
|
std::string num_lights = mUserSettings.setting("3d-render-adv/num_lights", QString("8")).toStdString();
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("num_lights", num_lights);
|
sh::Factory::getInstance ().setGlobalSetting ("num_lights", num_lights);
|
||||||
|
|
||||||
/// \todo add more configurable shiny settings
|
/// \todo add more configurable shiny settings
|
||||||
|
@ -63,6 +63,14 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||||||
antialiasing->setDefaultValue (defaultValue);
|
antialiasing->setDefaultValue (defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declareSection ("3d-render-adv", "3D Rendering (Advanced)");
|
||||||
|
{
|
||||||
|
Setting *numLights = createSetting (Type_SpinBox, "num_lights",
|
||||||
|
"Number of lights per pass");
|
||||||
|
numLights->setDefaultValue (8);
|
||||||
|
numLights->setRange (1, 100);
|
||||||
|
}
|
||||||
|
|
||||||
declareSection ("scene-input", "Scene Input");
|
declareSection ("scene-input", "Scene Input");
|
||||||
{
|
{
|
||||||
Setting *timer = createSetting (Type_SpinBox, "timer", "Input responsiveness");
|
Setting *timer = createSetting (Type_SpinBox, "timer", "Input responsiveness");
|
||||||
@ -142,14 +150,6 @@ void CSMSettings::UserSettings::buildSettingModelDefaults()
|
|||||||
ritd->setDeclaredValues (values);
|
ritd->setDeclaredValues (values);
|
||||||
}
|
}
|
||||||
|
|
||||||
declareSection ("Objects", "Objects");
|
|
||||||
{
|
|
||||||
|
|
||||||
Setting *numLights = createSetting (Type_SpinBox, "num_lights", "num_lights");
|
|
||||||
numLights->setDefaultValue(8);
|
|
||||||
numLights->setRange (0, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
@ -413,7 +413,7 @@ void CSMSettings::UserSettings::updateUserSetting(const QString &settingKey,
|
|||||||
{
|
{
|
||||||
mSettingDefinitions->setValue (settingKey ,list);
|
mSettingDefinitions->setValue (settingKey ,list);
|
||||||
|
|
||||||
if(settingKey == "Objects/num_lights" && !list.empty())
|
if(settingKey == "3d-render-adv/num_lights" && !list.empty())
|
||||||
{
|
{
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("num_lights", list.at(0).toStdString());
|
sh::Factory::getInstance ().setGlobalSetting ("num_lights", list.at(0).toStdString());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user