def leRewrite(self, node): if not hasNumArgs(node, 2): return if self is None: return True else: return glsl.BinaryOp(self(node.args[0]), '<=', self(node.args[1]))
def getCondition(self, condInfo, types): parts = [ glsl.BinaryOp(condInfo.typeIDRef(), '==', self.typeID(te.object.pyobj)) for te in types ] if len(parts) == 1: return parts[0] else: return glsl.ShortCircutOr(parts)
def getCondition(self, condInfo, types): parts = [ glsl.BinaryOp(condInfo.typeField, '==', self.typeID(te.object.pyobj)) for te in types ] if len(parts) == 1: return parts[0] else: assert False, parts