mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-03 17:37:18 +00:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
#define OPENMW_MWRENDER_TRANSPARENTPASS_H
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
|
|
#include <osg/FrameBufferObject>
|
|
#include <osg/StateSet>
|
|
|
|
#include <osgUtil/RenderBin>
|
|
|
|
namespace Shader
|
|
{
|
|
class ShaderManager;
|
|
}
|
|
|
|
namespace Stereo
|
|
{
|
|
class MultiviewFramebufferResolve;
|
|
}
|
|
|
|
namespace MWRender
|
|
{
|
|
class TransparentDepthBinCallback : public osgUtil::RenderBin::DrawCallback
|
|
{
|
|
public:
|
|
TransparentDepthBinCallback(Shader::ShaderManager& shaderManager, bool postPass);
|
|
|
|
void drawImplementation(
|
|
osgUtil::RenderBin* bin, osg::RenderInfo& renderInfo, osgUtil::RenderLeaf*& previous) override;
|
|
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mFbo;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mMsaaFbo;
|
|
std::array<osg::ref_ptr<osg::FrameBufferObject>, 2> mOpaqueFbo;
|
|
|
|
std::array<std::unique_ptr<Stereo::MultiviewFramebufferResolve>, 2> mMultiviewResolve;
|
|
|
|
private:
|
|
osg::ref_ptr<osg::StateSet> mStateSet;
|
|
bool mPostPass;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|