Browse Source

Add skeletons;

bjorn 3 years ago
parent
commit
f1b41358ee
54 changed files with 1589 additions and 2 deletions
  1. 134 0
      api/init.lua
  2. 18 0
      api/lovr/graphics/Font/getAscent.lua
  3. 18 0
      api/lovr/graphics/Font/getDescent.lua
  4. 19 0
      api/lovr/graphics/Font/getHeight.lua
  5. 29 0
      api/lovr/graphics/Font/getKerning.lua
  6. 12 0
      api/lovr/graphics/Font/getLineSpacing.lua
  7. 28 0
      api/lovr/graphics/Font/getLines.lua
  8. 12 0
      api/lovr/graphics/Font/getPixelDensity.lua
  9. 16 0
      api/lovr/graphics/Font/getRasterizer.lua
  10. 25 0
      api/lovr/graphics/Font/getWidth.lua
  11. 8 0
      api/lovr/graphics/Font/init.lua
  12. 12 0
      api/lovr/graphics/Font/setLineSpacing.lua
  13. 12 0
      api/lovr/graphics/Font/setPixelDensity.lua
  14. 7 0
      api/lovr/graphics/Material/init.lua
  15. 42 0
      api/lovr/graphics/Model/animate.lua
  16. 17 0
      api/lovr/graphics/Model/getAnimationCount.lua
  17. 35 0
      api/lovr/graphics/Model/getAnimationDuration.lua
  18. 24 0
      api/lovr/graphics/Model/getAnimationName.lua
  19. 40 0
      api/lovr/graphics/Model/getBoundingBox.lua
  20. 15 0
      api/lovr/graphics/Model/getIndexBuffer.lua
  21. 35 0
      api/lovr/graphics/Model/getMaterial.lua
  22. 16 0
      api/lovr/graphics/Model/getMaterialCount.lua
  23. 23 0
      api/lovr/graphics/Model/getMaterialName.lua
  24. 15 0
      api/lovr/graphics/Model/getModelData.lua
  25. 17 0
      api/lovr/graphics/Model/getNodeCount.lua
  26. 23 0
      api/lovr/graphics/Model/getNodeName.lua
  27. 68 0
      api/lovr/graphics/Model/getNodePose.lua
  28. 15 0
      api/lovr/graphics/Model/getTexture.lua
  29. 15 0
      api/lovr/graphics/Model/getVertexBuffer.lua
  30. 8 0
      api/lovr/graphics/Model/init.lua
  31. 11 0
      api/lovr/graphics/Model/resetPose.lua
  32. 18 0
      api/lovr/graphics/PassType.lua
  33. 18 0
      api/lovr/graphics/Sampler/getCompareMode.lua
  34. 28 0
      api/lovr/graphics/Sampler/getFilter.lua
  35. 23 0
      api/lovr/graphics/Sampler/getMipmapRange.lua
  36. 28 0
      api/lovr/graphics/Sampler/getWrap.lua
  37. 7 0
      api/lovr/graphics/Sampler/init.lua
  38. 23 0
      api/lovr/graphics/Shader/clone.lua
  39. 15 0
      api/lovr/graphics/Shader/getType.lua
  40. 31 0
      api/lovr/graphics/Shader/hasAttribute.lua
  41. 21 0
      api/lovr/graphics/Shader/hasStage.lua
  42. 8 0
      api/lovr/graphics/Shader/init.lua
  43. 17 0
      api/lovr/graphics/ShaderStage.lua
  44. 14 0
      api/lovr/graphics/ShaderType.lua
  45. 29 0
      api/lovr/graphics/compileShader.lua
  46. 18 0
      api/lovr/graphics/getAnisotropy.lua
  47. 68 0
      api/lovr/graphics/getPass.lua
  48. 2 2
      api/lovr/graphics/newBuffer.lua
  49. 57 0
      api/lovr/graphics/newFont.lua
  50. 137 0
      api/lovr/graphics/newMaterial.lua
  51. 53 0
      api/lovr/graphics/newModel.lua
  52. 48 0
      api/lovr/graphics/newSampler.lua
  53. 55 0
      api/lovr/graphics/newShader.lua
  54. 102 0
      api/lovr/graphics/newTexture.lua

File diff suppressed because it is too large
+ 134 - 0
api/init.lua


+ 18 - 0
api/lovr/graphics/Font/getAscent.lua

