mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-27 00:40:21 +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
@ -348,11 +348,15 @@ namespace NifOsg
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (props[i].getPtr()->recType == Nif::RC_NiStencilProperty)
|
if (props[i].getPtr()->recType == Nif::RC_NiStencilProperty)
|
||||||
|
{
|
||||||
|
const Nif::NiStencilProperty* stencilprop = static_cast<const Nif::NiStencilProperty*>(props[i].getPtr());
|
||||||
|
if (stencilprop->data.enabled != 0)
|
||||||
{
|
{
|
||||||
hasStencilProperty = true;
|
hasStencilProperty = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i <props.length(); ++i)
|
for (size_t i = 0; i <props.length(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user