From 9db7798b7c5f4c0f4cf2e8987258755bb1a7c4e8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 2 Jan 2023 18:51:45 +0000 Subject: Use VertexArrayObject for SceneShader::PointLight --- gfx/gl/sceneShader.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gfx') diff --git a/gfx/gl/sceneShader.cpp b/gfx/gl/sceneShader.cpp index a02d955..d0b26c8 100644 --- a/gfx/gl/sceneShader.cpp +++ b/gfx/gl/sceneShader.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -80,13 +81,7 @@ SceneShader::WaterProgram::use(float waveCycle) const SceneShader::PointLightShader::PointLightShader() : SceneProgram {pointLight_vs, pointLight_gs, pointLight_fs}, colourLoc {*this, "colour"}, kqLoc {*this, "kq"} { - glBindVertexArray(va); - glBindBuffer(GL_ARRAY_BUFFER, b); - glBufferData(GL_ARRAY_BUFFER, sizeof(glm::vec3), nullptr, GL_DYNAMIC_DRAW); - glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(glm::vec3), nullptr); - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindVertexArray(0); + VertexArrayObject::configure(va, b); } void -- cgit v1.2.3