@@ -0,0 +1,18 @@
+return {
+  summary = 'Get the ascent of the Font.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'ascent',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getDescent',
+    'Font:getHeight',
+    'Font:getKerning',
+    'Font:getWidth'
+  }
+}

+ 18 - 0
api/lovr/graphics/Font/getDescent.lua

@@ -0,0 +1,18 @@
+return {
+  summary = 'Get the descent of the Font.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'descent',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getAscent',
+    'Font:getHeight',
+    'Font:getKerning',
+    'Font:getWidth'
+  }
+}

+ 19 - 0
api/lovr/graphics/Font/getHeight.lua

@@ -0,0 +1,19 @@
+return {
+  summary = 'Get the height of the Font.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'height',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getAscent',
+    'Font:getDescent',
+    'Font:getKerning',
+    'Font:getWidth',
+    'Font:getLines'
+  }
+}

+ 29 - 0
api/lovr/graphics/Font/getKerning.lua

@@ -0,0 +1,29 @@
+return {
+  summary = 'Get the kerning of the Font.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'first',
+      type = 'Codepoint',
+      description = 'TODO'
+    },
+    {
+      name = 'second',
+      type = 'Codepoint',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'kerning',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getAscent',
+    'Font:getDescent',
+    'Font:getHeight',
+    'Font:getWidth'
+  }
+}

+ 12 - 0
api/lovr/graphics/Font/getLineSpacing.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Set the pixel density of the Font.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'spacing',
+      type = 'number',
+      description = 'TODO'
+    }
+  }
+}

+ 28 - 0
api/lovr/graphics/Font/getLines.lua

@@ -0,0 +1,28 @@
+return {
+  summary = 'Turn a long string into a sequence of wrapped lines.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'text',
+      type = 'Text',
+      description = 'TODO'
+    },
+    {
+      name = 'wrap',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'lines',
+      type = 'table',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getWidth',
+    'Font:getHeight',
+    'Pass:text'
+  }
+}

+ 12 - 0
api/lovr/graphics/Font/getPixelDensity.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Get the pixel density of the Font.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'density',
+      type = 'number',
+      description = 'TODO'
+    }
+  }
+}

+ 16 - 0
api/lovr/graphics/Font/getRasterizer.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the Font\'s Rasterizer.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'rasterizer',
+      type = 'Rasterizer',
+      description = 'The Rasterizer.'
+    }
+  },
+  related = {
+    'lovr.graphics.newFont',
+    'lovr.data.newRasterizer'
+  }
+}

+ 25 - 0
api/lovr/graphics/Font/getWidth.lua

@@ -0,0 +1,25 @@
+return {
+  summary = 'Get the width of rendered text.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'text',
+      type = 'Text',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'width',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Font:getAscent',
+    'Font:getDescent',
+    'Font:getHeight',
+    'Font:getKerning',
+    'Font:getLines'
+  }
+}

+ 8 - 0
api/lovr/graphics/Font/init.lua

@@ -0,0 +1,8 @@
+return {
+  summary = 'TODO',
+  description = 'TODO',
+  constructors = {
+    'lovr.graphics.newFont',
+    'lovr.graphics.getDefaultFont'
+  }
+}

+ 12 - 0
api/lovr/graphics/Font/setLineSpacing.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Set the line spacing of the Font.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'spacing',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {}
+}

+ 12 - 0
api/lovr/graphics/Font/setPixelDensity.lua

@@ -0,0 +1,12 @@
+return {
+  summary = 'Set the pixel density of the Font.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'density',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {}
+}

+ 7 - 0
api/lovr/graphics/Material/init.lua

@@ -0,0 +1,7 @@
+return {
+  summary = 'TODO',
+  description = 'TODO',
+  constructors = {
+    'lovr.graphics.newMaterial'
+  }
+}

+ 42 - 0
api/lovr/graphics/Model/animate.lua

