2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-04-02 03:03:37 +00:00
|
|
|
|
|
|
|
#include "zeus/CMatrix4f.hpp"
|
|
|
|
#include "zeus/CColor.hpp"
|
|
|
|
#include "zeus/CRectangle.hpp"
|
|
|
|
#include "Camera/CCameraFilter.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CEnergyBarShader
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct Vertex
|
|
|
|
{
|
|
|
|
zeus::CVector3f pos;
|
|
|
|
zeus::CVector2f uv;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct Uniform
|
|
|
|
{
|
|
|
|
zeus::CMatrix4f m_matrix;
|
|
|
|
zeus::CColor m_color;
|
|
|
|
};
|
2017-11-05 06:17:12 +00:00
|
|
|
boo::ObjToken<boo::IGraphicsBufferD> m_vbo;
|
|
|
|
boo::ObjToken<boo::IGraphicsBufferD> m_uniBuf[3];
|
|
|
|
boo::ObjToken<boo::IShaderDataBinding> m_dataBind[3];
|
2017-04-02 03:03:37 +00:00
|
|
|
Uniform m_uniform;
|
|
|
|
const CTexture* m_tex = nullptr;
|
|
|
|
size_t m_maxVerts = 0;
|
|
|
|
|
|
|
|
public:
|
2018-10-07 02:59:17 +00:00
|
|
|
static void Initialize();
|
|
|
|
static void Shutdown();
|
2017-04-02 03:03:37 +00:00
|
|
|
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);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|