aboutsummaryrefslogtreecommitdiff
path: root/src/texture_display_buffer.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-23 20:16:09 +0200
committerAdrian Kummerlaender2018-05-23 20:16:09 +0200
commit630038754c1a9a04e05fc59bdbced17c06f3dab5 (patch)
tree235eb0cde1c7a4f667b77402617a99360797f80f /src/texture_display_buffer.h
parent84bcd409a3743e933d039a9b3e073030fd2630df (diff)
downloadcomputicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar.gz
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar.bz2
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar.lz
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar.xz
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.tar.zst
computicle-630038754c1a9a04e05fc59bdbced17c06f3dab5.zip
Pass texture count to display fragment shader
Diffstat (limited to 'src/texture_display_buffer.h')
-rw-r--r--src/texture_display_buffer.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/texture_display_buffer.h b/src/texture_display_buffer.h
index 25fd319..b38f9c0 100644
--- a/src/texture_display_buffer.h
+++ b/src/texture_display_buffer.h
@@ -47,12 +47,7 @@ public:
void draw(const std::vector<GLuint>& textures) const {
glBindVertexArray(_array);
-
- for ( unsigned int i = 0; i < textures.size(); ++i ) {
- glActiveTexture(GL_TEXTURE0+i);
- glBindTexture(GL_TEXTURE_2D, textures[i]);
- }
-
+ glBindTextures(textures[0], textures.size(), textures.data());
glDrawArrays(GL_TRIANGLES, 0, 6);
}