@@ -0,0 +1,42 @@
+return {
+  summary = 'Apply an animation to the pose of the Model.',
+  description = 'TODO',
+  arguments = {
+    name = {
+      type = 'string',
+      description = 'The name of an animation.'
+    },
+    index = {
+      type = 'number',
+      description = 'The index of an animation.'
+    },
+    time = {
+      type = 'number',
+      description = 'The timestamp to evaluate the keyframes at, in seconds.'
+    },
+    alpha = {
+      type = 'number',
+      default = '1',
+      description = 'How much of the animation to mix in, from 0 to 1.'
+    }
+  },
+  returns = {},
+  variants = {
+    {
+      arguments = { 'name', 'time', 'alpha' },
+      returns = {}
+    },
+    {
+      arguments = { 'index', 'time', 'alpha' },
+      returns = {}
+    }
+  },
+  related = {
+    'Model:resetPose',
+    'Model:getNodePose',
+    'Model:setNodePose',
+    'Model:getAnimationCount',
+    'Model:getAnimationName',
+    'Model:getAnimationDuration'
+  }
+}

+ 17 - 0
api/lovr/graphics/Model/getAnimationCount.lua

@@ -0,0 +1,17 @@
+return {
+  summary = 'Get the number of animations in the Model.',
+  description = 'Returns the number of animations in the Model.',
+  arguments = {},
+  returns = {
+    {
+      name = 'count',
+      type = 'number',
+      description = 'The number of animations in the Model.'
+    }
+  },
+  related = {
+    'Model:getAnimationName',
+    'Model:getAnimationDuration',
+    'Model:animate'
+  }
+}

+ 35 - 0
api/lovr/graphics/Model/getAnimationDuration.lua

@@ -0,0 +1,35 @@
+return {
+  summary = 'Get the duration of an animation in the Model.',
+  description = 'TODO',
+  arguments = {
+    name = {
+      type = 'string',
+      description = 'The name of the animation.'
+    },
+    index = {
+      type = 'number',
+      description = 'The animation index.'
+    }
+  },
+  returns = {
+    duration = {
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'name' },
+      returns = { 'duration' }
+    },
+    {
+      arguments = { 'index' },
+      returns = { 'duration' }
+    }
+  },
+  related = {
+    'Model:getAnimationCount',
+    'Model:getAnimationName',
+    'Model:animate'
+  }
+}

+ 24 - 0
api/lovr/graphics/Model/getAnimationName.lua

@@ -0,0 +1,24 @@
+return {
+  summary = 'Get the name of an animation in the Model.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'index',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'name',
+      type = 'string',
+      description = 'The name of the animation.'
+    }
+  },
+  related = {
+    'Model:getAnimationCount',
+    'Model:getAnimationDuration',
+    'Model:getMaterialName',
+    'Model:getNodeName'
+  }
+}

+ 40 - 0
api/lovr/graphics/Model/getBoundingBox.lua

@@ -0,0 +1,40 @@
+return {
+  summary = 'Get the axis aligned bounding box of the Model.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'minx',
+      type = 'number',
+      description = 'The minimum x coordinate of the box.'
+    },
+    {
+      name = 'maxx',
+      type = 'number',
+      description = 'The maximum x coordinate of the box.'
+    },
+    {
+      name = 'miny',
+      type = 'number',
+      description = 'The minimum y coordinate of the box.'
+    },
+    {
+      name = 'maxy',
+      type = 'number',
+      description = 'The maximum y coordinate of the box.'
+    },
+    {
+      name = 'minz',
+      type = 'number',
+      description = 'The minimum z coordinate of the box.'
+    },
+    {
+      name = 'maxz',
+      type = 'number',
+      description = 'The maximum z coordinate of the box.'
+    }
+  },
+  related = {
+    'Collider:getAABB'
+  }
+}

+ 15 - 0
api/lovr/graphics/Model/getIndexBuffer.lua

@@ -0,0 +1,15 @@
+return {
+  summary = 'Get a Buffer containing the triangle indices in the Model.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'buffer',
+      type = 'Buffer',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Model:getVertexBuffer'
+  }
+}

+ 35 - 0
api/lovr/graphics/Model/getMaterial.lua

@@ -0,0 +1,35 @@
+return {
+  summary = 'Get a Material from the Model.',
+  description = 'TODO',
+  arguments = {
+    name = {
+      type = 'string',
+      description = 'The name of the Material to return.'
+    },
+    index = {
+      type = 'number',
+      description = 'The index of the Material to return.'
+    }
+  },
+  returns = {
+    material = {
+      type = 'Material',
+      description = 'The material.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'name' },
+      returns = { 'material' }
+    },
+    {
+      arguments = { 'index' },
+      returns = { 'material' }
+    }
+  },
+  related = {
+    'Model:getMaterialCount',
+    'Model:getMaterialName',
+    'Material'
+  }
+}

