summaryrefslogtreecommitdiff
path: root/meta/3rd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/3rd')
-rw-r--r--meta/3rd/lovr/library/callback.lua18
-rw-r--r--meta/3rd/lovr/library/lovr/graphics.lua13
-rw-r--r--meta/3rd/lovr/library/lovr/math.lua6
3 files changed, 20 insertions, 17 deletions
diff --git a/meta/3rd/lovr/library/callback.lua b/meta/3rd/lovr/library/callback.lua
index 1813f2a4..76a536db 100644
--- a/meta/3rd/lovr/library/callback.lua
+++ b/meta/3rd/lovr/library/callback.lua
@@ -51,15 +51,21 @@ lovr.conf = nil
lovr.draw = nil
---
----The "lovr.errhand" callback is run whenever an error occurs.
+---The `lovr.errhand` callback is run whenever an error occurs.
---
----It receives two parameters. The first is a string containing the error message. The second is either nil, or a string containing a traceback (as returned by "debug.traceback()"); if nil, this means "lovr.errhand" is being called in the stack where the error occurred, and it can call "debug.traceback()" itself.
+---It receives a parameter containing the error message.
---
----"lovr.errhand" should return a handler function to run in a loop to show the error screen. This handler function is of the same type as the one returned by "lovr.run" and has the same requirements (such as pumping events). If an error occurs while this handler is running, the program will terminate immediately-- "lovr.errhand" will not be given a second chance. Errors which occur inside "lovr.errhand" or in the handler it returns may not be cleanly reported, so be careful.
+---It should return a handler function that will run in a loop to render the error screen.
+---
+---This handler function is of the same type as the one returned by `lovr.run` and has the same requirements (such as pumping events).
+---
+---If an error occurs while this handler is running, the program will terminate immediately -- `lovr.errhand` will not be given a second chance.
+---
+---Errors which occur in the error handler or in the handler it returns may not be cleanly reported, so be careful.
---
---A default error handler is supplied that renders the error message as text to the headset and to the window.
---
----@type fun(message: string, traceback: string):function
+---@type fun(message: string):function
lovr.errhand = nil
---
@@ -123,7 +129,7 @@ lovr.log = nil
---
---For example, a stereo view could be drawn instead of a single eye or a 2D HUD could be rendered.
---
----@type fun()
+---@type fun(pass: lovr.Pass):boolean
lovr.mirror = nil
---
@@ -196,7 +202,7 @@ lovr.run = nil
---### NOTE:
---Some characters in UTF-8 unicode take multiple bytes to encode.
---
----Due to the way Lua works, the length of these strings will be bigger than 1 even though they are just a single character. `lovr.graphics.print` is compatible with UTF-8 but doing other string processing on these strings may require a library.
+---Due to the way Lua works, the length of these strings will be bigger than 1 even though they are just a single character. `Pass:text` is compatible with UTF-8 but doing other string processing on these strings may require a library.
---
---Lua 5.3+ has support for working with UTF-8 strings.
---
diff --git a/meta/3rd/lovr/library/lovr/graphics.lua b/meta/3rd/lovr/library/lovr/graphics.lua
index 7a2281bc..6c8f8330 100644
--- a/meta/3rd/lovr/library/lovr/graphics.lua
+++ b/meta/3rd/lovr/library/lovr/graphics.lua
@@ -2080,19 +2080,17 @@ function Pass:setMeshMode(mode) end
---
---Alternatively, a projection matrix can be used for other types of projections like orthographic, oblique, etc.
---
----There is also a shorthand string "orthographic" that can be used to configure an orthographic projection.
----
---Up to 6 views are supported.
---
----When rendering to the headset, both projections are changed to match the ones used by the headset.
----
----This is also available by calling `lovr.headset.getViewAngles`.
+---The Pass returned by `lovr.headset.getPass` will have its views automatically configured to match the headset.
---
---
---### NOTE:
---A far clipping plane of 0.0 can be used for an infinite far plane with reversed Z range.
---
----This is the default.
+---This is the default because it improves depth precision and reduces Z fighting.
+---
+---Using a non-infinite far plane requires the depth buffer to be cleared to 1.0 instead of 0.0 and the default depth test to be changed to `lequal` instead of `gequal`.
---
---@overload fun(self: lovr.Pass, view: number, matrix: lovr.Mat4)
---@param view number # The index of the view to update.
@@ -2733,14 +2731,13 @@ function Texture:isView() end
---- Rendering to a particular image or mipmap level of a texture.
---- Binding a particular image or mipmap level to a shader.
---
----@param parent lovr.Texture # The parent Texture to create the view of.
---@param type lovr.TextureType # The texture type of the view.
---@param layer? number # The index of the first layer in the view.
---@param layerCount? number # The number of layers in the view, or `nil` to use all remaining layers.
---@param mipmap? number # The index of the first mipmap in the view.
---@param mipmapCount? number # The number of mipmaps in the view, or `nil` to use all remaining mipmaps.
---@return lovr.Texture view # The new texture view.
-function Texture:newView(parent, type, layer, layerCount, mipmap, mipmapCount) end
+function Texture:newView(type, layer, layerCount, mipmap, mipmapCount) end
---
---Controls whether premultiplied alpha is enabled.
diff --git a/meta/3rd/lovr/library/lovr/math.lua b/meta/3rd/lovr/library/lovr/math.lua
index 4a527af0..907f4850 100644
--- a/meta/3rd/lovr/library/lovr/math.lua
+++ b/meta/3rd/lovr/library/lovr/math.lua
@@ -398,7 +398,7 @@ function Mat4:equals(n) end
---@param up number # The top half-angle of the projection, in radians.
---@param down number # The bottom half-angle of the projection, in radians.
---@param near number # The near plane of the projection.
----@param far number # The far plane of the projection.
+---@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default.
---@return lovr.Mat4 m # The original matrix.
function Mat4:fov(left, right, up, down, near, far) end
@@ -411,7 +411,7 @@ function Mat4:identity() end
---
---Inverts the matrix, causing it to represent the opposite of its old transform.
---
----@return lovr.Mat4 m # The original matrix.
+---@return lovr.Mat4 m # The original matrix, with its values inverted.
function Mat4:invert() end
---
@@ -467,7 +467,7 @@ function Mat4:orthographic(left, right, bottom, top, near, far) end
---@param fov number # The vertical field of view (in radians).
---@param aspect number # The horizontal aspect ratio of the projection (width / height).
---@param near number # The near plane.
----@param far number # The far plane.
+---@param far? number # The far plane. Zero is a special value that will set an infinite far plane with a reversed Z range, which improves depth buffer precision and is the default.
---@return lovr.Mat4 m # The original matrix.
function Mat4:perspective(fov, aspect, near, far) end