metaforce/Runtime/Graphics/Shaders/CFogVolumePlaneShader.hpp

38 lines
776 B
C++

#pragma once
#include <array>
#include <cstddef>
#include <vector>
#include "zeus/CRectangle.hpp"
#include "zeus/CVector4f.hpp"
namespace urde {
class CFogVolumePlaneShader {
template <size_t I>
friend struct CFogVolumePlanePipeline;
struct Vert {
hsh::float4 pos;
Vert(hsh::float4 pos) : pos(pos) {}
};
hsh::dynamic_owner<hsh::vertex_buffer<Vert>> m_vbo;
std::array<hsh::binding, 4> m_dataBinds;
std::vector<Vert> m_verts;
size_t m_vertCapacity = 0;
void CommitResources(size_t capacity);
public:
static const zeus::CRectangle DefaultRect;
void reset(size_t numVerts) {
m_verts.clear();
m_verts.reserve(numVerts);
}
void addFan(const zeus::CVector3f* verts, size_t numVerts);
void draw(size_t pass);
};
} // namespace urde