2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-11 21:53:28 +00:00
metaforce/Runtime/Graphics/Shaders/CEnergyBarShader.hpp
Lioncash 902f4fb5c5 Graphics/Shaders: Use forward declarations where applicable
Now, with all of the headers normalized, we can safely convert some
headers into forward declarations without needing to worry about
potentially breaking code in other headers or source files.
2019-11-09 20:22:09 -05:00

44 lines
1.0 KiB
C++

#pragma once
#include <vector>
#include <boo/graphicsdev/IGraphicsDataFactory.hpp>
#include <zeus/CColor.hpp>
#include <zeus/CMatrix4f.hpp>
#include <zeus/CVector2f.hpp>
#include <zeus/CVector3f.hpp>
namespace urde {
class CTexture;
class CEnergyBarShader {
public:
struct Vertex {
zeus::CVector3f pos;
zeus::CVector2f uv;
};
private:
struct Uniform {
zeus::CMatrix4f m_matrix;
zeus::CColor m_color;
};
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf[3];
boo::ObjToken<boo::IShaderDataBinding> m_dataBind[3];
Uniform m_uniform;
const CTexture* m_tex = nullptr;
size_t m_maxVerts = 0;
public:
static void Initialize();
static void Shutdown();
void updateModelMatrix();
void draw(const zeus::CColor& color0, const std::vector<Vertex>& verts0, const zeus::CColor& color1,
const std::vector<Vertex>& verts1, const zeus::CColor& color2, const std::vector<Vertex>& verts2,
const CTexture* tex);
};
} // namespace urde