2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:29:41 +00:00
|
|
|
// Refer to the license.txt file included.
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2015-10-09 18:50:36 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoBackends/Software/EfbInterface.h"
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2015-10-09 18:50:36 +00:00
|
|
|
#include "VideoCommon/RenderBase.h"
|
|
|
|
|
|
|
|
class SWRenderer : public Renderer
|
2014-02-17 04:51:41 +00:00
|
|
|
{
|
2015-10-09 18:50:36 +00:00
|
|
|
public:
|
2017-03-04 06:40:08 +00:00
|
|
|
SWRenderer();
|
2016-06-24 08:43:46 +00:00
|
|
|
~SWRenderer() override;
|
2014-03-29 10:05:44 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
static void Init();
|
|
|
|
static void Shutdown();
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
static u8* GetNextColorTexture();
|
|
|
|
static u8* GetCurrentColorTexture();
|
|
|
|
void SwapColorTexture();
|
|
|
|
void UpdateColorTexture(EfbInterface::yuv422_packed* xfb, u32 fbWidth, u32 fbHeight);
|
2010-06-09 01:37:08 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void RenderText(const std::string& pstr, int left, int top, u32 color) override;
|
|
|
|
u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) override;
|
2017-07-30 19:56:12 +00:00
|
|
|
void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {}
|
2016-06-24 08:43:46 +00:00
|
|
|
u16 BBoxRead(int index) override;
|
|
|
|
void BBoxWrite(int index, u16 value) override;
|
2015-10-09 18:50:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) override;
|
2015-10-09 18:50:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const EFBRectangle& rc,
|
2016-10-08 10:56:28 +00:00
|
|
|
u64 ticks, float Gamma) override;
|
2015-10-09 18:50:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable,
|
|
|
|
u32 color, u32 z) override;
|
2015-10-09 18:50:36 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
void ReinterpretPixelData(unsigned int convtype) override {}
|
2015-10-09 18:50:36 +00:00
|
|
|
};
|