#pragma once

#include <GL/glew.h>
#include <GL/gl.h>
#include "math.h"
#include "file.h"

enum Shader_Type : u32 {
  VERTEX = GL_VERTEX_SHADER,
  FRAGMENT = GL_FRAGMENT_SHADER
};

struct Shader {
  u32 id;
  u32 uniform_projection;
  u32 uniform_model;
  u32 uniform_view;
  u32 uniform_eye_position;

  u32 uniform_ambient_color;
  u32 uniform_ambient_intensity;

  u32 uniform_diffuse_direction;
  u32 uniform_diffuse_intensity;

  u32 uniform_shininess;
  u32 uniform_specular_intensity;

  Shader();
  ~Shader();
};

bool create_shader(Shader *shader, const char *vertex_shader_path, const char *fragment_shader_path);
bool add_shader(Shader *shader, const char *shader_code, Shader_Type type);
void clear_shader(Shader *shader);
