2015-05-06 01:27:59 -04:00
|
|
|
#pragma once
|
|
|
|
|
2020-02-02 19:46:03 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QWindow>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QPushButton>
|
|
|
|
|
2019-06-04 22:56:44 -04:00
|
|
|
#include "gs/GSHandler.h"
|
|
|
|
#include "FrameDump.h"
|
2015-05-06 01:27:59 -04:00
|
|
|
#include "PixelBufferView.h"
|
|
|
|
|
2020-02-02 19:46:03 +00:00
|
|
|
class CGsContextView : public QWidget
|
2015-05-06 01:27:59 -04:00
|
|
|
{
|
|
|
|
public:
|
2021-08-20 15:39:52 -04:00
|
|
|
typedef std::unique_ptr<CGSHandler> GsHandlerPtr;
|
|
|
|
|
2015-05-06 01:27:59 -04:00
|
|
|
enum FB_DISPLAY_MODE
|
|
|
|
{
|
|
|
|
FB_DISPLAY_MODE_RAW,
|
|
|
|
FB_DISPLAY_MODE_448P,
|
|
|
|
FB_DISPLAY_MODE_448I
|
|
|
|
};
|
|
|
|
|
2021-08-20 15:39:52 -04:00
|
|
|
CGsContextView(QWidget*, QComboBox*, QPushButton*, QPushButton*, const GsHandlerPtr&, unsigned int);
|
2020-02-06 14:12:26 +00:00
|
|
|
virtual ~CGsContextView() = default;
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
void SetFbDisplayMode(FB_DISPLAY_MODE);
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2021-08-20 15:39:52 -04:00
|
|
|
void UpdateState(CGsPacketMetadata*, DRAWINGKICK_INFO*);
|
2020-02-02 19:46:03 +00:00
|
|
|
void SetSelection(int);
|
2015-05-06 01:27:59 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-31 10:42:31 -04:00
|
|
|
typedef std::array<uint32, 256> ColorArray;
|
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
void UpdateBufferView();
|
|
|
|
void UpdateFramebufferView();
|
2022-06-20 17:51:51 -04:00
|
|
|
void UpdateDepthbufferView();
|
|
|
|
|
|
|
|
Framework::CBitmap ClipRenderbuffer(Framework::CBitmap, float);
|
|
|
|
Framework::CBitmap PostProcessRenderbuffer(Framework::CBitmap, float);
|
2018-04-30 21:01:23 +01:00
|
|
|
void RenderDrawKick(Framework::CBitmap&);
|
2015-05-06 01:27:59 -04:00
|
|
|
|
2020-01-26 12:12:50 +00:00
|
|
|
static uint32 Color_Ps2ToRGBA(uint32);
|
2018-04-30 21:01:23 +01:00
|
|
|
static void BrightenBitmap(Framework::CBitmap&);
|
|
|
|
static Framework::CBitmap LookupBitmap(const Framework::CBitmap&, const ColorArray&);
|
|
|
|
static Framework::CBitmap ExtractAlpha32(const Framework::CBitmap&);
|
2016-10-17 20:01:03 -04:00
|
|
|
|
2018-04-30 21:01:23 +01:00
|
|
|
unsigned int m_contextId = 0;
|
2020-02-02 19:46:03 +00:00
|
|
|
std::unique_ptr<CPixelBufferView> m_bufferView;
|
2021-08-20 15:39:52 -04:00
|
|
|
const GsHandlerPtr& m_gs;
|
2018-04-30 21:01:23 +01:00
|
|
|
FB_DISPLAY_MODE m_fbDisplayMode = FB_DISPLAY_MODE_RAW;
|
|
|
|
DRAWINGKICK_INFO m_drawingKick;
|
2020-02-02 19:46:03 +00:00
|
|
|
int m_selected = 0;
|
2015-05-06 01:27:59 -04:00
|
|
|
};
|