|
@@ -12945,13 +12945,43 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ {
|
|
|
|
+ name = "hasBlock",
|
|
|
|
+ summary = "Check if a Shader has a block.",
|
|
|
|
+ description = "Returns whether a Shader has a block.\n\nA block is added to the Shader code at creation time using `ShaderBlock:getShaderCode`. The block name (not the namespace) is used to link up the ShaderBlock object to the Shader. This function can be used to check if a Shader was created with a block using the given name.",
|
|
|
|
+ key = "Shader:hasBlock",
|
|
|
|
+ module = "lovr.graphics",
|
|
|
|
+ related = {
|
|
|
|
+ "Shader:sendBlock"
|
|
|
|
+ },
|
|
|
|
+ variants = {
|
|
|
|
+ {
|
|
|
|
+ arguments = {
|
|
|
|
+ {
|
|
|
|
+ name = "block",
|
|
|
|
+ type = "string",
|
|
|
|
+ description = "The name of the block."
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ returns = {
|
|
|
|
+ {
|
|
|
|
+ name = "present",
|
|
|
|
+ type = "boolean",
|
|
|
|
+ description = "Whether the shader has the specified block."
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{
|
|
{
|
|
name = "hasUniform",
|
|
name = "hasUniform",
|
|
summary = "Check if a Shader has a uniform variable.",
|
|
summary = "Check if a Shader has a uniform variable.",
|
|
description = "Returns whether a Shader has a particular uniform variable.",
|
|
description = "Returns whether a Shader has a particular uniform variable.",
|
|
key = "Shader:hasUniform",
|
|
key = "Shader:hasUniform",
|
|
module = "lovr.graphics",
|
|
module = "lovr.graphics",
|
|
- notes = "If a uniform variable is defined but unused in the shader, the shader compiler will optimize it out and the uniform will not report itself as present.",
|
|
|
|
|
|
+ related = {
|
|
|
|
+ "Shader:send"
|
|
|
|
+ },
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
arguments = {
|
|
arguments = {
|
|
@@ -12969,7 +12999,8 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ notes = "If a uniform variable is defined but unused in the shader, the shader compiler will optimize it out and the uniform will not report itself as present."
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name = "send",
|
|
name = "send",
|
|
@@ -13013,6 +13044,7 @@ return {
|
|
key = "Shader:sendBlock",
|
|
key = "Shader:sendBlock",
|
|
module = "lovr.graphics",
|
|
module = "lovr.graphics",
|
|
related = {
|
|
related = {
|
|
|
|
+ "Shader:hasBlock",
|
|
"Shader:send",
|
|
"Shader:send",
|
|
"ShaderBlock:send",
|
|
"ShaderBlock:send",
|
|
"ShaderBlock:getShaderCode",
|
|
"ShaderBlock:getShaderCode",
|