We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if you have:
uniform float dog; float cat;
and:
shader.setUniform1f("dog", ofGetElapsedTimef()); shader.setUniform1f("cat", ofGetElapsedTimef());
there is no currently no error printed to the console, and "cat" is mysteriously unchanging while "dog" is fine.
The text was updated successfully, but these errors were encountered:
+1 on this. A pattern like this?
void ofShader::setUniform1i(const char* name, int v1) { if(bLoaded) { GLint location = getUniformLocation(name); if(location != -1) { glUniform1i(location, v1); } else { ofLogError("ofShader") << name << " is not a valid uniform."; } } }
Alternatively, there might be a way to cache uniforms / attributes and check against the cache. PR #1507 might come in handy.
Sorry, something went wrong.
No branches or pull requests
if you have:
and:
there is no currently no error printed to the console, and "cat" is mysteriously unchanging while "dog" is fine.
The text was updated successfully, but these errors were encountered: