2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 23:51:22 +00:00
metaforce/Runtime/Graphics/Shaders/CRadarPaintShader.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

37 lines
766 B
C++

#pragma once
#include <array>
#include <vector>
#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
#include <zeus/CColor.hpp>
#include <zeus/CVector2f.hpp>
#include <zeus/CVector3f.hpp>
namespace urde {
class CTexture;
class CRadarPaintShader {
public:
struct Instance {
std::array<zeus::CVector3f, 4> pos;
std::array<zeus::CVector2f, 4> uv;
zeus::CColor color;
};
private:
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf;
boo::ObjToken<boo::IShaderDataBinding> m_dataBind;
const CTexture* m_tex = nullptr;
size_t m_maxInsts = 0;
public:
static void Initialize();
static void Shutdown();
void draw(const std::vector<Instance>& instances, const CTexture* tex);
};
} // namespace urde