1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 12:39:53 +00:00
OpenMW/apps/openmw/mwrender/shadow.hpp
2017-11-07 16:34:51 +00:00

31 lines
738 B
C++

#ifndef OPENMW_MWRENDER_SHADOW_H
#define OPENMW_MWRENDER_SHADOW_H
#include <osgShadow/ViewDependentShadowMap>
namespace MWRender
{
class MWShadow : public osgShadow::ViewDependentShadowMap
{
public:
static const int numberOfShadowMapsPerLight = 2;
static const bool debugHud = true;
MWShadow();
const static int baseShadowTextureUnit = 8 - numberOfShadowMapsPerLight;
virtual void cull(osgUtil::CullVisitor& cv);
protected:
const int debugTextureUnit;
std::vector<osg::ref_ptr<osg::Camera>> debugCameras;
osg::ref_ptr<osg::Program> debugProgram;
std::vector<osg::ref_ptr<osg::Node>> debugGeometry;
};
}
#endif //OPENMW_MWRENDER_SHADOW_H