Browse Source

Add doc for shader:hasVariable

xiejiangzhi 1 year ago
parent
commit
9e80732da5
1 changed files with 21 additions and 0 deletions
  1. 21 0
      api/lovr/graphics/Shader/hasVariable.lua

+ 21 - 0
api/lovr/graphics/Shader/hasVariable.lua

@@ -0,0 +1,21 @@
+return {
+  summary = 'Check if the Shader has a variable.',
+  description = 'Returns whether the Shader has a variable.',
+  arguments = {
+    name = {
+      type = 'string',
+    }
+  },
+  returns = {
+    exists = {
+      type = 'boolean',
+      description = 'Whether the Shader has the variable.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'name' },
+      returns = { 'exists' }
+    }
+  },
+}