|
@@ -7012,6 +7012,53 @@ return {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ name = "getMipmapCount",
|
|
|
+ summary = "Get the number of mipmap levels in the Texture.",
|
|
|
+ description = "Returns the number of mipmap levels in the Texture. This is set when the Texture is created. By default, textures are created with a full set of mipmap levels, and mipmaps are generated if the images used to create the texture do not include mipmaps.",
|
|
|
+ key = "Texture:getMipmapCount",
|
|
|
+ module = "lovr.graphics",
|
|
|
+ notes = "Each mipmap level will be half the size of the previous (larger) mipmap level, down to a single pixel. This means the maximum number of mipmap levels is given by `log2(max(width, height))` for non-3D textures and `log2(max(width, height, depth))` for 3D textures.",
|
|
|
+ variants = {
|
|
|
+ {
|
|
|
+ arguments = {},
|
|
|
+ returns = {
|
|
|
+ {
|
|
|
+ name = "mipmaps",
|
|
|
+ type = "number",
|
|
|
+ description = "The number of mipmap levels in the Texture."
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ related = {
|
|
|
+ "lovr.graphics.newTexture",
|
|
|
+ "Pass:mipmap"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name = "getSampleCount",
|
|
|
+ summary = "Get the number of MSAA samples in the Texture.",
|
|
|
+ description = "Returns the number of multisample antialiasing (MSAA) samples in the Texture. Multisampling is used for antialiasing when rendering to the Texture. Using more samples will cause the Texture to use additional memory but reduce aliasing artifacts.",
|
|
|
+ key = "Texture:getSampleCount",
|
|
|
+ module = "lovr.graphics",
|
|
|
+ notes = "Currently, the sample count must be either 1 or 4.",
|
|
|
+ variants = {
|
|
|
+ {
|
|
|
+ arguments = {},
|
|
|
+ returns = {
|
|
|
+ {
|
|
|
+ name = "samples",
|
|
|
+ type = "number",
|
|
|
+ description = "The number of samples in the Texture."
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ related = {
|
|
|
+ "lovr.graphics.newTexture"
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
name = "getWidth",
|
|
|
summary = "Get the width of the Texture, in pixels.",
|