;; get colour tex data back from the GPU and into the texture data structure
(bind-func pull_colour
(lambda (fbo:FBO*)
(let ((tex (colour_tex fbo)))
(glBindFramebuffer GL_FRAMEBUFFER (id fbo))
(glReadPixels 0 0 (width tex) (height tex) GL_RGBA GL_UNSIGNED_BYTE (data tex))
(glBindFramebuffer GL_FRAMEBUFFER 0)
(id fbo))))