mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 02:09:49 +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)
|
if (props[i].getPtr()->recType == Nif::RC_NiStencilProperty)
|
||||||
{
|
{
|
||||||
hasStencilProperty = true;
|
const Nif::NiStencilProperty* stencilprop = static_cast<const Nif::NiStencilProperty*>(props[i].getPtr());
|
||||||
break;
|
if (stencilprop->data.enabled != 0)
|
||||||
|
{
|
||||||
|
hasStencilProperty = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
|
|
||||||
#ifndef GL_DEPTH32F_STENCIL8_NV
|
|
||||||
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
void setCameraClearDepth(osg::Camera* camera)
|
void setCameraClearDepth(osg::Camera* camera)
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
|
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
|
||||||
|
#ifndef GL_DEPTH32F_STENCIL8_NV
|
||||||
|
#define GL_DEPTH32F_STENCIL8_NV 0x8DAC
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace SceneUtil
|
namespace SceneUtil
|
||||||
{
|
{
|
||||||
// Sets camera clear depth to 0 if reversed depth buffer is in use, 1 otherwise.
|
// Sets camera clear depth to 0 if reversed depth buffer is in use, 1 otherwise.
|
||||||
|
|
Loading…
Reference in a new issue