2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-04-07 05:35:09 +00:00
|
|
|
|
2019-09-29 02:22:12 +00:00
|
|
|
#include <array>
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2020-09-28 20:54:40 +00:00
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
#include "zeus/CVector2f.hpp"
|
|
|
|
#include "zeus/CVector3f.hpp"
|
2017-04-07 05:35:09 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2019-09-29 00:30:53 +00:00
|
|
|
class CTexture;
|
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 {
|
2019-09-29 02:22:12 +00:00
|
|
|
std::array<zeus::CVector3f, 4> pos;
|
|
|
|
std::array<zeus::CVector2f, 4> uv;
|
2018-12-08 05:30:43 +00:00
|
|
|
zeus::CColor color;
|
|
|
|
};
|
2020-09-28 20:54:40 +00:00
|
|
|
struct Uniform {
|
|
|
|
hsh::float4x4 xf;
|
|
|
|
};
|
2017-04-07 05:35:09 +00:00
|
|
|
|
|
|
|
private:
|
2020-09-28 20:54:40 +00:00
|
|
|
hsh::dynamic_owner<hsh::vertex_buffer<Instance>> m_vbo;
|
|
|
|
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
|
|
|
|
hsh::binding m_dataBind;
|
2018-12-08 05:30:43 +00:00
|
|
|
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
|
|
|
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
|