+ def getFramebufferAttachment(self, state, attachments):
+ framebufferObj = state['framebuffer']
+ for attachment in attachments:
+ try:
+ attachmentObj = framebufferObj[attachment]
+ except KeyError:
+ pass
+ else:
+ return attachmentObj
+ raise Exception("no attachment found")
+