1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwrender/distortion.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
775 B
C++
Raw Normal View History

2023-11-10 16:02:53 +00:00
#include <array>
#include <osgUtil/RenderBin>
namespace osg
{
class FrameBufferObject;
}
namespace MWRender
{
class DistortionCallback : public osgUtil::RenderBin::DrawCallback
{
public:
void drawImplementation(
osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) override;
void setFBO(const osg::ref_ptr<osg::FrameBufferObject>& fbo, size_t frameId) { mFBO[frameId] = fbo; }
void setOriginalFBO(const osg::ref_ptr<osg::FrameBufferObject>& fbo, size_t frameId)
{
mOriginalFBO[frameId] = fbo;
}
private:
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mFBO;
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mOriginalFBO;
};
}