+ 16 - 0
api/lovr/graphics/Model/getMaterialCount.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the number of materials in the Model.',
+  description = 'Returns the number of materials in the Model.',
+  arguments = {},
+  returns = {
+    {
+      name = 'count',
+      type = 'number',
+      description = 'The number of materials in the Model.'
+    }
+  },
+  related = {
+    'Model:getMaterialName',
+    'Model:getMaterial'
+  }
+}

+ 23 - 0
api/lovr/graphics/Model/getMaterialName.lua

@@ -0,0 +1,23 @@
+return {
+  summary = 'Get the name of a material in the Model.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'index',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'name',
+      type = 'string',
+      description = 'The name of the material.'
+    }
+  },
+  related = {
+    'Model:getMaterialCount',
+    'Model:getAnimationName',
+    'Model:getNodeName'
+  }
+}

+ 15 - 0
api/lovr/graphics/Model/getModelData.lua

@@ -0,0 +1,15 @@
+return {
+  summary = 'Get the ModelData backing the Model.',
+  description = 'Returns the ModelData this Model was created from.',
+  arguments = {},
+  returns = {
+    {
+      name = 'data',
+      type = 'ModelData',
+      description = 'The ModelData.'
+    }
+  },
+  related = {
+    'lovr.data.newModelData'
+  }
+}

+ 17 - 0
api/lovr/graphics/Model/getNodeCount.lua

@@ -0,0 +1,17 @@
+return {
+  summary = 'Get the number of nodes in the Model.',
+  description = 'Returns the number of nodes in the Model.',
+  arguments = {},
+  returns = {
+    {
+      name = 'count',
+      type = 'number',
+      description = 'The number of nodes in the Model.'
+    }
+  },
+  related = {
+    'Model:getNodeName',
+    'Model:getNodePose',
+    'Model:pose'
+  }
+}

+ 23 - 0
api/lovr/graphics/Model/getNodeName.lua

@@ -0,0 +1,23 @@
+return {
+  summary = 'Get the name of a node in the Model.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'index',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'name',
+      type = 'string',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Model:getNodeCount',
+    'Model:getAnimationName',
+    'Model:getMaterialName'
+  }
+}

+ 68 - 0
api/lovr/graphics/Model/getNodePose.lua

@@ -0,0 +1,68 @@
+return {
+  summary = 'Get the pose of a single node.',
+  description = 'Returns the pose of a single node in the Model in a given `CoordinateSpace`.',
+  arguments = {
+    name = {
+      type = 'string',
+      description = 'The name of the node.'
+    },
+    index = {
+      type = 'number',
+      description = 'The node index.'
+    },
+    space = {
+      type = 'CoordinateSpace',
+      default = [['global']],
+      description = [[
+        Whether the pose should be returned relative to the node's parent or relative to the root
+        node of the Model.
+      ]]
+    }
+  },
+  returns = {
+    x = {
+      type = 'number',
+      description = 'The x position of the node.'
+    },
+    y = {
+      type = 'number',
+      description = 'The y position of the node.'
+    },
+    z = {
+      type = 'number',
+      description = 'The z position of the node.'
+    },
+    angle = {
+      type = 'number',
+      description = 'The number of radians the node is rotated around its rotational axis.'
+    },
+    ax = {
+      type = 'number',
+      description = 'The x component of the axis of rotation.'
+    },
+    ay = {
+      type = 'number',
+      description = 'The y component of the axis of rotation.'
+    },
+    az = {
+      type = 'number',
+      description = 'The z component of the axis of rotation.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'name', 'space' },
+      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
+    },
+    {
+      arguments = { 'index', 'space' },
+      returns = { 'x', 'y', 'z', 'angle', 'ax', 'ay', 'az' }
+    }
+  },
+  related = {
+    'Model:pose',
+    'Model:animate',
+    'Model:getNodeName',
+    'Model:getNodeCount'
+  }
+}

+ 15 - 0
api/lovr/graphics/Model/getTexture.lua

@@ -0,0 +1,15 @@
+return {
+  summary = 'Get one of the textures in the Model.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'texture',
+      type = 'Texture',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Model:getMaterial'
+  }
+}

+ 15 - 0
api/lovr/graphics/Model/getVertexBuffer.lua

@@ -0,0 +1,15 @@
+return {
+  summary = 'Get a Buffer containing the vertices in the Model.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'buffer',
+      type = 'Buffer',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Model:getIndexBuffer'
+  }
+}

