Remove CG shaders from settings window (not fully supported on non-nvidia cards, amd profiles have an instruction limit making them useless)

Can still be used by editing the config file, however.
deque
scrawl 11 years ago
parent afc1fa49f6
commit b81c7d05c6

@ -73,17 +73,6 @@ namespace
return (Ogre::Root::getSingleton ().getRenderSystem ()->getName ().find("OpenGL") != std::string::npos) ? "glsl" : "hlsl";
}
bool cgAvailable ()
{
Ogre::Root::PluginInstanceList list = Ogre::Root::getSingleton ().getInstalledPlugins ();
for (Ogre::Root::PluginInstanceList::const_iterator it = list.begin(); it != list.end(); ++it)
{
if ((*it)->getName() == "Cg Program Manager")
return true;
}
return false;
}
const char* checkButtonType = "CheckButton";
const char* sliderType = "Slider";
@ -366,12 +355,7 @@ namespace MWGui
void SettingsWindow::onShaderModeToggled(MyGUI::Widget* _sender)
{
std::string val = static_cast<MyGUI::Button*>(_sender)->getCaption();
if (val == "cg")
{
val = hlslGlsl();
}
else if (cgAvailable ())
val = "cg";
val = hlslGlsl();
static_cast<MyGUI::Button*>(_sender)->setCaption(val);

Loading…
Cancel
Save