GPUBuffer¶
GPUBuffer provides an interface to interact with the GPU buffer.
The buffer is sized to the screen size upon creation and cannot be resized, indexing out of bounds will be discarded.
Warning
The GPUBuffer index starts at 0!
Example¶
Generate a red and blue pattern, where every even pixel is red and every odd pixel is blue.
This can either generate a checkerboard pattern or a vertical lines pattern depending on the screen size.
Lua | |
---|---|
Last update:
March 11, 2023
Created: March 11, 2023
Created: March 11, 2023