Browse Source

Small updates;

bjorn 3 years ago
parent
commit
71ef96b419

File diff suppressed because it is too large
+ 850 - 919
api/init.lua


+ 1 - 1
api/lovr/graphics/Buffer/init.lua

@@ -33,7 +33,7 @@ return {
       at load time, or data that is updated infrequently.
   ]],
   constructors = {
-    'lovr.graphics.buffer',
+    'lovr.graphics.getBuffer',
     'lovr.graphics.newBuffer'
   }
 }

+ 1 - 1
api/lovr/graphics/Buffer/isTemporary.lua

@@ -10,6 +10,6 @@ return {
     }
   },
   related = {
-    'lovr.graphics.buffer'
+    'lovr.graphics.getBuffer'
   }
 }

+ 1 - 1
api/lovr/graphics/BufferLayout.lua

@@ -36,7 +36,7 @@ return {
   },
   related = {
     'lovr.graphics.newBuffer',
-    'lovr.graphics.buffer',
+    'lovr.graphics.getBuffer',
     'Buffer:getFormat',
     'Buffer:getStride',
     'FieldType'

+ 1 - 5
api/lovr/graphics/FieldType.lua

@@ -187,10 +187,6 @@ return {
           <td><code>color</code></td>
           <td><code>un8x4</code></td>
         </tr>
-        <tr>
-          <td><code>normal</code></td>
-          <td><code>un10x3</code></td>
-        </tr>
       </tbody>
     </table>
 
@@ -203,7 +199,7 @@ return {
   ]],
   related = {
     'lovr.graphics.newBuffer',
-    'lovr.graphics.buffer',
+    'lovr.graphics.getBuffer',
     'Buffer:getFormat'
   }
 }

+ 0 - 20
api/lovr/graphics/Pass/cone.lua

@@ -1,20 +0,0 @@
-return {
-  tag = 'drawing',
-  summary = 'Draw a cone.',
-  description = 'TODO',
-  arguments = {
-    {
-      name = 'transform',
-      type = 'transformxy2',
-      description = 'The transform to apply to the cone.'
-    },
-    {
-      name = 'detail',
-      type = 'number',
-      default = '4',
-      description = 'A detail value from 0 to 6.'
-    }
-  },
-  returns = {},
-  notes = 'TODO material'
-}

+ 0 - 47
api/lovr/graphics/Pass/model.lua

@@ -1,47 +0,0 @@
-return {
-  tag = 'drawing',
-  summary = 'Draw a Model.',
-  description = 'TODO',
-  arguments = {
-    model = {
-      type = 'Model',
-      description = 'The Model to draw.'
-    },
-    transform = {
-      type = 'transform',
-      description = 'The transform to apply to the model.'
-    },
-    node = {
-      type = 'number',
-      default = 'nil',
-      description = 'The 1-based index of the node to render.  If `nil`, the root node is used.'
-    },
-    name = {
-      type = 'string',
-      default = 'nil',
-      description = 'The name of the node to render.  If `nil`, the root node is used.'
-    },
-    children = {
-      type = 'boolean',
-      default = 'true',
-      description = 'Whether the child nodes should be rendered recursively.'
-    },
-    instances = {
-      type = 'number',
-      default = '1',
-      description = 'How many copies of the model to render.'
-    }
-  },
-  returns = {},
-  variants = {
-    {
-      arguments = { 'model', 'transform', 'node', 'children', 'instances' },
-      returns = {}
-    },
-    {
-      arguments = { 'model', 'transform', 'name', 'children', 'instances' },
-      returns = {}
-    }
-  },
-  notes = 'TODO skinning'
-}

+ 0 - 14
api/lovr/graphics/Pass/replay.lua

@@ -1,14 +0,0 @@
-return {
-  tag = 'drawing',
-  summary = 'Replay the draws saved in a Batch object.',
-  description = 'TODO',
-  arguments = {
-    {
-      name = 'batch',
-      type = 'Batch',
-      description = 'The Batch to replay.'
-    }
-  },
-  returns = {},
-  notes = 'TODO'
-}

+ 0 - 17
api/lovr/graphics/Pass/skybox.lua

@@ -1,17 +0,0 @@
-return {
-  tag = 'drawing',
-  summary = 'Draw a skybox.',
-  description = 'TODO',
-  arguments = {
-    {
-      name = 'texture',
-      type = 'Texture',
-      description = [[
-        The texture to use for the skybox.  It can be a cube texture or a 2D texture.  When 2D, the
-        texture should use spherical coordinates (also called equirectangular projection).
-      ]]
-    }
-  },
-  returns = {},
-  notes = 'TODO'
-}

+ 0 - 0
api/lovr/graphics/buffer.lua → api/lovr/graphics/getBuffer.lua


+ 1 - 1
api/lovr/graphics/newBuffer.lua

@@ -103,6 +103,6 @@ return {
     There is currently a max of 16 fields.
   ]],
   related = {
-    'lovr.graphics.buffer'
+    'lovr.graphics.getBuffer'
   }
 }

+ 28 - 2
api/lovr/graphics/submit.lua

@@ -2,8 +2,34 @@ return {
   tag = 'work-submission',
   summary = 'Submit recorded graphics work to the GPU.',
   description = 'TODO',
-  arguments = {},
-  returns = {},
+  arguments = {
+    {
+      ['...'] = {
+        type = 'Pass',
+        description = 'The pass objects to submit.  Falsy values will be skipped.'
+      },
+      t = {
+        type = 'table',
+        description = 'A table of passes to submit.  Falsy values will be skipped.'
+      }
+    }
+  },
+  returns = {
+    ['true'] = {
+      type = 'boolean',
+      description = 'Always returns true, for convenience when returning from `lovr.draw`.'
+    }
+  },
+  variants = {
+    {
+      arguments = { '...' },
+      returns = { 'true' }
+    },
+    {
+      arguments = { 't' },
+      returns = { 'true' }
+    }
+  },
   related = {
     'lovr.graphics.wait'
   }

Some files were not shown because too many files changed in this diff