ShaderProgram.attachShader

Compiles shader source of the given type and attaches it to the shader program. If shader compilation fails, writes compilation info to the error log of the shader program (_errorLog)

class ShaderProgram
void
attachShader
(
in GLenum shaderType
,
in string shaderSource
)

Parameters

shaderType GLenum

GL_VERTEX_SHADER or GL_GEOMETRY_SHADER or GL_FRAGMENT_SHADER

shaderSource string

the string that contains the source of given shader

Meta