1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00
GLideN64/src/PostProcessor.h
Sergey Lipskiy bc1f2d37d4 Code cleanup: remove commented code for blur post filter.
It will not be refactored.
2017-10-24 20:36:08 +07:00

48 lines
1.1 KiB
C++

#ifndef POST_PROCESSOR_H
#define POST_PROCESSOR_H
#include <memory>
#include "Types.h"
#include "Textures.h"
#include "Graphics/ObjectHandle.h"
namespace graphics {
class ShaderProgram;
}
struct FrameBuffer;
class PostProcessor {
public:
void init();
void destroy();
FrameBuffer * doGammaCorrection(FrameBuffer * _pBuffer);
FrameBuffer * doOrientationCorrection(FrameBuffer * _pBuffer);
static PostProcessor & get();
private:
PostProcessor();
PostProcessor(const PostProcessor & _other);
void _createResultBuffer(const FrameBuffer * _pMainBuffer);
void _initGammaCorrection();
void _destroyGammaCorrection();
void _initOrientationCorrection();
void _destroyOrientationCorrection();
void _preDraw(FrameBuffer * _pBuffer);
void _postDraw();
std::unique_ptr<graphics::ShaderProgram> m_gammaCorrectionProgram;
std::unique_ptr<graphics::ShaderProgram> m_orientationCorrectionProgram;
std::unique_ptr<FrameBuffer> m_pResultBuffer;
CachedTexture * m_pTextureOriginal;
#ifdef OS_ANDROID
static PostProcessor processor;
#endif
};
#endif // POST_PROCESSOR_H