Browse Source

Document the BufferUsage enumeration

Cassie Jones 5 years ago
parent
commit
e850247241
1 changed files with 24 additions and 0 deletions
  1. 24 0
      api/lovr/graphics/BufferUsage.lua

+ 24 - 0
api/lovr/graphics/BufferUsage.lua

@@ -0,0 +1,24 @@
+return {
+  summary = 'How the buffer data will be updated.',
+  description = [[
+    This acts as a hint to the graphics driver about what kinds of data access should be optimized for.
+  ]],
+  values = {
+    {
+      name = 'static',
+      description = 'A buffer that you intend to create once and never modify.'
+    },
+    {
+      name = 'dynamic',
+      description = 'A buffer which is modified occasionally.'
+    },
+    {
+      name = 'stream',
+      description = 'A buffer which is entirely replaced on the order of every frame.'
+    }
+  },
+  related = {
+    'ShaderBlock',
+    'lovr.graphics.newShaderBlock',
+  }
+}