init.lua 708 B

1234567891011121314151617
  1. return {
  2. summary = 'An object that stores pixel data for Textures.',
  3. description = [[
  4. A TextureData stores raw 2D pixel info for `Texture`s. It has a width, height, and format. The
  5. TextureData can be initialized with the contents of an image file or it can be created with
  6. uninitialized contents. The supported image formats are `png`, `jpg`, `hdr`, `dds`, `ktx`, and
  7. `astc`.
  8. Usually you can just use Textures, but TextureData can be useful if you want to manipulate
  9. individual pixels, load Textures in a background thread, or use the FFI to efficiently access
  10. the raw image data.
  11. ]],
  12. constructors = {
  13. 'lovr.data.newTextureData',
  14. 'Canvas:newTextureData'
  15. }
  16. }