Shader.new
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 shader,fragment shader,flags,uniform descriptor,attribute 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 '