mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 02:53:51 +00:00
Added more shader settings.
This commit is contained in:
parent
71a3880884
commit
fc8d6da6a2
4 changed files with 96 additions and 32 deletions
|
@ -263,7 +263,6 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
|
||||||
{
|
{
|
||||||
std::string rendersystem = mUserSettings.settingValue("Video/render system").toStdString();
|
std::string rendersystem = mUserSettings.settingValue("Video/render system").toStdString();
|
||||||
Ogre::Root::getSingleton().setRenderSystem(Ogre::Root::getSingleton().getRenderSystemByName(rendersystem));
|
Ogre::Root::getSingleton().setRenderSystem(Ogre::Root::getSingleton().getRenderSystemByName(rendersystem));
|
||||||
std::cout << "editor: render system " + rendersystem << std::endl; // FIXME: debug
|
|
||||||
|
|
||||||
Ogre::Root::getSingleton().initialise(false);
|
Ogre::Root::getSingleton().initialise(false);
|
||||||
|
|
||||||
|
@ -300,6 +299,7 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
|
||||||
std::auto_ptr<sh::Factory> factory (new sh::Factory (platform));
|
std::auto_ptr<sh::Factory> factory (new sh::Factory (platform));
|
||||||
|
|
||||||
std::string shLang = mUserSettings.settingValue("General/shader mode").toStdString();
|
std::string shLang = mUserSettings.settingValue("General/shader mode").toStdString();
|
||||||
|
//std::string shLang = mUserSettings.getShaderLanguageByRenderer(rendersystem.c_str()).at(0).toStdString();
|
||||||
enum sh::Language lang;
|
enum sh::Language lang;
|
||||||
if(shLang == "glsl") lang = sh::Language_GLSL;
|
if(shLang == "glsl") lang = sh::Language_GLSL;
|
||||||
else if(shLang == "glsles") lang = sh::Language_GLSLES;
|
else if(shLang == "glsles") lang = sh::Language_GLSLES;
|
||||||
|
@ -314,16 +314,23 @@ std::auto_ptr<sh::Factory> CS::Editor::setupGraphics()
|
||||||
|
|
||||||
factory->loadAllFiles();
|
factory->loadAllFiles();
|
||||||
|
|
||||||
sh::Factory::getInstance().setGlobalSetting ("fog", mUserSettings.settingValue("shader/fog").toStdString() == "true" ? "true" : "false");
|
sh::Factory::getInstance().setGlobalSetting ("fog",
|
||||||
|
mUserSettings.settingValue("shader/fog").toStdString());
|
||||||
|
|
||||||
sh::Factory::getInstance().setGlobalSetting ("shadows", mUserSettings.settingValue("shader/shadows").toStdString() == "true" ? "true" : "false");
|
sh::Factory::getInstance().setGlobalSetting ("shadows",
|
||||||
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", mUserSettings.settingValue("shader/shadows_pssm").toStdString() == "true" ? "true" : "false");
|
mUserSettings.settingValue("shader/shadows").toStdString());
|
||||||
|
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("render_refraction", "false");
|
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm",
|
||||||
|
mUserSettings.settingValue("shader/shadows_pssm").toStdString());
|
||||||
|
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix", "false");
|
sh::Factory::getInstance ().setGlobalSetting ("render_refraction",
|
||||||
|
mUserSettings.settingValue("shader/render_refraction").toStdString());
|
||||||
|
|
||||||
sh::Factory::getInstance ().setGlobalSetting ("num_lights", "8");
|
sh::Factory::getInstance ().setGlobalSetting ("viewproj_fix",
|
||||||
|
mUserSettings.settingValue("shader/viewproj_fix").toStdString());
|
||||||
|
|
||||||
|
sh::Factory::getInstance ().setGlobalSetting ("num_lights",
|
||||||
|
mUserSettings.settingValue("shader/num_lights").toStdString());
|
||||||
|
|
||||||
/// \todo add more configurable shiny settings
|
/// \todo add more configurable shiny settings
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
fog->setSpecialValueText("Enable Fog");
|
fog->setSpecialValueText("Enable Fog");
|
||||||
fog->setWidgetWidth(15);
|
fog->setWidgetWidth(15);
|
||||||
fog->setColumnSpan (2);
|
fog->setColumnSpan (2);
|
||||||
fog->setStyleSheet ("QGroupBox { border: 0px; }");
|
fog->setStyleSheet ("QGroupBox { border: 0px; spacing: 5; }");
|
||||||
fog->setViewLocation(1, 1);
|
fog->setViewLocation(1, 1);
|
||||||
|
|
||||||
Setting *shadows = createSetting (Type_CheckBox, page, "shadows");
|
Setting *shadows = createSetting (Type_CheckBox, page, "shadows");
|
||||||
|
@ -75,7 +75,7 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
shadows->setEditorSetting(true);
|
shadows->setEditorSetting(true);
|
||||||
shadows->setSpecialValueText("Enable Shadows");
|
shadows->setSpecialValueText("Enable Shadows");
|
||||||
shadows->setWidgetWidth(15);
|
shadows->setWidgetWidth(15);
|
||||||
//shadows->setColumnSpan (2);
|
shadows->setColumnSpan (2);
|
||||||
shadows->setStyleSheet ("QGroupBox { border: 0px; }");
|
shadows->setStyleSheet ("QGroupBox { border: 0px; }");
|
||||||
shadows->setViewLocation(2, 1);
|
shadows->setViewLocation(2, 1);
|
||||||
|
|
||||||
|
@ -85,65 +85,121 @@ void UserSettings::buildSettingModelDefaults()
|
||||||
shadows_pssm->setEditorSetting(true);
|
shadows_pssm->setEditorSetting(true);
|
||||||
shadows_pssm->setSpecialValueText("Enable PSSM Shadows");
|
shadows_pssm->setSpecialValueText("Enable PSSM Shadows");
|
||||||
shadows_pssm->setWidgetWidth(15);
|
shadows_pssm->setWidgetWidth(15);
|
||||||
//shadows_pssm->setColumnSpan (2);
|
shadows_pssm->setColumnSpan (2);
|
||||||
shadows_pssm->setStyleSheet ("QGroupBox { border: 0px; }");
|
shadows_pssm->setStyleSheet ("QGroupBox { border: 0px; spacing: 5; }");
|
||||||
shadows_pssm->setViewLocation(3, 1);
|
shadows_pssm->setViewLocation(3, 1);
|
||||||
|
|
||||||
// FIXME: add option to put label elsewhere (i.e. no frame text)
|
|
||||||
Setting *numLights = createSetting (Type_SpinBox, page, "num lights");
|
Setting *numLights = createSetting (Type_SpinBox, page, "num lights");
|
||||||
numLights->setDefaultValue(8);
|
numLights->setDefaultValue(8);
|
||||||
numLights->setEditorSetting(true);
|
numLights->setEditorSetting(true);
|
||||||
numLights->setColumnSpan (2);
|
numLights->setColumnSpan (1);
|
||||||
numLights->setMinimum (0);
|
numLights->setMinimum (0);
|
||||||
numLights->setMaximum (100); // FIXME: not sure what the max value should be
|
numLights->setMaximum (100); // FIXME: not sure what the max value should be
|
||||||
numLights->setWidgetWidth (10);
|
numLights->setWidgetWidth (10);
|
||||||
numLights->setSpecialValueText ("Nothing!"); // text to display when value is 0
|
numLights->setSpecialValueText ("Nothing!"); // text to display when value is 0
|
||||||
numLights->setViewLocation(4, 1);
|
numLights->setViewLocation(4, 2);
|
||||||
|
Setting *nlText = createSetting (Type_Undefined, page, "nlText");
|
||||||
|
nlText->setSpecialValueText("Num Lights"); // hack to place text labels
|
||||||
|
nlText->setEditorSetting(false);
|
||||||
|
nlText->setSerializable (false);
|
||||||
|
nlText->setColumnSpan (1);
|
||||||
|
nlText->setWidgetWidth (10);
|
||||||
|
nlText->setViewLocation(4, 1);
|
||||||
|
|
||||||
|
Setting *renderRefraction = createSetting (Type_CheckBox, page, "renderRefraction");
|
||||||
|
renderRefraction->setDeclaredValues(QStringList() << "true" << "false");
|
||||||
|
renderRefraction->setDefaultValue("false");
|
||||||
|
renderRefraction->setEditorSetting(true);
|
||||||
|
renderRefraction->setSpecialValueText("Enable Render Refraction");
|
||||||
|
renderRefraction->setWidgetWidth(20);
|
||||||
|
renderRefraction->setColumnSpan (2);
|
||||||
|
renderRefraction->setStyleSheet ("QGroupBox { border: 0px; }");
|
||||||
|
renderRefraction->setViewLocation(5, 1);
|
||||||
|
|
||||||
|
Setting *viewproj_fix = createSetting (Type_CheckBox, page, "viewproj_fix");
|
||||||
|
viewproj_fix->setDeclaredValues(QStringList() << "true" << "false");
|
||||||
|
viewproj_fix->setDefaultValue("false");
|
||||||
|
viewproj_fix->setEditorSetting(true);
|
||||||
|
viewproj_fix->setSpecialValueText("View Proj Fix");
|
||||||
|
viewproj_fix->setWidgetWidth(20);
|
||||||
|
viewproj_fix->setColumnSpan (2);
|
||||||
|
viewproj_fix->setStyleSheet ("QGroupBox { border: 0px; }");
|
||||||
|
viewproj_fix->setViewLocation(6, 1);
|
||||||
|
|
||||||
Setting *simpleWater = createSetting (Type_CheckBox, page, "simple_water");
|
Setting *simpleWater = createSetting (Type_CheckBox, page, "simple_water");
|
||||||
simpleWater->setDeclaredValues(QStringList() << "true" << "false");
|
simpleWater->setDeclaredValues(QStringList() << "true" << "false");
|
||||||
simpleWater->setDefaultValue("false");
|
simpleWater->setDefaultValue("false");
|
||||||
simpleWater->setEditorSetting(true);
|
simpleWater->setEditorSetting(true);
|
||||||
simpleWater->setSpecialValueText("Enable Simple Water");
|
simpleWater->setSpecialValueText("Enable Simple Water");
|
||||||
simpleWater->setWidgetWidth(15);
|
simpleWater->setWidgetWidth(25);
|
||||||
simpleWater->setColumnSpan (2);
|
simpleWater->setColumnSpan (3);
|
||||||
simpleWater->setStyleSheet ("QGroupBox { border: 0px; }");
|
simpleWater->setStyleSheet ("QGroupBox { border: 0px; }");
|
||||||
simpleWater->setViewLocation(2, 4);
|
simpleWater->setViewLocation(1, 5);
|
||||||
|
|
||||||
Setting *waterEnabled = createSetting (Type_DoubleSpinBox, page, "waterEnabled");
|
Setting *waterEnabled = createSetting (Type_DoubleSpinBox, page, "waterEnabled");
|
||||||
waterEnabled->setDefaultValue(0.00);
|
waterEnabled->setDefaultValue(0.00);
|
||||||
waterEnabled->setEditorSetting(true);
|
waterEnabled->setEditorSetting(true);
|
||||||
//waterEnabled->setColumnSpan (2);
|
waterEnabled->setColumnSpan (1);
|
||||||
waterEnabled->setMinimum (0);
|
waterEnabled->setMinimum (0);
|
||||||
waterEnabled->setMaximum (100.00); // FIXME: not sure what the max value should be
|
waterEnabled->setMaximum (100.00); // FIXME: not sure what the max value should be
|
||||||
waterEnabled->setWidgetWidth (10);
|
waterEnabled->setWidgetWidth (10);
|
||||||
waterEnabled->setViewLocation(3, 4);
|
//waterEnabled->setStyleSheet("QGroupBox { border:2px; padding 2px; margin: 2px;} QGroupBox::title { text: \"test\" }");
|
||||||
|
waterEnabled->setViewLocation(2, 6);
|
||||||
|
Setting *weText = createSetting (Type_Undefined, page, "weText");
|
||||||
|
weText->setSpecialValueText("Water Enabled");
|
||||||
|
weText->setEditorSetting(false);
|
||||||
|
weText->setSerializable (false);
|
||||||
|
weText->setColumnSpan (1);
|
||||||
|
weText->setWidgetWidth (10);
|
||||||
|
weText->setViewLocation(2, 5);
|
||||||
|
|
||||||
Setting *waterLevel = createSetting (Type_DoubleSpinBox, page, "waterLevel");
|
Setting *waterLevel = createSetting (Type_DoubleSpinBox, page, "waterLevel");
|
||||||
waterLevel->setDefaultValue(0.00);
|
waterLevel->setDefaultValue(0.00);
|
||||||
waterLevel->setEditorSetting(true);
|
waterLevel->setEditorSetting(true);
|
||||||
//waterLevel->setColumnSpan (2);
|
waterLevel->setColumnSpan (1);
|
||||||
waterLevel->setMinimum (0);
|
waterLevel->setMinimum (0);
|
||||||
waterLevel->setMaximum (100.00); // FIXME: not sure what the max value should be
|
waterLevel->setMaximum (100.00); // FIXME: not sure what the max value should be
|
||||||
waterLevel->setWidgetWidth (10);
|
waterLevel->setWidgetWidth (10);
|
||||||
waterLevel->setViewLocation(4, 4);
|
waterLevel->setViewLocation(3, 6);
|
||||||
|
Setting *wlText = createSetting (Type_Undefined, page, "wlText");
|
||||||
|
wlText->setSpecialValueText("Water Level"); // hack to place text labels
|
||||||
|
wlText->setEditorSetting(false);
|
||||||
|
wlText->setSerializable (false);
|
||||||
|
wlText->setColumnSpan (1);
|
||||||
|
wlText->setWidgetWidth (10);
|
||||||
|
wlText->setViewLocation(3, 5);
|
||||||
|
|
||||||
Setting *waterTimer = createSetting (Type_DoubleSpinBox, page, "waterTimer");
|
Setting *waterTimer = createSetting (Type_DoubleSpinBox, page, "waterTimer");
|
||||||
waterTimer->setDefaultValue(0.00);
|
waterTimer->setDefaultValue(0.00);
|
||||||
waterTimer->setEditorSetting(true);
|
waterTimer->setEditorSetting(true);
|
||||||
//waterTimer->setColumnSpan (2);
|
waterTimer->setColumnSpan (1);
|
||||||
waterTimer->setMinimum (0);
|
waterTimer->setMinimum (0);
|
||||||
waterTimer->setMaximum (100.00); // FIXME: not sure what the max value should be
|
waterTimer->setMaximum (100.00); // FIXME: not sure what the max value should be
|
||||||
waterTimer->setWidgetWidth (10);
|
waterTimer->setWidgetWidth (10);
|
||||||
waterTimer->setViewLocation(5, 4);
|
waterTimer->setViewLocation(4, 6);
|
||||||
|
Setting *wtText = createSetting (Type_Undefined, page, "wtText");
|
||||||
|
wtText->setSpecialValueText("Water Timer"); // hack to place text labels
|
||||||
|
wtText->setEditorSetting(false);
|
||||||
|
wtText->setSerializable (false);
|
||||||
|
wtText->setColumnSpan (1);
|
||||||
|
wtText->setWidgetWidth (10);
|
||||||
|
wtText->setViewLocation(4, 5);
|
||||||
|
|
||||||
Setting *text = createSetting (Type_Undefined, page, "text");
|
|
||||||
text->setSpecialValueText("This is a test"); // hack to place text labels
|
Setting *spaceText = createSetting (Type_Undefined, page, "spaceText");
|
||||||
text->setEditorSetting(false);
|
spaceText->setSpecialValueText(" ");
|
||||||
text->setSerializable (false);
|
spaceText->setEditorSetting(false);
|
||||||
//text->setColumnSpan (1);
|
spaceText->setSerializable (false);
|
||||||
text->setWidgetWidth (15);
|
spaceText->setColumnSpan (1);
|
||||||
text->setViewLocation(5, 1);
|
spaceText->setWidgetWidth (5);
|
||||||
|
spaceText->setViewLocation(3, 4);
|
||||||
|
Setting *spaceText2 = createSetting (Type_Undefined, page, "spaceText2");
|
||||||
|
spaceText2->setSpecialValueText(" ");
|
||||||
|
spaceText2->setEditorSetting(false);
|
||||||
|
spaceText2->setSerializable (false);
|
||||||
|
spaceText2->setColumnSpan (1);
|
||||||
|
spaceText2->setWidgetWidth (5);
|
||||||
|
spaceText2->setViewLocation(3, 7);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", "false");
|
sh::Factory::getInstance().setGlobalSetting ("shadows_pssm", "false");
|
||||||
|
|
|
@ -16,7 +16,8 @@ CSVSettings::Frame::Frame (bool isVisible, const QString &title,
|
||||||
if (!isVisible)
|
if (!isVisible)
|
||||||
{
|
{
|
||||||
// must be Page, not a View
|
// must be Page, not a View
|
||||||
setStyleSheet (sInvisibleBoxStyle);
|
//setStyleSheet (sInvisibleBoxStyle);
|
||||||
|
setStyleSheet("QGroupBox { border:0px; }");
|
||||||
mLayout->setContentsMargins(10, 15, 10, 15);
|
mLayout->setContentsMargins(10, 15, 10, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Shader</string>
|
<string>title</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<zorder>displayGroup_Render</zorder>
|
<zorder>displayGroup_Render</zorder>
|
||||||
|
|
Loading…
Reference in a new issue