#pragma once

#include "blitz/maths/Vector.h"
#include "client/render/loader/ModelLoader.h"
#include <memory>
#include <vector>


namespace blitz {

namespace shader {
class BulletShader;
}  // namespace shader


namespace render {

class Camera;

struct Trail {
	Mat4f m_Transform;
	float m_Decay;
};


class BulletRenderer {
  private:
	std::vector<Trail> m_Trails;
	ModelLoader::Model m_BulletModel;
	std::unique_ptr<shader::BulletShader> m_Shader;
	const Camera& m_Camera;

  public:
	BulletRenderer(const Camera& cam);
	~BulletRenderer();

	void AddBullet(const Vec3f& origin, float yaw, float pitch, bool firstPersson);
	void Update(float delta);
	void Render();
};

}  // namespace render
}  // namespace blitz
