metaforce/Runtime/Graphics/Shaders/CRadarPaintShader.hpp

35 lines
702 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-04-07 05:35:09 +00:00
#include <vector>
#include "Runtime/Camera/CCameraFilter.hpp"
#include <zeus/CColor.hpp>
#include <zeus/CMatrix4f.hpp>
#include <zeus/CRectangle.hpp>
2017-04-07 05:35:09 +00:00
2018-12-08 05:30:43 +00:00
namespace urde {
2017-04-07 05:35:09 +00:00
2018-12-08 05:30:43 +00:00
class CRadarPaintShader {
2017-04-07 05:35:09 +00:00
public:
2018-12-08 05:30:43 +00:00
struct Instance {
zeus::CVector3f pos[4];
zeus::CVector2f uv[4];
zeus::CColor color;
};
2017-04-07 05:35:09 +00:00
private:
2018-12-08 05:30:43 +00:00
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
const CTexture* m_tex = nullptr;
size_t m_maxInsts = 0;
2017-04-07 05:35:09 +00:00
public:
2018-12-08 05:30:43 +00:00
static void Initialize();
static void Shutdown();
void draw(const std::vector<Instance>& instances, const CTexture* tex);
2017-04-07 05:35:09 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde