summaryrefslogtreecommitdiff
path: root/gfx/gl/program.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/program.h')
-rw-r--r--gfx/gl/program.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gfx/gl/program.h b/gfx/gl/program.h
index 1a1c306..c89a128 100644
--- a/gfx/gl/program.h
+++ b/gfx/gl/program.h
@@ -1,6 +1,6 @@
#pragma once
-#include "shader.h"
+#include "shader.h" // IWYU pragma: export
#include <glRef.h>
#include <glad/gl.h>
#include <glm/mat4x4.hpp>
@@ -12,6 +12,8 @@ using ProgramRef = glRef<GLuint, &glCreateProgram, &glDeleteProgram>;
class Program {
public:
+ Program() = delete;
+
template<typename... S> explicit Program(const S &... srcs)
{
(glAttachShader(m_program, srcs.compile()), ...);
@@ -47,6 +49,7 @@ public:
}
protected:
+ void checkProgramError(GLuint program, GLuint flag, std::string_view errorMessage) const;
void use() const;
void linkAndValidate() const;
ProgramRef m_program;