Browse Source

Fix note about RGBA formats;

bjorn 7 years ago
parent
commit
2381c1ee5a
2 changed files with 4 additions and 3 deletions
  1. 1 1
      api/init.lua
  2. 3 2
      api/lovr/data/TextureData/init.lua

+ 1 - 1
api/init.lua

@@ -4142,7 +4142,7 @@ return {
         {
         {
           name = "TextureData",
           name = "TextureData",
           summary = "An object that stores pixel data for Textures.",
           summary = "An object that stores pixel data for Textures.",
-          description = "A TextureData stores raw pixel info for `Texture`s.  It has a width and a height.  Currently, all TextureData is in the RGBA format.\n\nUsually you can just use Textures, but TextureData can be useful if you want to manipulate individual pixels or load Textures in a background thread.",
+          description = "A TextureData stores raw 2D pixel info for `Texture`s.  It has a width, height, and format.  The TextureData can be initialized with the contents of an image file or it can be created with uninitialized contents.  The supported image formats are `png`, `jpg`, `hdr`, and `dds`.\n\nUsually you can just use Textures, but TextureData can be useful if you want to manipulate individual pixels or load Textures in a background thread.",
           key = "TextureData",
           key = "TextureData",
           module = "lovr.data",
           module = "lovr.data",
           methods = {
           methods = {

+ 3 - 2
api/lovr/data/TextureData/init.lua

@@ -1,8 +1,9 @@
 return {
 return {
   summary = 'An object that stores pixel data for Textures.',
   summary = 'An object that stores pixel data for Textures.',
   description = [[
   description = [[
-    A TextureData stores raw pixel info for `Texture`s.  It has a width and a height.  Currently,
-    all TextureData is in the RGBA format.
+    A TextureData stores raw 2D pixel info for `Texture`s.  It has a width, height, and format.  The
+    TextureData can be initialized with the contents of an image file or it can be created with
+    uninitialized contents.  The supported image formats are `png`, `jpg`, `hdr`, and `dds`.
 
 
     Usually you can just use Textures, but TextureData can be useful if you want to manipulate
     Usually you can just use Textures, but TextureData can be useful if you want to manipulate
     individual pixels or load Textures in a background thread.
     individual pixels or load Textures in a background thread.