summaryrefslogtreecommitdiff
path: root/gfx/gl/shader.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-12 16:07:41 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-12 16:07:41 +0000
commit6698c81d0628e917beb75f71383e3b3108b0804c (patch)
tree987fc520c7386831300e70e0ffeb466dbd38932e /gfx/gl/shader.cpp
parentSplit 3D specifics of programs out of a base class (diff)
downloadilt-6698c81d0628e917beb75f71383e3b3108b0804c.tar.bz2
ilt-6698c81d0628e917beb75f71383e3b3108b0804c.tar.xz
ilt-6698c81d0628e917beb75f71383e3b3108b0804c.zip
Move program handle to its own files
Diffstat (limited to 'gfx/gl/shader.cpp')
-rw-r--r--gfx/gl/shader.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp
index 12ab510..47e08c5 100644
--- a/gfx/gl/shader.cpp
+++ b/gfx/gl/shader.cpp
@@ -16,18 +16,6 @@
#include <stdexcept>
#include <string>
-ProgramHandleBase::ProgramHandleBase(GLuint vs, GLuint fs) : viewProjection_uniform {}, model_uniform {}
-{
- glAttachShader(m_program, vs);
- glAttachShader(m_program, fs);
-
- glLinkProgram(m_program);
- GLsource::CheckShaderError(m_program, GL_LINK_STATUS, true, "Error linking shader program");
-
- glValidateProgram(m_program);
- GLsource::CheckShaderError(m_program, GL_VALIDATE_STATUS, true, "Invalid shader program");
-}
-
Shader::ProgramHandle::ProgramHandle(GLuint vs, GLuint fs) : ProgramHandleBase {vs, fs}
{
glBindAttribLocation(m_program, 0, "position");