gl:read-pixels

(gl:read-pixels opengl x y w h format type nsmutabledata)


Description:

Reads pixel data of format and type from x,y,w,h of opengl buffer into nsmutabledata


Arguments:

         format -- format of image data *gl:rgb* or *gl:rgba* for example

  nsmutabledata -- nsmutabledata to store data in: you are responsible for constructing a nsmutabledata object of the correct size!

              w -- width

         opengl -- opengl instance

              h -- height

              x -- x coordinate of lower left hand corner

           type -- type of image data *gl:unsigned-byte* or *gl:float* for example

              y -- y coordinate of lower left hand cornder


Returns: boolean


Related: gl:raster-pos gl:draw-pixels gl:copy-pixels 


Examples:



Back to index