VideoCommon: Move the blit methods to the backend class
The parameter types will be different for each backend currently, anyway (e.g. textures/render passes/etc).
This commit is contained in:
parent
dd31a403db
commit
a10e8b1ef5
|
@ -23,8 +23,8 @@ public:
|
||||||
~OpenGLPostProcessing();
|
~OpenGLPostProcessing();
|
||||||
|
|
||||||
void BlitFromTexture(TargetRectangle src, TargetRectangle dst, int src_texture, int src_width,
|
void BlitFromTexture(TargetRectangle src, TargetRectangle dst, int src_texture, int src_width,
|
||||||
int src_height, int layer) override;
|
int src_height, int layer);
|
||||||
void ApplyShader() override;
|
void ApplyShader();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
|
|
|
@ -1176,6 +1176,7 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
|
||||||
void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, GLuint src_texture,
|
void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, GLuint src_texture,
|
||||||
int src_width, int src_height)
|
int src_width, int src_height)
|
||||||
{
|
{
|
||||||
|
OpenGLPostProcessing* post_processor = static_cast<OpenGLPostProcessing*>(m_post_processor.get());
|
||||||
if (g_ActiveConfig.iStereoMode == STEREO_SBS || g_ActiveConfig.iStereoMode == STEREO_TAB)
|
if (g_ActiveConfig.iStereoMode == STEREO_SBS || g_ActiveConfig.iStereoMode == STEREO_TAB)
|
||||||
{
|
{
|
||||||
TargetRectangle leftRc, rightRc;
|
TargetRectangle leftRc, rightRc;
|
||||||
|
@ -1186,12 +1187,12 @@ void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, GLuint src_t
|
||||||
else
|
else
|
||||||
std::tie(leftRc, rightRc) = ConvertStereoRectangle(dst);
|
std::tie(leftRc, rightRc) = ConvertStereoRectangle(dst);
|
||||||
|
|
||||||
m_post_processor->BlitFromTexture(src, leftRc, src_texture, src_width, src_height, 0);
|
post_processor->BlitFromTexture(src, leftRc, src_texture, src_width, src_height, 0);
|
||||||
m_post_processor->BlitFromTexture(src, rightRc, src_texture, src_width, src_height, 1);
|
post_processor->BlitFromTexture(src, rightRc, src_texture, src_width, src_height, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_post_processor->BlitFromTexture(src, dst, src_texture, src_width, src_height);
|
post_processor->BlitFromTexture(src, dst, src_texture, src_width, src_height, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@ public:
|
||||||
bool IsDirty() { return m_any_options_dirty; }
|
bool IsDirty() { return m_any_options_dirty; }
|
||||||
void SetDirty(bool dirty) { m_any_options_dirty = dirty; }
|
void SetDirty(bool dirty) { m_any_options_dirty = dirty; }
|
||||||
bool HasOptions() { return m_options.size() > 0; }
|
bool HasOptions() { return m_options.size() > 0; }
|
||||||
|
const ConfigMap& GetOptions() const { return m_options; }
|
||||||
ConfigMap& GetOptions() { return m_options; }
|
ConfigMap& GetOptions() { return m_options; }
|
||||||
const ConfigurationOption& GetOption(const std::string& option) { return m_options[option]; }
|
const ConfigurationOption& GetOption(const std::string& option) { return m_options[option]; }
|
||||||
// For updating option's values
|
// For updating option's values
|
||||||
|
@ -83,11 +84,6 @@ public:
|
||||||
virtual ~PostProcessingShaderImplementation();
|
virtual ~PostProcessingShaderImplementation();
|
||||||
|
|
||||||
PostProcessingShaderConfiguration* GetConfig() { return &m_config; }
|
PostProcessingShaderConfiguration* GetConfig() { return &m_config; }
|
||||||
// Should be implemented by the backends for backend specific code
|
|
||||||
virtual void BlitFromTexture(TargetRectangle src, TargetRectangle dst, int src_texture,
|
|
||||||
int src_width, int src_height, int layer = 0) = 0;
|
|
||||||
virtual void ApplyShader() = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Timer for determining our time value
|
// Timer for determining our time value
|
||||||
Common::Timer m_timer;
|
Common::Timer m_timer;
|
||||||
|
|
Loading…
Reference in New Issue