1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00
OpenMW/apps/openmw/mwrender/postprocessor.hpp

54 lines
1.1 KiB
C++
Raw Normal View History

2021-06-01 12:15:25 -07:00
#ifndef OPENMW_MWRENDER_POSTPROCESSOR_H
#define OPENMW_MWRENDER_POSTPROCESSOR_H
#include <osg/ref_ptr>
namespace osg
{
class Texture2D;
class Group;
class FrameBufferObject;
class Camera;
}
namespace osgViewer
{
class Viewer;
}
namespace MWRender
{
class RenderingManager;
2021-06-01 12:15:25 -07:00
class PostProcessor
{
public:
PostProcessor(RenderingManager& rendering, osgViewer::Viewer* viewer, osg::Group* rootNode);
2021-06-01 12:15:25 -07:00
auto getMsaaFbo() { return mMsaaFbo; }
auto getFbo() { return mFbo; }
int getDepthFormat() { return mDepthFormat; }
void resize(int width, int height, bool init=false);
2021-06-01 12:15:25 -07:00
private:
osgViewer::Viewer* mViewer;
osg::ref_ptr<osg::Group> mRootNode;
osg::ref_ptr<osg::Camera> mHUDCamera;
osg::ref_ptr<osg::FrameBufferObject> mMsaaFbo;
osg::ref_ptr<osg::FrameBufferObject> mFbo;
osg::ref_ptr<osg::Texture2D> mSceneTex;
osg::ref_ptr<osg::Texture2D> mDepthTex;
int mDepthFormat;
2021-06-01 12:15:25 -07:00
void createTexturesAndCamera(int width, int height);
RenderingManager& mRendering;
2021-06-01 12:15:25 -07:00
};
}
#endif