2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:29:41 -06:00
|
|
|
// Refer to the license.txt file included.
|
2010-06-08 19:37:08 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2010-06-08 19:37:08 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
#include "Common/Thread.h"
|
2015-10-09 12:50:36 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "VideoBackends/Software/EfbInterface.h"
|
2010-06-08 19:37:08 -06:00
|
|
|
|
2015-10-09 12:50:36 -06:00
|
|
|
#include "VideoCommon/RenderBase.h"
|
|
|
|
|
|
|
|
class SWRenderer : public Renderer
|
2014-02-16 21:51:41 -07:00
|
|
|
{
|
2015-10-09 12:50:36 -06:00
|
|
|
public:
|
|
|
|
~SWRenderer() override;
|
2014-03-29 04:05:44 -06:00
|
|
|
|
2015-10-09 12:50:36 -06:00
|
|
|
static void Init();
|
|
|
|
static void Shutdown();
|
2010-06-08 19:37:08 -06:00
|
|
|
|
2015-10-09 12:50:36 -06:00
|
|
|
static u8* GetNextColorTexture();
|
|
|
|
static u8* GetCurrentColorTexture();
|
2014-08-10 20:01:42 -06:00
|
|
|
void SwapColorTexture();
|
2013-11-22 22:38:15 -07:00
|
|
|
void UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidth, u32 fbHeight);
|
2010-06-08 19:37:08 -06:00
|
|
|
|
2015-10-09 12:50:36 -06: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;
|
|
|
|
void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {};
|
|
|
|
|
|
|
|
u16 BBoxRead(int index) override;
|
|
|
|
void BBoxWrite(int index, u16 value) override;
|
|
|
|
|
|
|
|
int GetMaxTextureSize() override { return 16 * 1024; };
|
|
|
|
|
|
|
|
TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) override;
|
|
|
|
|
|
|
|
void SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const EFBRectangle& rc, float Gamma) override;
|
|
|
|
|
|
|
|
void ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable, u32 color, u32 z) override;
|
|
|
|
|
|
|
|
void ReinterpretPixelData(unsigned int convtype) override {}
|
|
|
|
|
|
|
|
bool SaveScreenshot(const std::string& filename, const TargetRectangle& rc) override { return true; };
|
|
|
|
};
|