diff options
author | Adrian Kummerlaender | 2018-12-18 17:04:18 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2018-12-18 17:04:18 +0100 |
commit | fed710754296111a51b1b99b40a3c5e5dc873895 (patch) | |
tree | 1354a3bca2de3f52dc28bccdd633cfbc71ee5ae8 /src/shader/wrap | |
parent | 556f6cea377f6e8620d05081946f8b469b8a1339 (diff) | |
download | compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.gz compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.bz2 compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.lz compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.xz compustream-fed710754296111a51b1b99b40a3c5e5dc873895.tar.zst compustream-fed710754296111a51b1b99b40a3c5e5dc873895.zip |
Purify collide shader
i.e. move fluid vertex placement to appropriate vertex shader.
Do not amplify or shift fluid moments in any way prior to
passing it to the display pipeline.
Diffstat (limited to 'src/shader/wrap')
-rw-r--r-- | src/shader/wrap/graphic_shader.cc | 6 | ||||
-rw-r--r-- | src/shader/wrap/graphic_shader.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/shader/wrap/graphic_shader.cc b/src/shader/wrap/graphic_shader.cc index c891730..20fc222 100644 --- a/src/shader/wrap/graphic_shader.cc +++ b/src/shader/wrap/graphic_shader.cc @@ -42,6 +42,12 @@ GLuint GraphicShader::setUniform(const std::string& name, int value) const { return id; } +GLuint GraphicShader::setUniform(const std::string& name, GLuint value) const { + GLuint id = util::getUniform(_id, name); + glUniform1ui(id, value); + return id; +} + GLuint GraphicShader::setUniform(const std::string& name, const std::vector<GLuint>& v) const { GLuint id = util::getUniform(_id, name); glUniform1iv(id, v.size(), reinterpret_cast<const GLint*>(v.data())); diff --git a/src/shader/wrap/graphic_shader.h b/src/shader/wrap/graphic_shader.h index dcae6db..83fca34 100644 --- a/src/shader/wrap/graphic_shader.h +++ b/src/shader/wrap/graphic_shader.h @@ -25,6 +25,7 @@ public: ~GraphicShader(); GLuint setUniform(const std::string& name, int value) const; + GLuint setUniform(const std::string& name, GLuint value) const; GLuint setUniform(const std::string& name, const std::vector<GLuint>& v) const; GLuint setUniform(const std::string& name, glm::mat4& M) const; }; |