#pragma once

#include <GL/glew.h>
#include "CGShaderProgram.h"
#include "CGScene.h"
#include "CGCamera.h"

class CGModel
{
public:
	void initialize(int w, int h);
	void finalize();
	void render();
	void update();
	void key_pressed(int key);
	void mouse_button(int button, int action);
	void mouse_move(double xpos, double ypos);
	void resize(int w, int h);

private:
	CGShaderProgram* renderProgram;
	CGShaderProgram* volumeProgram;
	CGShaderProgram* compProgram;

	CGScene* scene;
	CGCamera* camera;

	glm::mat4 projection;
	GLsizei wndWidth;
	GLsizei wndHeight;

	GLuint fsVAO;  // Full screen VAO
	GLuint colorDepthFBO; // Frame buffer que separa las componentes de color

	GLvoid initFBO();
	GLvoid initVAO();
	GLvoid pass1();
	GLvoid pass2();
	GLvoid pass3();
};


