dolphin/Source/Core/VideoBackends/OGL/PostProcessing.h
Ryan Houdek cced3b4a18 Change OpenGL's post processing to use the new VideoCommon PP object.
Let's OpenGL's PostProcessing namespace be changed to a class inheriting from VideoCommon's PostProcessing class.
2014-08-13 01:05:15 -05:00

44 lines
889 B
C++

// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#pragma once
#include <string>
#include <unordered_map>
#include "VideoBackends/OGL/GLUtil.h"
#include "VideoCommon/PostProcessing.h"
#include "VideoCommon/VideoCommon.h"
namespace OGL
{
class OpenGLPostProcessing : public PostProcessingShaderImplementation
{
public:
OpenGLPostProcessing();
~OpenGLPostProcessing();
void BindTargetFramebuffer() override;
void BlitToScreen() override;
void Update(u32 width, u32 height) override;
void ApplyShader() override;
private:
GLuint m_fbo;
GLuint m_texture;
SHADER m_shader;
GLuint m_uniform_resolution;
GLuint m_uniform_time;
std::string m_glsl_header;
std::unordered_map<std::string, GLuint> m_uniform_bindings;
void CreateHeader();
std::string LoadShaderOptions(const std::string& code);
};
} // namespace