push water changes (does not work yet)

This commit is contained in:
sshumakov3@gmail.com
2021-09-18 10:31:02 +03:00
parent 5b503b4ebd
commit 1cec11f3ce
29 changed files with 655 additions and 152 deletions

View File

@@ -256,6 +256,14 @@ namespace opengl
gl.uniform1iv (loc, value.size(), value.data());
}
void use_program::uniform (std::string const& name, int const* data, std::size_t size)
{
GLuint loc = uniform_location (name);
if (loc < 0)
return;
gl.uniform1iv (loc, size, data);
}
void use_program::uniform (GLint pos, std::vector<int> const& value)
{
gl.uniform1iv (pos, value.size(), value.data());