Add specific shadow source files to MWRender
parent
ba1e2cab2f
commit
0568c93b39
@ -0,0 +1,11 @@
|
||||
#include "shadow.hpp"
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
void MWShadow::ViewData::init(MWShadow * st, osgUtil::CullVisitor * cv)
|
||||
{
|
||||
LightSpacePerspectiveShadowMapDB::ViewData::init(st, cv);
|
||||
osg::StateSet * stateset = _camera->getOrCreateStateSet();
|
||||
stateset->removeAttribute(osg::StateAttribute::CULLFACE);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#ifndef OPENMW_MWRENDER_SHADOW_H
|
||||
#define OPENMW_MWRENDER_SHADOW_H
|
||||
|
||||
#include <osgShadow/LightSpacePerspectiveShadowMap>
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
class MWShadow : public osgShadow::LightSpacePerspectiveShadowMapDB
|
||||
{
|
||||
protected:
|
||||
struct ViewData : public LightSpacePerspectiveShadowMapDB::ViewData
|
||||
{
|
||||
virtual void init(MWShadow * st, osgUtil::CullVisitor * cv);
|
||||
};
|
||||
|
||||
virtual ViewDependentShadowTechnique::ViewData * initViewDependentData(osgUtil::CullVisitor *cv, ViewDependentShadowTechnique::ViewData * vd)
|
||||
{
|
||||
MWShadow::ViewData* td = dynamic_cast<MWShadow::ViewData*>(vd);
|
||||
if (!td)
|
||||
td = new MWShadow::ViewData;
|
||||
td->init(this, cv);
|
||||
return td;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_MWRENDER_SHADOW_H
|
Loading…
Reference in New Issue