Difference between revisions of "Shader:getExternVariable"
(Created page) |
(Updated for 11.0) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{newinoldin|[[0.9.2]]|092|[[11.0]]|110|type=function|text=It has been replaced by [[Shader:hasUniform]]}} |
− | Gets information about an 'extern' ('uniform') variable in the | + | Gets information about an 'extern' ('uniform') variable in the shader. |
− | Returns nil if the variable name doesn't exist in the shader, or if the video driver's shader compiler determined that the variable | + | Returns nil if the variable name doesn't exist in the shader, or if the video driver's shader compiler has determined that the variable doesn't affect the final output of the shader. |
== Function == | == Function == | ||
Line 13: | Line 13: | ||
=== Returns === | === Returns === | ||
{{param|ShaderVariableType|type (nil)|The base type of the variable.}} | {{param|ShaderVariableType|type (nil)|The base type of the variable.}} | ||
− | {{param|number|components (nil)|The number of components in the variable (e.g. 2 for a vec2.)}} | + | {{param|number|components (nil)|The number of components in the variable (e.g. 2 for a vec2 or mat2.)}} |
{{param|number|arrayelements (nil)|The number of elements in the array if the variable is an array, or 1 if not.}} | {{param|number|arrayelements (nil)|The number of elements in the array if the variable is an array, or 1 if not.}} | ||
== See Also == | == See Also == | ||
* [[parent::Shader]] | * [[parent::Shader]] | ||
+ | * [[Shader:send]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Gets information about an 'extern' ('uniform') variable in the Shader.}} | {{#set:Description=Gets information about an 'extern' ('uniform') variable in the Shader.}} | ||
== Other Languages == | == Other Languages == | ||
− | {{i18n|Shader: | + | {{i18n|Shader:getExternVariable}} |
Latest revision as of 20:10, 1 April 2018
Available since LÖVE 0.9.2 and removed in LÖVE 11.0 |
It has been replaced by Shader:hasUniform. |
Gets information about an 'extern' ('uniform') variable in the shader.
Returns nil if the variable name doesn't exist in the shader, or if the video driver's shader compiler has determined that the variable doesn't affect the final output of the shader.
Function
Synopsis
type, components, arrayelements = Shader:getExternVariable( name )
Arguments
string name
- The name of the extern variable.
Returns
ShaderVariableType type (nil)
- The base type of the variable.
number components (nil)
- The number of components in the variable (e.g. 2 for a vec2 or mat2.)
number arrayelements (nil)
- The number of elements in the array if the variable is an array, or 1 if not.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info