2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 21:11:21 +00:00
metaforce/Runtime/Graphics/Shaders/CFogVolumePlaneShader.hpp
Lioncash 136a229a1a Graphics/Shaders: Use std::array where applicable
Makes the arrays strongly typed and impervious to array->pointer decay.
This also allows simplifying some operations (such as being able to call
fill() instead of needing to use std::fill, etc).
2019-11-09 20:22:16 -05:00

39 lines
794 B
C++

#pragma once
#include <array>
#include <cstddef>
#include <vector>
#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
#include <zeus/CRectangle.hpp>
#include <zeus/CVector4f.hpp>
namespace zeus {
class CVector3f;
}
namespace urde {
class CFogVolumePlaneShader {
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
std::array<boo::ObjToken<boo::IShaderDataBinding>, 4> m_dataBinds;
std::vector<zeus::CVector4f> m_verts;
size_t m_vertCapacity = 0;
void CommitResources(size_t capacity);
public:
static void Initialize();
static void Shutdown();
static const zeus::CRectangle DefaultRect;
void reset(int numVerts) {
m_verts.clear();
m_verts.reserve(numVerts);
}
void addFan(const zeus::CVector3f* verts, int numVerts);
void draw(int pass);
};
} // namespace urde