1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/components/sceneutil/shadow.hpp
2022-09-22 21:35:26 +03:00

53 lines
1.3 KiB
C++

#ifndef COMPONENTS_SCENEUTIL_SHADOW_H
#define COMPONENTS_SCENEUTIL_SHADOW_H
#include <components/shader/shadermanager.hpp>
namespace osg
{
class StateSet;
class Group;
}
namespace osgShadow
{
class ShadowSettings;
class ShadowedScene;
}
namespace SceneUtil
{
class MWShadowTechnique;
class ShadowManager
{
public:
static void disableShadowsForStateSet(osg::ref_ptr<osg::StateSet> stateSet);
static Shader::ShaderManager::DefineMap getShadowsDisabledDefines();
ShadowManager(osg::ref_ptr<osg::Group> sceneRoot, osg::ref_ptr<osg::Group> rootNode,
unsigned int outdoorShadowCastingMask, unsigned int indoorShadowCastingMask, unsigned int worldMask,
Shader::ShaderManager& shaderManager);
~ShadowManager();
void setupShadowSettings();
Shader::ShaderManager::DefineMap getShadowDefines();
void enableIndoorMode();
void enableOutdoorMode();
protected:
bool mEnableShadows;
osg::ref_ptr<osgShadow::ShadowedScene> mShadowedScene;
osg::ref_ptr<osgShadow::ShadowSettings> mShadowSettings;
osg::ref_ptr<MWShadowTechnique> mShadowTechnique;
unsigned int mOutdoorShadowCastingMask;
unsigned int mIndoorShadowCastingMask;
};
}
#endif // COMPONENTS_SCENEUTIL_SHADOW_H