mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 08:09:41 +00:00
Merge branch 'correct_stencil_search' into 'master'
Search for stencil enabled flag correctly See merge request OpenMW/openmw!1640
This commit is contained in:
commit
3904e35b40
3 changed files with 10 additions and 6 deletions
|
@ -349,8 +349,12 @@ namespace NifOsg
|
|||
|
||||
if (props[i].getPtr()->recType == Nif::RC_NiStencilProperty)
|
||||
{
|
||||
hasStencilProperty = true;
|
||||
break;
|
||||
const Nif::NiStencilProperty* stencilprop = static_cast<const Nif::NiStencilProperty*>(props[i].getPtr());
|
||||
if (stencilprop->data.enabled != 0)
|
||||
{
|
||||
hasStencilProperty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
|
||||
#include <components/settings/settings.hpp>
|
||||
|
||||
#ifndef GL_DEPTH32F_STENCIL8_NV
|
||||
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
|
||||
#endif
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
void setCameraClearDepth(osg::Camera* camera)
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
#include "util.hpp"
|
||||
|
||||
#ifndef GL_DEPTH32F_STENCIL8_NV
|
||||
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
|
||||
#endif
|
||||
|
||||
namespace SceneUtil
|
||||
{
|
||||
// Sets camera clear depth to 0 if reversed depth buffer is in use, 1 otherwise.
|
||||
|
|
Loading…
Reference in a new issue