Topic/drawable 2 (#1029)

This commit is contained in:
Tim Sylvester
2023-04-17 15:34:47 -07:00
committed by Bart Louwers
parent 14b53e54ec
commit e2bc75289c
16 changed files with 190 additions and 109 deletions

View File

@@ -57,9 +57,17 @@ ShaderProgramGL::ShaderProgramGL(UniqueProgram&& glProgram_)
glProgram(std::move(glProgram_)) {
}
ShaderProgramGL::ShaderProgramGL(UniqueProgram&& glProgram_,
VertexAttributeArrayGL&& attributes)
: ShaderProgramBase(),
glProgram(std::move(glProgram_)),
vertexAttributes(std::move(attributes)) {
}
ShaderProgramGL::ShaderProgramGL(ShaderProgramGL&& other)
: ShaderProgramBase(std::forward<ShaderProgramBase&&>(other)),
glProgram(std::move(other.glProgram)) {
glProgram(std::move(other.glProgram)),
vertexAttributes(std::move(other.vertexAttributes)) {
}
std::shared_ptr<ShaderProgramGL> ShaderProgramGL::create(
@@ -111,7 +119,7 @@ std::shared_ptr<ShaderProgramGL> ShaderProgramGL::create(
}
}
return std::make_shared<ShaderProgramGL>(std::move(program));
return std::make_shared<ShaderProgramGL>(std::move(program), std::move(attrs));
}
} // namespace gl