Fixed #1476 (well, better a work around intel bugs).

This commit is contained in:
hiker 2015-02-19 09:24:23 +11:00
parent bb682ca5fb
commit 5f9e4086af
4 changed files with 13 additions and 5 deletions

View File

@ -2,6 +2,7 @@
<graphical-restrictions>
<card is="Intel(R) HD Graphics 3000" os="windows" disable="UniformBufferObject"/>
<card is="Intel(R) HD Graphics 3000" os="windows" disable="AdvancedPipeline"/>
<card is="Intel(R) HD Graphics 3000" os="windows" disable="FramebufferSRGBWorking"/>
<card contains="Intel" disable="TextureCompressionS3TC"/>
<card contains="Intel" os="windows" disable="HighDefinitionTextures"/>
<card contains="NVIDIA" os="windows" version="<344.65" disable="BufferStorage"/>

View File

@ -57,7 +57,8 @@ namespace GraphicsRestrictions
"AMDVertexShaderLayer",
"DriverRecentEnough",
"HighDefinitionTextures",
"AdvancedPipeline"
"AdvancedPipeline",
"FramebufferSRGBWorking",
};
} // namespace Private
using namespace Private;

View File

@ -52,6 +52,7 @@ namespace GraphicsRestrictions
GR_DRIVER_RECENT_ENOUGH,
GR_HIGHDEFINITION_TEXTURES,
GR_ADVANCED_PIPELINE,
GR_FRAMEBUFFER_SRGB_WORKING,
GR_COUNT /** MUST be last entry. */
} ;

View File

@ -22,6 +22,7 @@
#include "graphics/callbacks.hpp"
#include "central_settings.hpp"
#include "graphics/glwrap.hpp"
#include "graphics/graphics_restrictions.hpp"
#include "graphics/lod_node.hpp"
#include "graphics/post_processing.hpp"
#include "graphics/referee.hpp"
@ -380,10 +381,14 @@ void IrrDriver::renderScene(scene::ICameraSceneNode * const camnode, unsigned po
}
else
{
// We need a cleared depth buffer for some effect (eg particles depth blending)
m_rtts->getFBO(FBO_NORMAL_AND_DEPTHS).Bind();
glClear(GL_DEPTH_BUFFER_BIT);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
// We need a cleared depth buffer for some effect (eg particles depth blending)
if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_WORKING))
glDisable(GL_FRAMEBUFFER_SRGB);
m_rtts->getFBO(FBO_NORMAL_AND_DEPTHS).Bind();
glClear(GL_DEPTH_BUFFER_BIT);
if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_WORKING))
glEnable(GL_FRAMEBUFFER_SRGB);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
}
PROFILER_POP_CPU_MARKER();