diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-23 17:53:32 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-23 18:38:46 +0000 |
commit | 5b415937c6c7097373bfd754b5699a9946c2cd16 (patch) | |
tree | 8f9978bdd0670b3f70c2775ad91bfaff46f873bf /ui | |
parent | Rename setView to setViewProjection to avoid ambiguity (diff) | |
download | ilt-5b415937c6c7097373bfd754b5699a9946c2cd16.tar.bz2 ilt-5b415937c6c7097373bfd754b5699a9946c2cd16.tar.xz ilt-5b415937c6c7097373bfd754b5699a9946c2cd16.zip |
Support setting a viewPort uniform for those shaders which need it
Diffstat (limited to 'ui')
-rw-r--r-- | ui/sceneRenderer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/sceneRenderer.cpp b/ui/sceneRenderer.cpp index ffcc8e3..dc8e440 100644 --- a/ui/sceneRenderer.cpp +++ b/ui/sceneRenderer.cpp @@ -16,6 +16,7 @@ SceneRenderer::SceneRenderer(glm::ivec2 s, GLuint o) : camera {{-1250.0F, -1250.0F, 35.0F}, quarter_pi, ratio(s), 0.1F, 10000.0F}, size {s}, output {o}, lighting {lightingShader_vs, lightingShader_fs} { + shader.setViewPort({0, 0, size.x, size.y}); glBindVertexArray(displayVAO); glBindBuffer(GL_ARRAY_BUFFER, displayVBO); glBufferData(GL_ARRAY_BUFFER, sizeof(displayVAOdata), nullptr, GL_STATIC_DRAW); |