3d transform

This commit is contained in:
k
2025-01-06 00:40:31 -05:00
parent 987961cfe4
commit 335c79e23e
4 changed files with 40 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
#include <fstream>
#include <glad/glad.h>
#include <glm/gtc/type_ptr.hpp>
#include <iostream>
#include <shader.hpp>
#include <sstream>
@@ -44,6 +45,11 @@ void Shader::setFloat(const std::string &name, float value) {
glUniform1f(glGetUniformLocation(ID, name.c_str()), value);
}
void Shader::setMat4(const std::string &name, glm::mat4 value) {
glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, glm::value_ptr(value));
}
/*priv*/
unsigned int Shader::shaderCMPL(GLenum type, const char *src) {
unsigned int shader;