Reading from and Writing to Images

Once an image has been declared in the shader and a level and layer of a texture have been bound to the corresponding image unit, the shader may access the data in the texture directly for both read and write. Reading and writing are done only through built-in functions that load or store their arguments to or from an image. To load texels from an image, call imageLoad(). There are many overloaded variants of imageLoad(). They are as follows:

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.