2022-05-13 18:58:00 -07:00
|
|
|
#ifndef OPENMW_MWRENDER_PINGPONGCULL_H
|
|
|
|
#define OPENMW_MWRENDER_PINGPONGCULL_H
|
|
|
|
|
|
|
|
#include <array>
|
|
|
|
|
|
|
|
#include <components/sceneutil/nodecallback.hpp>
|
|
|
|
|
|
|
|
#include "postprocessor.hpp"
|
|
|
|
|
2022-06-21 15:55:06 +00:00
|
|
|
namespace osg
|
|
|
|
{
|
|
|
|
class StateSet;
|
|
|
|
class Viewport;
|
|
|
|
}
|
|
|
|
|
2022-05-13 18:58:00 -07:00
|
|
|
namespace MWRender
|
|
|
|
{
|
|
|
|
class PostProcessor;
|
|
|
|
class PingPongCull : public SceneUtil::NodeCallback<PingPongCull, osg::Node*, osgUtil::CullVisitor*>
|
|
|
|
{
|
|
|
|
public:
|
2022-06-21 15:55:06 +00:00
|
|
|
PingPongCull(PostProcessor* pp);
|
|
|
|
~PingPongCull();
|
|
|
|
|
2022-05-13 18:58:00 -07:00
|
|
|
void operator()(osg::Node* node, osgUtil::CullVisitor* nv);
|
2022-09-22 21:26:05 +03:00
|
|
|
|
2022-05-13 18:58:00 -07:00
|
|
|
private:
|
2022-06-21 15:55:06 +00:00
|
|
|
std::array<osg::Matrixf, 2> mLastViewMatrix;
|
|
|
|
osg::ref_ptr<osg::StateSet> mViewportStateset;
|
|
|
|
osg::ref_ptr<osg::Viewport> mViewport;
|
|
|
|
PostProcessor* mPostProcessor;
|
2022-05-13 18:58:00 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|