bjorn 3 lat temu
rodzic
commit
ddcefbe568
2 zmienionych plików z 123 dodań i 0 usunięć
  1. 64 0
      api/init.lua
  2. 59 0
      api/lovr/graphics/Pass/clear.lua

+ 64 - 0
api/init.lua

@@ -9042,6 +9042,70 @@ return {
               },
               notes = "TODO"
             },
+            {
+              name = "clear",
+              tag = "transfer",
+              summary = "Clear a Buffer or Texture.",
+              description = "TODO",
+              key = "Pass:clear",
+              module = "lovr.graphics",
+              notes = "TODO",
+              variants = {
+                {
+                  arguments = {
+                    {
+                      name = "buffer",
+                      type = "Buffer",
+                      description = "The Buffer to clear."
+                    },
+                    {
+                      name = "offset",
+                      type = "number",
+                      description = "TODO"
+                    },
+                    {
+                      name = "extent",
+                      type = "number",
+                      description = "TODO"
+                    }
+                  },
+                  returns = {}
+                },
+                {
+                  arguments = {
+                    {
+                      name = "texture",
+                      type = "Texture",
+                      description = "The Texture to clear."
+                    },
+                    {
+                      name = "color",
+                      type = "Color",
+                      description = "The color to clear to."
+                    },
+                    {
+                      name = "layer",
+                      type = "number",
+                      description = "The index of the first layer to clear.",
+                      default = "1"
+                    },
+                    {
+                      name = "layers",
+                      type = "number",
+                      description = "The number of layers to clear.",
+                      default = "nil"
+                    },
+                    {
+                      name = "level",
+                      type = "number",
+                      description = "The index of the first mipmap level to clear.",
+                      default = "1"
+                    }
+                  },
+                  returns = {}
+                }
+              }
+            },
             {
               name = "compute",
               tag = "compute",

+ 59 - 0
api/lovr/graphics/Pass/clear.lua

@@ -0,0 +1,59 @@
+return {
+  tag = 'transfer',
+  summary = 'Clear a Buffer or Texture.',
+  description = 'TODO',
+  arguments = {
+     buffer = {
+       type = 'Buffer',
+       description = 'The Buffer to clear.'
+     },
+     offset = {
+       type = 'number',
+       description = 'TODO'
+     },
+     extent = {
+       type = 'number',
+       description = 'TODO'
+     },
+     texture = {
+       type = 'Texture',
+       description = 'The Texture to clear.'
+     },
+     color = {
+       type = 'Color',
+       description = 'The color to clear to.'
+     },
+     layer = {
+       type = 'number',
+       default = '1',
+       description = 'The index of the first layer to clear.'
+     },
+     layers = {
+       type = 'number',
+       default = 'nil',
+       description = 'The number of layers to clear.'
+     },
+     level = {
+       type = 'number',
+       default = '1',
+       description = 'The index of the first mipmap level to clear.'
+     },
+     levelCount = {
+       type = 'number',
+       default = 'nil',
+       description = 'The number of mipmap level to clear.'
+     }
+  },
+  returns = {},
+  variants = {
+    {
+      arguments = { 'buffer', 'offset', 'extent' },
+      returns = {}
+    },
+    {
+      arguments = { 'texture', 'color', 'layer', 'layers', 'level', 'levels' },
+      returns = {}
+    }
+  },
+  notes = 'TODO'
+}