#ifndef ___PAppTestSdlGl3_H__
#define ___PAppTestSdlGl3_H__


#define GL3_PROTOTYPES 1
#include <GL3/gl3.h>

#include <SDL2/SDL.h>
#include <SDL2/SDL_video.h>
#include <SDL2/SDL_keycode.h>
#include <SDL2/SDL_keyboard.h>
#include <SDL2/SDL_events.h>

#include <iostream>
#include <string>

#include "Matrice4.h"

#include "load_shaders.h"
#include "PAppSdlOpenGl3.h"
#include "load_texture_Gl3.h"


#define GL_FRAGMENT_SHADER_CUBE "../shaders/texture.frag"
#define GL_VERTEX_SHADER_CUBE "../shaders/texture.vert"
#define GL_TEXTURE_CUBE "../images/Flat_Wood163.JPG"



/** @brief Classe pour utiliser des shaders de manière un peu moins foutoire que la classe AppSdlOPenGl3
*/


class PAppTestSdlGl3 : public PAppSdlOpenGl3{
	public:
		PAppTestSdlGl3(const std::string & titreFenetre, int largeurFenetre, int hauteurFenetre);
		virtual ~PAppTestSdlGl3();
		void update(float dt);
		void draw3d();
		
		
	private:
		void drawTexturedCube3D();
		void initialisationPAppTestSdlGl3();
		void initialisationTouches();
		void initilisationCamera();
		void initialisationProgrammeShader();
		void initialisationTexture();
		void initialisationVertices();
		void initialisationColors();
		void initialisationTextureCoodonnees();
		void initialisationIndex();
		
		GLuint p_programTest;
		GLint p_idMatriceModelView;
		GLint p_idMatriceProjection;
		
		
		GLuint p_texture;
		
		float *p_vertices;
		unsigned int *p_indices;
		float *p_textCoordBleu;
		float *p_textCoordVert;
		float *p_textCoordRouge;
};


#endif //classe PAppTestSdlGl3

