//object encapsulating an omni directional light source

#pragma once

#include "common.hpp"

#include "scenenode.h"
#include "glm/glm.hpp"

class odsm_source {
public:
	odsm_source();
	odsm_source(const GLuint cm_dim, const glm::vec3 light, const glm::vec2 near_far);
	virtual ~odsm_source();

	//members
	GLuint odsm_tex_ID;
	GLuint odsm_FBO;
	glm::mat4 perspective_odsm;
	glm::mat4 cm_rots[6]; //rotation matrices for each cubemap face
	glm::mat4 cm_trans;
	GLfloat* view_odsm[6]; //view matrices for each cubemap face
	GLuint cubemap_dim;
	glm::vec3 light;
	glm::vec2 near_far;

	//functions
	void render_odsm(scene_node& node); //render omni-directional shadow mapping
	void init_odsm();
private:

};