metaforce/Runtime/Graphics/Shaders/CAABoxShader.hpp

32 lines
577 B
C++
Raw Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-09-03 05:53:38 +00:00
#include "zeus/CColor.hpp"
#include "zeus/CMatrix4f.hpp"
2017-09-03 05:53:38 +00:00
namespace zeus {
class CAABox;
}
2018-12-08 05:30:43 +00:00
namespace urde {
2017-09-03 05:53:38 +00:00
2018-12-08 05:30:43 +00:00
class CAABoxShader {
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
};
hsh::owner<hsh::vertex_buffer<Vert>> m_vbo;
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
hsh::binding m_dataBind;
2018-12-08 05:30:43 +00:00
Uniform m_uniform;
2017-09-03 05:53:38 +00:00
public:
explicit CAABoxShader(bool zOnly = false);
2018-12-08 05:30:43 +00:00
void setAABB(const zeus::CAABox& aabb);
void draw(const zeus::CColor& color);
2017-09-03 05:53:38 +00:00
};
2018-12-08 05:30:43 +00:00
} // namespace urde