summaryrefslogtreecommitdiff
path: root/gfx/gl/program.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-07-20 10:54:54 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-07-20 10:54:54 +0100
commit9df2199349aedd363b565db069959f5ce8e9f35b (patch)
tree50010d250d51b1f9cd65344deaa1e3dd57d367c6 /gfx/gl/program.h
parentBuild cpp parts of ImGui (diff)
downloadilt-9df2199349aedd363b565db069959f5ce8e9f35b.tar.bz2
ilt-9df2199349aedd363b565db069959f5ce8e9f35b.tar.xz
ilt-9df2199349aedd363b565db069959f5ce8e9f35b.zip
Creating a program with no shaders is not valid
Diffstat (limited to 'gfx/gl/program.h')
-rw-r--r--gfx/gl/program.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gfx/gl/program.h b/gfx/gl/program.h
index 1a1c306..fa6dac9 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()), ...);