<gl-shader> ( source kind -- shader )


Vocabulary
opengl.shaders

Inputs
sourceThe GLSL source code to compile
kindThe kind of shader to compile, such as GL_VERTEX_SHADER or GL_FRAGMENT_SHADER


Outputs
shadera new gl-shader


Word description
Tries to compile the given GLSL source into a shader object. The returned object can be checked for validity by check-gl-shader or gl-shader-ok?. Errors and warnings generated by the GLSL compiler will be collected in the info log, available from gl-shader-info-log. When the shader object is no longer needed, it should be deleted using glDeleteShader or else be attached to a gl-program object deleted using delete-gl-program.

Definition