2018-10-06 20:42:33 -07:00
|
|
|
#pragma once
|
2016-08-16 18:58:53 -07:00
|
|
|
|
2019-09-27 19:53:03 -07:00
|
|
|
#include "Runtime/CToken.hpp"
|
2019-09-28 17:30:53 -07:00
|
|
|
|
2022-01-31 16:06:54 -08:00
|
|
|
//#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
|
2019-09-27 19:53:03 -07:00
|
|
|
|
|
|
|
#include <zeus/CColor.hpp>
|
|
|
|
#include <zeus/CMatrix4f.hpp>
|
|
|
|
#include <zeus/CRectangle.hpp>
|
2016-08-16 18:58:53 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
namespace metaforce {
|
2019-09-28 17:30:53 -07:00
|
|
|
class CTexture;
|
|
|
|
|
|
|
|
enum class EFilterShape;
|
|
|
|
enum class EFilterType;
|
2018-12-07 21:30:43 -08:00
|
|
|
|
|
|
|
class CColoredQuadFilter {
|
|
|
|
struct Uniform {
|
|
|
|
zeus::CMatrix4f m_matrix;
|
|
|
|
zeus::CColor m_color;
|
|
|
|
};
|
2022-01-31 16:06:54 -08:00
|
|
|
// boo::ObjToken<boo::IGraphicsBufferS> m_vbo;
|
|
|
|
// boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
|
|
|
|
// boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
|
2018-12-07 21:30:43 -08:00
|
|
|
Uniform m_uniform;
|
2016-08-16 18:58:53 -07:00
|
|
|
|
|
|
|
public:
|
2018-12-07 21:30:43 -08:00
|
|
|
static void Initialize();
|
|
|
|
static void Shutdown();
|
2020-05-27 10:02:20 -07:00
|
|
|
static constexpr zeus::CRectangle DefaultRect{0.f, 0.f, 1.f, 1.f};
|
|
|
|
|
2020-03-30 20:52:22 -07:00
|
|
|
explicit CColoredQuadFilter(EFilterType type);
|
|
|
|
explicit CColoredQuadFilter(EFilterType type, const TLockedToken<CTexture>&) : CColoredQuadFilter(type) {}
|
2018-12-07 21:30:43 -08:00
|
|
|
void draw(const zeus::CColor& color, const zeus::CRectangle& rect = DefaultRect);
|
|
|
|
void DrawFilter(EFilterShape shape, const zeus::CColor& color, float t) { draw(color); }
|
2016-08-16 18:58:53 -07:00
|
|
|
};
|
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
class CWideScreenFilter {
|
|
|
|
CColoredQuadFilter m_top;
|
|
|
|
CColoredQuadFilter m_bottom;
|
|
|
|
|
2016-08-19 21:22:13 -07:00
|
|
|
public:
|
2020-03-30 20:52:22 -07:00
|
|
|
explicit CWideScreenFilter(EFilterType type) : m_top(type), m_bottom(type) {}
|
|
|
|
explicit CWideScreenFilter(EFilterType type, const TLockedToken<CTexture>&) : CWideScreenFilter(type) {}
|
2018-12-07 21:30:43 -08:00
|
|
|
void draw(const zeus::CColor& color, float t);
|
2020-05-14 16:23:43 -07:00
|
|
|
void DrawFilter(EFilterShape shape, const zeus::CColor& color, float t) { draw(color, t); }
|
2016-08-19 21:22:13 -07:00
|
|
|
|
2018-12-07 21:30:43 -08:00
|
|
|
static float SetViewportToMatch(float t);
|
|
|
|
static void SetViewportToFull();
|
|
|
|
};
|
2016-08-16 18:58:53 -07:00
|
|
|
|
2021-04-10 01:42:06 -07:00
|
|
|
} // namespace metaforce
|