1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/apps/openmw/mwrender/transparentpass.hpp

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

46 lines
1.1 KiB
C++
Raw Normal View History

2022-05-14 01:58:00 +00:00
#ifndef OPENMW_MWRENDER_TRANSPARENTPASS_H
#define OPENMW_MWRENDER_TRANSPARENTPASS_H
#include <array>
#include <memory>
2022-05-14 01:58:00 +00:00
#include <osg/FrameBufferObject>
#include <osg/StateSet>
#include <osgUtil/RenderBin>
namespace Shader
{
class ShaderManager;
}
namespace Stereo
{
class MultiviewFramebufferResolve;
}
2022-05-14 01:58:00 +00:00
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;
2022-06-21 15:55:06 +00:00
2022-05-14 01:58:00 +00:00
private:
osg::ref_ptr<osg::StateSet> mStateSet;
bool mPostPass;
};
}
2022-06-21 15:55:06 +00:00
#endif