From 630038754c1a9a04e05fc59bdbced17c06f3dab5 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 23 May 2018 20:16:09 +0200 Subject: Pass texture count to display fragment shader --- src/texture_display_buffer.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/texture_display_buffer.h') 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& 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); } -- cgit v1.2.3