2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-04-22 06:42:32 +00:00
|
|
|
|
2019-09-29 00:30:53 +00:00
|
|
|
#include "Runtime/GCNTypes.hpp"
|
2019-09-28 02:53:03 +00:00
|
|
|
|
2020-09-28 20:54:40 +00:00
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
#include "zeus/CMatrix4f.hpp"
|
2017-04-22 06:42:32 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-04-22 06:42:32 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CMapSurfaceShader {
|
2020-09-28 20:54:40 +00:00
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
struct Uniform {
|
2020-09-28 20:54:40 +00:00
|
|
|
hsh::float4x4 mtx;
|
|
|
|
hsh::float4 color;
|
|
|
|
};
|
|
|
|
struct Vert {
|
|
|
|
hsh::float3 pos;
|
|
|
|
Vert() = default;
|
|
|
|
Vert(float x, float y, float z) : pos(x, y, z) {}
|
2018-12-08 05:30:43 +00:00
|
|
|
};
|
2017-04-22 06:42:32 +00:00
|
|
|
|
2020-09-28 20:54:40 +00:00
|
|
|
private:
|
|
|
|
hsh::dynamic_owner<hsh::uniform_buffer<Uniform>> m_uniBuf;
|
|
|
|
hsh::binding m_dataBind;
|
2017-04-22 06:42:32 +00:00
|
|
|
|
|
|
|
public:
|
2020-09-28 20:54:40 +00:00
|
|
|
CMapSurfaceShader(hsh::vertex_buffer<Vert> vbo,
|
|
|
|
hsh::index_buffer<uint32_t> ibo);
|
2018-12-08 05:30:43 +00:00
|
|
|
void draw(const zeus::CColor& color, u32 start, u32 count);
|
2017-04-22 06:42:32 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|