'\" t .\" Title: glCreateProgram .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCREATEPROGRAM" "3G" "05/21/2015" "[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" glCreateProgram \- Creates a program object .SH "C SPECIFICATION" .HP \w'GLuint\ glCreateProgram('u .BI "GLuint glCreateProgram(" "void" ");" .SH "DESCRIPTION" .PP \fBglCreateProgram\fR creates an empty program object and returns a non\-zero value by which it can be referenced\&. A program object is an object to which shader objects can be attached\&. This provides a mechanism to specify the shader objects that will be linked to create a program\&. It also provides a means for checking the compatibility of the shaders that will be used to create a program (for instance, checking the compatibility between a vertex shader and a fragment shader)\&. When no longer needed as part of a program object, shader objects can be detached\&. .PP One or more executables are created in a program object by successfully attaching shader objects to it with \fBglAttachShader\fR(), successfully compiling the shader objects with \fBglCompileShader\fR(), and successfully linking the program object with \fBglLinkProgram\fR()\&. These executables are made part of current state when \fBglUseProgram\fR() is called\&. Program objects can be deleted by calling \fBglDeleteProgram\fR()\&. The memory associated with the program object will be deleted when it is no longer part of current rendering state for any context\&. .SH "NOTES" .PP Like buffer and texture objects, the name space for program 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\&. .SH "ERRORS" .PP This function returns 0 if an error occurs creating the program object\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with the argument \fBGL_CURRENT_PROGRAM\fR .PP \fBglGetActiveAttrib\fR() with a valid program object and the index of an active attribute variable .PP \fBglGetActiveUniform\fR() with a valid program object and the index of an active uniform variable .PP \fBglGetAttachedShaders\fR() with a valid program object .PP \fBglGetAttribLocation\fR() with a valid program object and the name of an attribute variable .PP \fBglGetProgram\fR() with a valid program object and the parameter to be queried .PP \fBglGetProgramInfoLog\fR() with a valid program object .PP \fBglGetUniform\fR() with a valid program object and the location of a uniform variable .PP \fBglGetUniformLocation\fR() with a valid program object and the name of a uniform variable .PP \fBglIsProgram\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{ \fBglCreateProgram\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 .SH "SEE ALSO" .PP \fBglAttachShader\fR(), \fBglBindAttribLocation\fR(), \fBglCreateShader\fR(), \fBglDeleteProgram\fR(), \fBglDetachShader\fR(), \fBglLinkProgram\fR(), \fBglUniform\fR(), \fBglUseProgram\fR(), \fBglValidateProgram\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