+ 8 - 0
api/lovr/graphics/Model/init.lua

@@ -0,0 +1,8 @@
+return {
+  summary = 'TODO',
+  description = 'TODO',
+  constructors = {
+    'lovr.graphics.newModel',
+    'lovr.headset.newModel'
+  }
+}

+ 11 - 0
api/lovr/graphics/Model/resetPose.lua

@@ -0,0 +1,11 @@
+return {
+  summary = 'Reset the Model to the default pose.',
+  description = 'TODO',
+  arguments = {},
+  returns = {},
+  related = {
+    'Model:animate',
+    'Model:getNodePose',
+    'Model:setNodePose'
+  }
+}

+ 18 - 0
api/lovr/graphics/PassType.lua

@@ -0,0 +1,18 @@
+return {
+  summary = 'Different types of Passes.',
+  description = 'TODO',
+  values = {
+    {
+      name = 'render',
+      description = 'TODO'
+    },
+    {
+      name = 'compute',
+      description = 'TODO'
+    },
+    {
+      name = 'transfer',
+      description = 'TODO'
+    }
+  }
+}

+ 18 - 0
api/lovr/graphics/Sampler/getCompareMode.lua

@@ -0,0 +1,18 @@
+return {
+  summary = 'Get the compare mode of the Sampler.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'compare',
+      type = 'CompareMode',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Sampler:getFilter',
+    'Sampler:getWrap',
+    'Sampler:getAnisotropy',
+    'Sampler:getMipmapRange'
+  }
+}

+ 28 - 0
api/lovr/graphics/Sampler/getFilter.lua

@@ -0,0 +1,28 @@
+return {
+  summary = 'Get the filter mode of the Sampler.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'min',
+      type = 'FilterMode',
+      description = 'TODO'
+    },
+    {
+      name = 'mag',
+      type = 'FilterMode',
+      description = 'TODO'
+    },
+    {
+      name = 'mip',
+      type = 'FilterMode',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Sampler:getWrap',
+    'Sampler:getCompareMode',
+    'Sampler:getAnisotropy',
+    'Sampler:getMipmapRange'
+  }
+}

+ 23 - 0
api/lovr/graphics/Sampler/getMipmapRange.lua

@@ -0,0 +1,23 @@
+return {
+  summary = 'Get the mipmap range of the Sampler.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'min',
+      type = 'number',
+      description = 'TODO'
+    },
+    {
+      name = 'max',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Sampler:getFilter',
+    'Sampler:getWrap',
+    'Sampler:getCompareMode',
+    'Sampler:getAnisotropy'
+  }
+}

+ 28 - 0
api/lovr/graphics/Sampler/getWrap.lua

@@ -0,0 +1,28 @@
+return {
+  summary = 'Get the wrap mode of the Sampler.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'x',
+      type = 'WrapMode',
+      description = 'TODO'
+    },
+    {
+      name = 'y',
+      type = 'WrapMode',
+      description = 'TODO'
+    },
+    {
+      name = 'z',
+      type = 'WrapMode',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Sampler:getFilter',
+    'Sampler:getCompareMode',
+    'Sampler:getAnisotropy',
+    'Sampler:getMipmapRange'
+  }
+}

+ 7 - 0
api/lovr/graphics/Sampler/init.lua

@@ -0,0 +1,7 @@
+return {
+  summary = 'TODO',
+  description = 'TODO',
+  constructors = {
+    'lovr.graphics.newSampler'
+  }
+}

+ 23 - 0
api/lovr/graphics/Shader/clone.lua

@@ -0,0 +1,23 @@
+return {
+  summary = 'Clone a Shader.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'source',
+      type = 'Shader',
+      description = 'The Shader to clone.'
+    },
+    {
+      name = 'flags',
+      type = 'table',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    {
+      name = 'shader',
+      type = 'Shader',
+      description = 'The new Shader.'
+    }
+  }
+}

+ 15 - 0
api/lovr/graphics/Shader/getType.lua

@@ -0,0 +1,15 @@
+return {
+  summary = 'Get the type of the Shader.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'type',
+      type = 'ShaderType',
+      description = 'The type of the Shader.'
+    }
+  },
+  related = {
+    'Shader:hasStage'
+  }
+}

+ 31 - 0
api/lovr/graphics/Shader/hasAttribute.lua

