1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwrender/postprocessor.hpp

50 lines
1.1 KiB
C++
Raw Normal View History

2021-06-01 19:15:25 +00:00
#ifndef OPENMW_MWRENDER_POSTPROCESSOR_H
#define OPENMW_MWRENDER_POSTPROCESSOR_H
2021-08-05 00:49:57 +00:00
#include <osg/Texture2D>
#include <osg/Group>
#include <osg/FrameBufferObject>
#include <osg/Camera>
2021-06-01 19:15:25 +00:00
#include <osg/ref_ptr>
namespace osgViewer
{
class Viewer;
}
namespace MWRender
{
class RenderingManager;
2021-08-05 00:49:57 +00:00
class PostProcessor : public osg::Referenced
2021-06-01 19:15:25 +00:00
{
public:
PostProcessor(RenderingManager& rendering, osgViewer::Viewer* viewer, osg::Group* rootNode);
2021-06-01 19:15:25 +00: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 19:15:25 +00:00
private:
2021-08-05 00:49:57 +00:00
void createTexturesAndCamera(int width, int height);
2021-06-01 19:15:25 +00:00
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;
RenderingManager& mRendering;
2021-06-01 19:15:25 +00:00
};
}
#endif