11 #include "cores/GameSettings.h" 12 #include "cores/RetroPlayer/rendering/RenderSettings.h" 13 #include "utils/Geometry.h" 17 #include <libavutil/pixfmt.h> 35 class IRenderBufferPool;
42 std::shared_ptr<IRenderBufferPool> bufferPool);
51 bool Configure(AVPixelFormat format);
56 void PreRender(
bool clear);
58 void RenderFrame(
bool clear, uint8_t alpha);
61 virtual bool Supports(RENDERFEATURE feature)
const = 0;
63 virtual SCALINGMETHOD GetDefaultScalingMethod()
const = 0;
69 const CRenderSettings& GetRenderSettings()
const {
return m_renderSettings; }
72 void SetScalingMethod(SCALINGMETHOD method);
74 void SetRenderRotation(
unsigned int rotationDegCCW);
75 void SetShaderPreset(
const std::string& presetPath);
76 void SetPixels(
const std::string& pixelPath);
79 bool IsVisible()
const;
84 virtual bool ConfigureInternal() {
return true; }
85 virtual void RenderInternal(
bool clear, uint8_t alpha) = 0;
86 virtual void FlushInternal() {}
90 std::shared_ptr<IRenderBufferPool> m_bufferPool;
93 bool m_bConfigured =
false;
94 AVPixelFormat m_format = AV_PIX_FMT_NONE;
102 std::array<CPoint, 4> m_rotatedDestCoords{};
105 void Updateshaders();
106 std::unique_ptr<SHADER::IShaderPreset> m_shaderPreset;
108 bool m_shadersNeedUpdate;
109 bool m_bUseShaderPreset;
115 virtual void ManageRenderArea(
const IRenderBuffer& renderBuffer);
125 void GetScreenDimensions(
float& screenWidth,
float& screenHeight,
float& screenPixelRatio);
127 uint64_t m_renderFrameCount = 0;
128 uint64_t m_lastRender = 0;
Definition: IRenderBuffer.h:27
Definition: AudioDecoder.h:18
Definition: IRenderBufferPool.h:30
STRETCHMODE
Methods for stretching the game to the viewing area.
Definition: GameSettings.h:29
Definition: RenderContext.h:43
Definition: settings.py:1
Video settings provided by the rendering system.
Definition: RenderVideoSettings.h:22
IRenderBufferPool * GetBufferPool()
Get the buffer pool used by this renderer.
Definition: RPBaseRenderer.h:48
Definition: RPBaseRenderer.h:37
Definition: RenderSettings.h:17