mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
|
#ifndef GAME_MWRENDER_COMPOSITORS_H
|
||
|
#define GAME_MWRENDER_COMPOSITORS_H
|
||
|
|
||
|
#include <map>
|
||
|
#include <string>
|
||
|
|
||
|
namespace Ogre
|
||
|
{
|
||
|
class Viewport;
|
||
|
}
|
||
|
|
||
|
namespace MWRender
|
||
|
{
|
||
|
typedef std::map < std::string, std::pair<bool, int> > CompositorMap;
|
||
|
|
||
|
/// \brief Manages a set of compositors for one viewport
|
||
|
class Compositors
|
||
|
{
|
||
|
public:
|
||
|
Compositors(Ogre::Viewport* vp);
|
||
|
virtual ~Compositors();
|
||
|
|
||
|
/**
|
||
|
* enable or disable all compositors globally
|
||
|
*/
|
||
|
void setEnabled (const bool enabled);
|
||
|
|
||
|
bool toggle() { setEnabled(!mEnabled); return mEnabled; }
|
||
|
|
||
|
/**
|
||
|
* enable or disable a specific compositor
|
||
|
* @note enable has no effect if all compositors are globally disabled
|
||
|
*/
|
||
|
void setCompositorEnabled (const std::string& name, const bool enabled);
|
||
|
|
||
|
/**
|
||
|
* @param name of compositor
|
||
|
* @param priority, lower number will be first in the chain
|
||
|
*/
|
||
|
void addCompositor (const std::string& name, const int priority);
|
||
|
|
||
|
protected:
|
||
|
/// maps compositor name to its "enabled" state
|
||
|
CompositorMap mCompositors;
|
||
|
|
||
|
bool mEnabled;
|
||
|
|
||
|
Ogre::Viewport* mViewport;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|