Browse Source

TextureData pixel accessor format note;

bjorn 6 years ago
parent
commit
e1ff71bfa3
3 changed files with 18 additions and 6 deletions
  1. 8 4
      api/init.lua
  2. 5 1
      api/lovr/data/TextureData/getPixel.lua
  3. 5 1
      api/lovr/data/TextureData/setPixel.lua

+ 8 - 4
api/init.lua

@@ -3306,7 +3306,8 @@ return {
               module = "lovr.data",
               related = {
                 "TextureData:setPixel",
-                "Texture:replacePixels"
+                "Texture:replacePixels",
+                "TextureFormat"
               },
               variants = {
                 {
@@ -3345,7 +3346,8 @@ return {
                     }
                   }
                 }
-              }
+              },
+              notes = "The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`."
             },
             {
               name = "getWidth",
@@ -3379,7 +3381,8 @@ return {
               module = "lovr.data",
               related = {
                 "TextureData:getPixel",
-                "Texture:replacePixels"
+                "Texture:replacePixels",
+                "TextureFormat"
               },
               variants = {
                 {
@@ -3418,7 +3421,8 @@ return {
                   },
                   returns = {}
                 }
-              }
+              },
+              notes = "The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`."
             }
           },
           constructors = {

+ 5 - 1
api/lovr/data/TextureData/getPixel.lua

@@ -35,8 +35,12 @@ return {
       description = 'The alpha component of the pixel, from 0.0 to 1.0.'
     }
   },
+  notes = [[
+    The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
+  ]],
   related = {
     'TextureData:setPixel',
-    'Texture:replacePixels'
+    'Texture:replacePixels',
+    'TextureFormat'
   }
 }

+ 5 - 1
api/lovr/data/TextureData/setPixel.lua

@@ -35,8 +35,12 @@ return {
     }
   },
   returns = {},
+  notes = [[
+    The following texture formats are supported: `rgba`, `rgb`, `r32f`, `rg32f`, and `rgba32f`.
+  ]],
   related = {
     'TextureData:getPixel',
-    'Texture:replacePixels'
+    'Texture:replacePixels',
+    'TextureFormat'
   }
 }