mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
cced3b4a18
Let's OpenGL's PostProcessing namespace be changed to a class inheriting from VideoCommon's PostProcessing class.
44 lines
889 B
C++
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
|