pull_colour   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm

Implementation

;; 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))))


Back to Index

Similar Entries