def setUniformVariables(programObj, texture, texw, texh, step):
 gl.glUseProgram(programObj)
 location_texture = gl.glGetUniformLocation(programObj, 'texture')
 if (location_texture != (-1)):
  gl.glUniform1i(location_texture, texture)
 location_texw = gl.glGetUniformLocation(programObj, 'texw')
 if (location_texw != (-1)):
  gl.glUniform1f(location_texw, texw)
 location_texh = gl.glGetUniformLocation(programObj, 'texh')
 if (location_texh != (-1)):
  gl.glUniform1f(location_texh, texh)
 location_step = gl.glGetUniformLocation(programObj, 'step')
 if (location_step != (-1)):
  gl.glUniform1f(location_step, step)
 gl.glUseProgram(0)
 checkGLError()

def setUniformVariables ( programObj , texture , texw , texh , step ) : gl . glUseProgram ( programObj ) location_texture = gl . glGetUniformLocation ( programObj , 'texture' ) if ( location_texture != ( - 1 ) ) : gl . glUniform1i ( location_texture , texture ) location_texw = gl . glGetUniformLocation ( programObj , 'texw' ) if ( location_texw != ( - 1 ) ) : gl . glUniform1f ( location_texw , texw ) location_texh = gl . glGetUniformLocation ( programObj , 'texh' ) if ( location_texh != ( - 1 ) ) : gl . glUniform1f ( location_texh , texh ) location_step = gl . glGetUniformLocation ( programObj , 'step' ) if ( location_step != ( - 1 ) ) : gl . glUniform1f ( location_step , step ) gl . glUseProgram ( 0 ) checkGLError ( )
setuniformvariables - set the uniform shader variables we need .