GLSLVertexShader
GLSLVertexShader object for compile your shader into bytecode using GLSL language
Can be created using method new:
Lib.Media.Display3D.Shaders.GLSL.GLSLVertexShader.new(vertexShaderSource, opt) |
creates GLSLVertexShader object |
vertexShaderSource - vertex GLSL source string opt - reserved, use nil |
created GLSL shader has property:
nativeShader |
Shader object |
Examples:
local vertexShaderSource = [[
attribute vec3 vertexPosition;
uniform mat4 mvpMatrix;
void main(void) {
gl_Position = mvpMatrix * vec4(vertexPosition, 1.0);
}
]]
local vertexShader = Display3D.Shaders.GLSL.GLSLVertexShader.new(vertexShaderSource, nil)
Created with the Personal Edition of HelpNDoc: Full-featured EPub generator