@@ -0,0 +1,31 @@
+return {
+  summary = 'Check if the Shader has a given vertex attribute.',
+  description = 'TODO',
+  arguments = {
+    name = {
+      type = 'string',
+      description = 'The name of an attribute.'
+    },
+    location = {
+      type = 'number',
+      description = 'The location of an attribute.'
+    }
+  },
+  returns = {
+    present = {
+      name = 'exists',
+      type = 'boolean',
+      description = 'Whether the Shader has the attribute.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'name' },
+      returns = { 'exists' }
+    },
+    {
+      arguments = { 'location' },
+      returns = { 'exists' }
+    }
+  }
+}

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

@@ -0,0 +1,21 @@
+return {
+  summary = 'Check if the Shader has a given stage.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'stage',
+      type = 'ShaderStage',
+      description = 'The stage.'
+    }
+  },
+  returns = {
+    {
+      name = 'exists',
+      type = 'boolean',
+      description = 'Whether the Shader has the stage.'
+    }
+  },
+  related = {
+    'Shader:getType'
+  }
+}

+ 8 - 0
api/lovr/graphics/Shader/init.lua

@@ -0,0 +1,8 @@
+return {
+  summary = 'TODO',
+  description = 'TODO',
+  constructors = {
+    'lovr.graphics.newShader',
+    'Shader:clone'
+  }
+}

+ 17 - 0
api/lovr/graphics/ShaderStage.lua

@@ -0,0 +1,17 @@
+return {
+  description = 'TODO',
+  values = {
+    {
+      name = 'vertex',
+      description = 'TODO'
+    },
+    {
+      name = 'fragment',
+      description = 'TODO'
+    },
+    {
+      name = 'compute',
+      description = 'TODO'
+    }
+  }
+}

+ 14 - 0
api/lovr/graphics/ShaderType.lua

@@ -0,0 +1,14 @@
+return {
+  summary = 'Different types of Shaders.',
+  description = 'TODO',
+  values = {
+    {
+      name = 'graphics',
+      description = 'TODO'
+    },
+    {
+      name = 'compute',
+      description = 'TODO'
+    }
+  }
+}

+ 29 - 0
api/lovr/graphics/compileShader.lua

@@ -0,0 +1,29 @@
+return {
+  summary = 'Compile a Shader.',
+  description = 'TODO',
+  arguments = {
+    stage = {
+      type = 'ShaderStage',
+      description = 'TODO'
+    },
+    string = {
+      type = 'ShaderSource',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    bytecode = {
+      type = 'Blob',
+      description = 'TODO'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'stage', 'source' },
+      returns = { 'bytecode' }
+    }
+  },
+  related = {
+    'lovr.graphics.newShader'
+  }
+}

+ 18 - 0
api/lovr/graphics/getAnisotropy.lua

