def unuse(self): l = ShaderProgram.shader_stack p = l.pop() assert p is self if l: glUseProgramObjectARB(l[-1].pid) else: glUseProgramObjectARB(0)
def unuse(self): l = ShaderProgram.shader_stack p = l.pop() assert p is self if l: glUseProgramObjectARB(l[-1].pid) else: glUseProgramObjectARB(0)
def restore(cls): cls.shader_stack[:] = [] glUseProgramObjectARB(0)
def use(self): ShaderProgram.shader_stack.append(self) glUseProgramObjectARB(self.pid)
def uninstall(self): gl.glUseProgramObjectARB(0)
def install(self): p = self.prog() if p != 0: gl.glUseProgramObjectARB(p)
def uninstall(self): gl.glUseProgramObjectARB(0)
def install(self): p = self.prog() if p != 0: gl.glUseProgramObjectARB(p)
def restore(cls): cls.shader_stack[:] = [] glUseProgramObjectARB(0)
def use(self): ShaderProgram.shader_stack.append(self) glUseProgramObjectARB(self.pid)
def __exit__(self, _type, value, traceback): if self.old_program < 0 or not self.view.glext.ARB_shader_objects: return gl.glUseProgramObjectARB(self.old_program)