Forgot to actually compile the shader :P

This commit is contained in:
NaifBanana
2026-07-19 22:20:05 -05:00
parent c6ab527eb2
commit 8d9d6e0e66
2 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -17,7 +17,13 @@ const ErrorCodeMap ProgramError::ErrorMessages = {
Shader::Shader(GLenum target_, const std::string& source_) : target(target_) {
declare();
const char* src_ptr= source_.data();
glShaderSource(_id, 1, &src_ptr, NULL);
glCompileShader(_id);
_success = status(GL_COMPILE_STATUS);
if (!_success) {
WARN(log(), 0x0FE);
}
}
Shader::Shader(Shader&& cpy) : target(cpy.target) {
@@ -49,7 +55,7 @@ Program::Program(SharedVector<Shader> shaders_) {
glLinkProgram(_id);
_success = status(GL_LINK_STATUS);
if (!_success) {
WARN(log(), 0x01);
WARN(log(), 0x0FE);
}
}