From 3c42223add54ee7aa7fdc4089e4bdfd87966260d Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 15 Nov 2014 03:10:23 +0100 Subject: [PATCH] Try graphical restrictions on nvidia old drivers --- data/graphical_restrictions.xml | 3 ++- src/graphics/irr_driver.cpp | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/data/graphical_restrictions.xml b/data/graphical_restrictions.xml index 5771f722b..47a63b0cc 100644 --- a/data/graphical_restrictions.xml +++ b/data/graphical_restrictions.xml @@ -1,7 +1,8 @@ - + + diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 8aaa80077..dff4bf109 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -479,10 +479,7 @@ void IrrDriver::initDevice() // Call to glGetIntegerv should not be made if --no-graphics is used if(!ProfileWorld::isNoGraphics()) { - std::string driver((char*)(glGetString(GL_VERSION))); - std::string card ((char*)(glGetString(GL_RENDERER))); - std::vector restrictions = - GraphicsRestrictions::getRestrictions(driver, card); + } if(!ProfileWorld::isNoGraphics()) { @@ -562,6 +559,20 @@ void IrrDriver::initDevice() Log::info("GLDriver", "ARB Texture View enabled"); } m_support_sdsm = m_support_sdsm && hasComputeShaders && hasBuffserStorage; + + std::string driver((char*)(glGetString(GL_VERSION))); + std::string card((char*)(glGetString(GL_RENDERER))); + std::vector restrictions = + GraphicsRestrictions::getRestrictions(driver, card); + + for (const std::string &restriction : restrictions) + { + if (!restriction.compare("BufferStorage")) + { + hasBuffserStorage = false; + Log::info("Graphics restrictions", "Buffer Storage disabled"); + } + } } #endif