#pragma once
#include "../../stdafx.h"

#include "glLibRenderer.h"

#include "../glLibShader.h"

class glLibRendererParticle : glLibInternal_renderer {
	friend class glLibParticleSystem;
	public:
		string errors;
	private:
		glLibShader* _shader;
		bool _inited;

		#ifdef GLLIB_ERROR_MODE_REPORT_WARNINGS
		bool _has_set_variables;
		bool _has_set_size;
		bool _has_set_color;
		bool _has_warned_variables;
		bool _has_warned_size;
		bool _has_warned_color;
		#endif

		GLuint _location_params1;

	public:
		glLibRendererParticle();
		~glLibRendererParticle();

		void set_variables(void);
		void set_variables(string source);
		void set_calculation_size(string source, bool attenuate=true);
		void set_calculation_color(string source);

		void init(void);

	private:
		void glLibInternal_draw_begin(glLibTexture2D* texture_particle);
		void glLibInternal_draw_end(void);
};