2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-09-03 05:53:38 +00:00
|
|
|
|
2020-09-29 04:58:21 +00:00
|
|
|
#include "hsh/hsh.h"
|
2017-09-03 05:53:38 +00:00
|
|
|
|
2019-09-29 00:30:53 +00:00
|
|
|
namespace zeus {
|
2020-09-29 04:58:21 +00:00
|
|
|
class CColor;
|
2019-09-29 00:30:53 +00:00
|
|
|
class CAABox;
|
2020-09-29 04:58:21 +00:00
|
|
|
} // namespace zeus
|
2019-09-29 00:30:53 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
|
|
|
class CAABoxShader {
|
2020-09-29 04:58:21 +00:00
|
|
|
public:
|
2020-09-28 20:54:40 +00:00
|
|
|
struct Vert {
|
|
|
|
hsh::float3 m_pos;
|
|
|
|
};
|
2018-12-08 05:30:43 +00:00
|
|
|
struct Uniform {
|
2020-09-28 20:54:40 +00:00
|
|
|
hsh::float4x4 m_xf;
|
|
|
|
hsh::float4 m_color;
|
2018-12-08 05:30:43 +00:00
|
|
|
};
|
2020-09-29 04:58:21 +00:00
|
|
|
|
|
|
|
private:
|
2020-09-28 20:54:40 +00:00
|
|
|
hsh::owner<hsh::vertex_buffer<Vert>> m_vbo;
|
|
|
|
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
|
|
|
|
hsh::binding m_dataBind;
|
2020-09-29 04:58:21 +00:00
|
|
|
Uniform m_uniform{};
|
2017-09-03 05:53:38 +00:00
|
|
|
|
|
|
|
public:
|
2020-09-30 05:58:28 +00:00
|
|
|
CAABoxShader(const zeus::CAABox& aabb);
|
2018-12-08 05:30:43 +00:00
|
|
|
void draw(const zeus::CColor& color);
|
2017-09-03 05:53:38 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|