python - Qt (QOpenGLShaderProgram) - setting a uniform boolean value? -
how pass boolean value fragment shader, using qopenglshaderprogram? (python)
if program called _program, use this:
self._program.setuniformvalue('myvar', 1) in order pass value of true, , use in fragment shader using:
uniform bool myvar; would okay? or should using way? thanks!
it ok. gluniform documentation says:
either i, ui or f variants may used provide values uniform variables of type bool, bvec2, bvec3, bvec4, or arrays of these. uniform variable set false if input value 0 or 0.0f, , set true otherwise.
Comments
Post a Comment