Difference between revisions of "Global Command: shaderCompile"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "Compile a shader. {| class="ts" |- | style="width:15%" | Related functions | shaderSetOptions | Global Command: shaderUniform|shaderUni...") |
|||
Line 10: | Line 10: | ||
== Syntax == | == Syntax == | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
− | shaderCompile(code, fs) | + | shaderCompile(code [, fs]) |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 39: | Line 39: | ||
== Examples == | == Examples == | ||
− | < | + | |
+ | '''Example 1:''' | ||
+ | |||
+ | <syntaxhighlight lang="lua"> | ||
+ | int num = shaderCompile([[VSCBIN...]]) | ||
+ | </syntaxhighlight> | ||
{{toc}} | {{toc}} |
Latest revision as of 10:30, 19 May 2023
Compile a shader.
Related functions | shaderSetOptions | shaderUniform |
Syntax
shaderCompile(code [, fs])
Parameters
GLSL code can only be used if using OpenGL.
Parameter | Type | Description |
---|---|---|
code | string | Vertex shader code(?). |
fs | string | Fragment shader(?). |
Return values
none
Examples
Example 1:
int num = shaderCompile([[VSCBIN...]])