Shader.new

From GiderosMobile
Revision as of 11:04, 23 August 2018 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2015.06.30<br/> === Description === Create new shader instance. The ‘Shader.new()’ constructor takes five arguments: - The path a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2015.06.30

Description

Create new shader instance.

The ‘Shader.new()’ constructor takes five arguments: - The path and name for the vertex shader without its extension. Gideros will search the assets for a file with the supplied name, automatically adding the extension relevant for the target platform: .glsl for OpenGL, .cso or .hlsl for DirectX. - The path and name for the fragment shader without its extension. Same remark as above applies too. - A set of numerical flags or 0 if none. See description below. - An array of uniforms/constants descriptors - An array of attributes descriptors

= Shader.new(vertex shaderfragment shaderflagsuniform descriptorattribute descriptor,)

'vertex shader: (string) The path and name for the vertex shader without its extension '
'fragment shader: (string) The path and name for the fragment shader without its extension '
'flags: (number) A set of numerical flags or 0 if none '
'uniform descriptor: (table) An array of uniforms/constants descriptors '
'attribute descriptor: (table) An array of attributes descriptors '