#pragma once



// Graphics class primary responsibility is to set up OpenGLES for render and to hold info on window

//we will include some important standard C++ features we plan to use a lot
#include <stdio.h>
#include <assert.h>
#include <string>
#include <math.h>
#include <vector>


#ifdef WINDOWS_BUILD
// for Windows most of our content is found in glad and glfw
#include <glad.h>
#include <GLFW/glfw3.h>

#else
//raspberry/linux however needs a few more things included, again this is a good reason to have 1 graphics.h file to include in our project when we need to do graphics
#include <GLES2/gl2.h>
#include <X11/extensions/Xrandr.h> //this is used for our resolution systems, which are handled a little different on early Rpi's,we still need some of the info, but Rpi res data will be invalid
#include <EGL/egl.h>
#include <EGL/eglext.h>
#endif

// Include GLM
#include "glm/glm.hpp"
#include "glm/gtc/matrix_transform.hpp"

#include "Input.h"



// these defines are used often (and Pi is a joke :D) 
#define PI	3.14159265358979323846264338327950288419716939937510582097494459072381640628620899862803482534211706798f
#define DEG2RAD(x) (x*PI)/180
#define RAD2DEG(x) x*(180/PI)

// Lets define the size of our window here

constexpr unsigned int WINDOW_WIDTH = 1600;
constexpr unsigned int WINDOW_HEIGHT = 800;
constexpr float ASPECT_RATIO = WINDOW_WIDTH / WINDOW_HEIGHT;
//most standard OGL demos use int versions of TRUE and FALSE (careful not to mix up with bool true and false)
#define TRUE 1
#define FALSE 0


class Graphics
{
public:
	Graphics();
	~Graphics();

	// this is really for the shader (edit later)
	// we provide a simple Texture loader/store syste	
	GLuint CreateSimpleTexture2D(int width, int height, char* TheData); // oh you lucky people

GLuint LoadShader(GLenum type, const char* shaderSrc);

GLuint MakePO(const char* VertexSrc, const char* FragmentSrc);

GLuint FragmentShader = -1; // MakePO (and other things) will use the temp holding variables, this allows you to keep them if you need them after
GLuint VertexShader = -1;
GLuint ProgramObject = -1;

GLuint SimplePO = -1;
};



