#pragma once

#include <GL/glew.h>
#include <GL/gl.h>

#include "texture.h"

#define SHADER_LOG_BUFFER_SIZE 1024

typedef struct Shader 
{
	GLuint handle;
	bool isInit;
} Shader;

bool shader_init(struct Shader* self, const char* vertex, const char* fragment);
void shader_use(struct Shader* self);
void shader_free(struct Shader* self);
void shader_uniform_f32_set(struct Shader* self, const char* name, f32 value);
void shader_uniform_s32_set(struct Shader* self, const char* name, s32 value);
void shader_uniform_mat4_set(struct Shader* self, const char* name, mat4 value);
void shader_uniform_vec3_set(struct Shader* self, const char* name, vec3 value);
void shader_uniform_vec4_set(struct Shader* self, const char* name, vec4 value);
void shader_uniform_texture_set(struct Shader* self, const char* name, Texture* texture, s32 index);
