18 lines
535 B
C++
18 lines
535 B
C++
#pragma once
|
|
|
|
#include <glad/glad.h>
|
|
#include <variant>
|
|
#include <glm/glm.hpp>
|
|
#include "util.hpp"
|
|
|
|
// Reads shader source files, compiles, and links
|
|
bool load_shader(uint* out_id, const char* vertex_filepath, const char* fragment_filepath);
|
|
|
|
// Sets shader as active on the gpu
|
|
void use_shader(uint id);
|
|
|
|
// Set uniform value
|
|
typedef std::variant<int, float, bool, glm::vec4, glm::vec3, glm::vec2, glm::ivec4, glm::ivec3, glm::ivec2, glm::mat4>
|
|
uniform_variant;
|
|
void set_uniform(uint id, const char* name, uniform_variant value);
|