diff options
author | Adrian Kummerlaender | 2018-05-23 20:16:09 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2018-05-23 20:16:09 +0200 |
commit | 630038754c1a9a04e05fc59bdbced17c06f3dab5 (patch) | |
tree | 235eb0cde1c7a4f667b77402617a99360797f80f /src/main.cc | |
parent | 84bcd409a3743e933d039a9b3e073030fd2630df (diff) | |
download | computicle-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/main.cc')
-rw-r--r-- | src/main.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main.cc b/src/main.cc index 034d026..ceffe67 100644 --- a/src/main.cc +++ b/src/main.cc @@ -22,9 +22,9 @@ #include "shader/display_vertex.glsl" #include "shader/display_fragment.glsl" -const unsigned int particle_count = 5000; +const unsigned int particle_count = 1000; const unsigned int max_ups = 100; -const unsigned int texture_count = 10; +const unsigned int texture_count = 20; unsigned int window_width = 800; unsigned int window_height = 600; @@ -173,9 +173,8 @@ int main() { { auto guard = displayShader.use(); - for ( unsigned int i = 0; i < textures.size(); ++i ) { - displayShader.setUniform("screen_texture_" + std::to_string(i), i); - } + displayShader.setUniform("screen_textures", textures); + displayShader.setUniform("screen_textures_size", textures.size()); glClear(GL_COLOR_BUFFER_BIT); |