diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-17 17:09:40 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-17 17:09:40 +0100 |
commit | da1c1336596d361678b3f641a1d23ab89e078789 (patch) | |
tree | c2f8b0fb1693cccc381e43f759cb27a19cd46208 /gfx/gl/sceneRenderer.cpp | |
parent | Fix up the way spotlight shader works (diff) | |
download | ilt-da1c1336596d361678b3f641a1d23ab89e078789.tar.bz2 ilt-da1c1336596d361678b3f641a1d23ab89e078789.tar.xz ilt-da1c1336596d361678b3f641a1d23ab89e078789.zip |
Revamp how VertexArrayObject configures attributes and data
Diffstat (limited to 'gfx/gl/sceneRenderer.cpp')
-rw-r--r-- | gfx/gl/sceneRenderer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/sceneRenderer.cpp b/gfx/gl/sceneRenderer.cpp index 873dc5b..6542bea 100644 --- a/gfx/gl/sceneRenderer.cpp +++ b/gfx/gl/sceneRenderer.cpp @@ -18,7 +18,7 @@ SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) : lighting {lighting_vs, lighting_fs}, shadowMapper {{2048, 2048}} { shader.setViewPort({0, 0, size.x, size.y}); - VertexArrayObject<glm::i8vec4>::configure(displayVAO, displayVBO, displayVAOdata); + VertexArrayObject {displayVAO}.addAttribs<glm::i8vec4>(displayVBO, displayVAOdata); glBindFramebuffer(GL_FRAMEBUFFER, gBuffer); const auto configuregdata @@ -128,8 +128,8 @@ SceneRenderer::renderQuad() const SceneRenderer::DirectionalLightProgram::DirectionalLightProgram() : Program {lighting_vs, directionalLight_fs}, directionLoc {*this, "lightDirection"}, colourLoc {*this, "lightColour"}, lightViewProjectionLoc {*this, "lightViewProjection"}, - lightViewProjectionCountLoc {*this, "lightViewProjectionCount"}, lightViewShadowMapRegionLoc { - *this, "shadowMapRegion"} + lightViewProjectionCountLoc {*this, "lightViewProjectionCount"}, + lightViewShadowMapRegionLoc {*this, "shadowMapRegion"} { } |