metaforce/Runtime/Graphics/Shaders/CAABoxShader.hpp

33 lines
547 B
C++
Raw Normal View History

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
namespace zeus {
2020-09-29 04:58:21 +00:00
class CColor;
class CAABox;
2020-09-29 04:58:21 +00:00
} // namespace zeus
2018-12-08 05:30:43 +00:00
namespace urde {
class CAABoxShader {
2020-09-29 04:58:21 +00:00
public:
struct Vert {
hsh::float3 m_pos;
};
2018-12-08 05:30:43 +00:00
struct Uniform {
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:
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:
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