GLSLFragmentShader object for compile your shader into bytecode using GLSL language


Can be created using method new:

Lib.Media.Display3D.Shaders.GLSL.GLSLFragmentShader.new(fragmentShaderSource, opt)

creates  GLSLFragmentShader object

fragmentShaderSource - fragment GLSL source string

opt - reserved, use nil


created GLSL shader has property:

nativeShader

Shader object


Examples:


local fragmentShaderSource = [[

        void main(void) {

                gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);

        }

]]


local fragmentShader = Display3D.Shaders.GLSL.GLSLFragmentShader.new(fragmentShaderSource, nil)

Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor