Template:Require: Difference between revisions
Jump to navigation
Jump to search
m Refresh for direct self-reference. |
|||
Line 21: | Line 21: | ||
|} | |} | ||
[[Category:Inline Formatting Templates]] | [[Category:Inline Formatting Templates]] | ||
</noinclude><includeonly>{{#if:{{{1|}}} | GLSL {{{1}}} | }}{{#if:{{{1|}}} |{{#if:{{{2|}}} | <span> or </span> | }} | }}{{#if: {{{2|}}} |{{extref|{{{2|}}}|{{{3|ARB}}}}}| |}}<includeonly> | </noinclude><includeonly>{{#if:{{{1|}}} | GLSL {{{1}}} | }}{{#if:{{{1|}}} |{{#if:{{{2|}}} | <span> or </span> | }} | }}{{#if: {{{2|}}} |{{extref|{{{2|}}}|{{{3|ARB}}}}}| |}}<includeonly> |
Revision as of 16:58, 12 December 2014
This template is used for inline citations of required OpenGL version numbers and/or extensions. It creates a phrase of the form "OpenGL <Version> or <Extension>". It takes 3 positional parameters:
- The OpenGL version number. If it's blank, the phrase "OpenGL <Version> or" won't be part of the text.
- The extension name. If it's blank, the phrase "or <Extension>" won't be part of the text.
- The prefix of the extension, as for Template:Extref. ARB extensions don't need one.
Examples:
Just OpenGL version | {{require glsl|4.40}} | GLSL 4.40 |
Just extension | {{require glsl||shader_texture_image_samples}} | ARB_shader_texture_image_samples |
Both | {{require glsl|4.50|shader_texture_image_samples}} | GLSL 4.50 or ARB_shader_texture_image_samples |