'\" t .\" Title: glCreateShader .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCREATESHADER" "3G" "01/03/2018" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glCreateShader \- Creates a shader object .SH "C SPECIFICATION" .HP \w'GLuint\ glCreateShader('u .BI "GLuint glCreateShader(GLenum\ " "shaderType" ");" .SH "PARAMETERS" .PP \fIshaderType\fR .RS 4 Specifies the type of shader to be created\&. Must be one of \fBGL_COMPUTE_SHADER\fR, \fBGL_VERTEX_SHADER\fR, \fBGL_TESS_CONTROL_SHADER\fR, \fBGL_TESS_EVALUATION_SHADER\fR, \fBGL_GEOMETRY_SHADER\fR, or \fBGL_FRAGMENT_SHADER\fR\&. .RE .SH "DESCRIPTION" .PP \fBglCreateShader\fR creates an empty shader object and returns a non\-zero value by which it can be referenced\&. A shader object is used to maintain the source code strings that define a shader\&. \fIshaderType\fR indicates the type of shader to be created\&. Five types of shader are supported\&. A shader of type \fBGL_COMPUTE_SHADER\fR is a shader that is intended to run on the programmable compute processor\&. A shader of type \fBGL_VERTEX_SHADER\fR is a shader that is intended to run on the programmable vertex processor\&. A shader of type \fBGL_TESS_CONTROL_SHADER\fR is a shader that is intended to run on the programmable tessellation processor in the control stage\&. A shader of type \fBGL_TESS_EVALUATION_SHADER\fR is a shader that is intended to run on the programmable tessellation processor in the evaluation stage\&. A shader of type \fBGL_GEOMETRY_SHADER\fR is a shader that is intended to run on the programmable geometry processor\&. A shader of type \fBGL_FRAGMENT_SHADER\fR is a shader that is intended to run on the programmable fragment processor\&. .PP When created, a shader object\*(Aqs \fBGL_SHADER_TYPE\fR parameter is set to either \fBGL_COMPUTE_SHADER\fR, \fBGL_VERTEX_SHADER\fR, \fBGL_TESS_CONTROL_SHADER\fR, \fBGL_TESS_EVALUATION_SHADER\fR, \fBGL_GEOMETRY_SHADER\fR or \fBGL_FRAGMENT_SHADER\fR, depending on the value of \fIshaderType\fR\&. .SH "NOTES" .PP Like buffer and texture objects, the name space for shader objects may be shared across a set of contexts, as long as the server sides of the contexts share the same address space\&. If the name space is shared across contexts, any attached objects and the data associated with those attached objects are shared as well\&. .PP Applications are responsible for providing the synchronization across API calls when objects are accessed from different execution threads\&. .PP \fBGL_COMPUTE_SHADER\fR is available only if the GL version is 4\&.3 or higher\&. .SH "ERRORS" .PP This function returns 0 if an error occurs creating the shader object\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIshaderType\fR is not an accepted value\&. .SH "ASSOCIATED GETS" .PP \fBglGetShader\fR() with a valid shader object and the parameter to be queried .PP \fBglGetShaderInfoLog\fR() with a valid shader object .PP \fBglGetShaderSource\fR() with a valid shader object .PP \fBglIsShader\fR() .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglCreateShader\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp 1 .SH "SEE ALSO" .PP \fBglAttachShader\fR(), \fBglCompileShader\fR(), \fBglDeleteShader\fR(), \fBglDetachShader\fR(), \fBglShaderSource\fR() .SH "COPYRIGHT" .PP Copyright \(co 2003\-2005 3Dlabs Inc\&. Ltd\&. Copyright \(co 2010\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2003-2005 3Dlabs Inc. Ltd. .br Copyright \(co 2010-2014 Khronos Group .br