@@ -0,0 +1,18 @@
+return {
+  summary = 'Get the anisotropy of the Sampler.',
+  description = 'TODO',
+  arguments = {},
+  returns = {
+    {
+      name = 'anisotropy',
+      type = 'number',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Sampler:getFilter',
+    'Sampler:getWrap',
+    'Sampler:getCompareMode',
+    'Sampler:getMipmapRange'
+  }
+}

+ 68 - 0
api/lovr/graphics/getPass.lua

@@ -0,0 +1,68 @@
+return {
+  summary = 'Get a new Pass.',
+  description = 'TODO',
+  arguments = {
+    type = {
+      type = 'PassType',
+      description = 'TODO'
+    },
+    texture = {
+      type = 'Texture',
+      description = 'TODO'
+    },
+    canvas = {
+      type = 'table',
+      description = 'TODO',
+      table = {
+        {
+          name = 'depth',
+          type = '*',
+          description = 'TODO'
+        },
+        {
+          name = 'clear',
+          type = '*',
+          description = 'TODO'
+        },
+        {
+          name = 'samples',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'mipmap',
+          type = 'boolean',
+          default = [['false']],
+          description = 'TODO'
+        }
+      }
+    },
+    label = {
+      type = 'string',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    model = {
+      type = 'Pass',
+      description = 'The new Pass.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'type', 'label' },
+      returns = { 'pass' }
+    },
+    {
+      arguments = { 'type', 'texture', 'label' },
+      returns = { 'pass' }
+    },
+    {
+      arguments = { 'type', 'canvas', 'label' },
+      returns = { 'pass' }
+    }
+  },
+  related = {
+    'lovr.graphics.submit'
+  }
+}

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

@@ -1,6 +1,6 @@
 return {
-  summary = 'Create a permanent Buffer.',
-  description = 'Creates a permanent Buffer.',
+  summary = 'Create a new Buffer.',
+  description = 'Creates a Buffer.',
   arguments = {
     length = {
       type = 'number',

+ 57 - 0
api/lovr/graphics/newFont.lua

@@ -0,0 +1,57 @@
+return {
+  summary = 'Create a new Font.',
+  description = 'TODO',
+  arguments = {
+    filename = {
+      type = 'string',
+      description = 'TODO'
+    },
+    blob = {
+      type = 'Blob',
+      description = 'TODO'
+    },
+    rasterizer = {
+      type = 'Rasterizer',
+      description = 'TODO'
+    },
+    size = {
+      type = 'number',
+      default = '32',
+      description = 'TODO'
+    },
+    spread = {
+      type = 'number',
+      default = '4',
+      description = 'TODO'
+    }
+  },
+  returns = {
+    font = {
+      type = 'Font',
+      description = 'The new Font.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'filename', 'size', 'spread' },
+      returns = { 'font' }
+    },
+    {
+      arguments = { 'blob', 'size', 'spread' },
+      returns = { 'font' }
+    },
+    {
+      arguments = { 'size', 'spread' },
+      returns = { 'font' }
+    },
+    {
+      arguments = { 'rasterizer', 'spread' },
+      returns = { 'font' }
+    }
+  },
+  related = {
+    'lovr.graphics.getDefaultFont',
+    'lovr.data.newRasterizer',
+    'Pass:text'
+  }
+}

+ 137 - 0
api/lovr/graphics/newMaterial.lua

@@ -0,0 +1,137 @@
+return {
+  summary = 'Create a new Material.',
+  description = 'TODO',
+  arguments = {
+    texture = {
+      type = 'Texture',
+      description = 'TODO'
+    },
+    options = {
+      type = 'table',
+      description = 'Material properties.',
+      table = {
+        {
+          name = 'color',
+          type = 'Color',
+          description = 'TODO'
+        },
+        {
+          name = 'glow',
+          type = 'Color',
+          description = 'TODO'
+        },
+        {
+          name = 'uvShift',
+          type = 'Point2D',
+          description = 'TODO'
+        },
+        {
+          name = 'uvScale',
+          type = 'Scale2D',
+          description = 'TODO'
+        },
+        {
+          name = 'metalness',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'roughness',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'clearcoat',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'clearcoatRoughness',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'occlusionStrength',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'glowStrength',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'normalScale',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'alphaCutoff',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'pointSize',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'texture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'glowTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'glowTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'occlusionTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'metalnessTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'roughnessTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'clearcoatTexture',
+          type = 'Texture',
+          description = 'TODO'
+        },
+        {
+          name = 'normalTexture',
+          type = 'Texture',
+          description = 'TODO'
+        }
+      }
+    }
+  },
+  returns = {
+    material = {
+      type = 'Material',
+      description = 'TODO'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'texture' },
+      returns = { 'material' }
+    },
+    {
+      arguments = { 'options' },
+      returns = { 'material' }
+    }
+  }
+}

+ 53 - 0
api/lovr/graphics/newModel.lua

@@ -0,0 +1,53 @@
+return {
+  summary = 'Create a new Model.',
+  description = 'TODO',
+  arguments = {
+    filename = {
+      type = 'string',
+      description = 'TODO'
+    },
+    blob = {
+      type = 'Blob',
+      description = 'TODO'
+    },
+    modelData = {
+      type = 'ModelData',
+      description = 'TODO'
+    },
+    options = {
+      type = 'table',
+      description = 'Model options.',
+      table = {
+        {
+          name = 'mipmaps',
+          type = 'boolean',
+          description = 'TODO'
+        }
+      }
+    }
+  },
+  returns = {
+    model = {
+      type = 'Model',
+      description = 'The new Model.'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'filename', 'options' },
+      returns = { 'model' }
+    },
+    {
+      arguments = { 'blob', 'options' },
+      returns = { 'model' }
+    },
+    {
+      arguments = { 'modelData' },
+      returns = { 'model' }
+    }
+  },
+  related = {
+    'lovr.data.newModelData',
+    'Pass:draw'
+  }
+}

+ 48 - 0
api/lovr/graphics/newSampler.lua

@@ -0,0 +1,48 @@
+return {
+  summary = 'Create a new Sampler.',
+  description = 'TODO',
+  arguments = {
+    {
+      name = 'options',
+      type = 'table',
+      description = 'TODO',
+      table = {
+        {
+          name = 'filter',
+          type = 'table',
+          description = 'TODO'
+        },
+        {
+          name = 'wrap',
+          type = 'table',
+          description = 'TODO'
+        },
+        {
+          name = 'compare',
+          type = 'CompareMode',
+          description = 'TODO'
+        },
+        {
+          name = 'anisotropy',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'mipmaprange',
+          type = 'table',
+          description = 'TODO'
+        }
+      }
+    }
+  },
+  returns = {
+    {
+      name = 'sampler',
+      type = 'Sampler',
+      description = 'TODO'
+    }
+  },
+  related = {
+    'Pass:setSampler'
+  }
+}

+ 55 - 0
api/lovr/graphics/newShader.lua

@@ -0,0 +1,55 @@
+return {
+  summary = 'Create a Shader.',
+  description = 'TODO',
+  arguments = {
+    vertex = {
+      type = 'ShaderSource',
+      description = 'TODO'
+    },
+    fragment = {
+      type = 'ShaderSource',
+      description = 'TODO'
+    },
+    compute = {
+      type = 'ShaderSource',
+      description = 'TODO'
+    },
+    options = {
+      type = 'table',
+      description = 'Shader options.',
+      table = {
+        {
+          name = 'flags',
+          type = 'table',
+          description = 'TODO'
+        },
+        {
+          name = 'label',
+          type = 'string',
+          description = 'TODO'
+        }
+      }
+    }
+  },
+  returns = {
+    shader = {
+      type = 'Shader',
+      description = 'TODO'
+    }
+  },
+  variants = {
+    {
+      description = 'Create a graphics shader.',
+      arguments = { 'vertex', 'fragment', 'options' },
+      returns = { 'shader' }
+    },
+    {
+      description = 'Create a compute shader.',
+      arguments = { 'compute', 'options' },
+      returns = { 'shader' }
+    }
+  },
+  related = {
+    'lovr.graphics.compileShader'
+  }
+}

+ 102 - 0
api/lovr/graphics/newTexture.lua

@@ -0,0 +1,102 @@
+return {
+  summary = 'Create a new Texture.',
+  description = 'TODO',
+  arguments = {
+    filename = {
+      type = 'string',
+      description = 'TODO'
+    },
+    image = {
+      type = 'string',
+      description = 'TODO'
+    },
+    width = {
+      type = 'number',
+      description = 'TODO'
+    },
+    height = {
+      type = 'number',
+      description = 'TODO'
+    },
+    depth = {
+      type = 'number',
+      description = 'TODO'
+    },
+    images = {
+      type = 'table',
+      description = 'TODO'
+    },
+    options = {
+      type = 'table',
+      description = 'Texture options.',
+      table = {
+        {
+          name = 'type',
+          type = 'TextureType',
+          description = 'TODO'
+        },
+        {
+          name = 'format',
+          type = 'TextureFormat',
+          description = 'TODO'
+        },
+        {
+          name = 'linear',
+          type = 'boolean',
+          description = 'TODO'
+        },
+        {
+          name = 'samples',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'mipmaps',
+          type = 'number',
+          description = 'TODO'
+        },
+        {
+          name = 'usage',
+          type = 'table',
+          description = 'TODO'
+        },
+        {
+          name = 'label',
+          type = 'string',
+          description = 'TODO'
+        }
+      }
+    }
+  },
+  returns = {
+    texture = {
+      type = 'Texture',
+      description = 'TODO'
+    }
+  },
+  variants = {
+    {
+      arguments = { 'filename', 'options' },
+      returns = { 'texture' }
+    },
+    {
+      arguments = { 'width', 'height', 'options' },
+      returns = { 'texture' }
+    },
+    {
+      arguments = { 'width', 'height', 'depth', 'options' },
+      returns = { 'texture' }
+    },
+    {
+      arguments = { 'image', 'options' },
+      returns = { 'texture' }
+    },
+    {
+      arguments = { 'images', 'options' },
+      returns = { 'texture' }
+    }
+  },
+  related = {
+    'Texture:newView'
+  }
+}

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