GLCREATEPROGRAM(3G)
β¨ glCreateProgram: the 3G manual page β¨
Okay bestie, this is the 3G manual page for glCreateProgram, and the header is literally saying [FIXME: manual] β not me being messy, that's just the header. Let's get into it. π«Ά
πΈ NAME πΈ
glCreateProgram β creates a program object. That's the whole name vibe. β¨
π§ C SPECIFICATION π§
GLuint glCreateProgram(void);
π DESCRIPTION π
glCreateProgram 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 they're no longer needed as part of a program object, shader objects can be detached. Periodt. π
One or more executables are created in a program object by successfully attaching shader objects to it with glAttachShader(), successfully compiling the shader objects with glCompileShader(), and successfully linking the program object with glLinkProgram(). These executables are made part of current state when glUseProgram() is called. Program objects can be deleted by calling glDeleteProgram(). The memory associated with the program object will be deleted when it is no longer part of current rendering state for any context. π
π¦ NOTES π¦
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. π
Applications are responsible for providing the synchronization across API calls when objects are accessed from different execution threads. No cap, that's on you. π
π ERRORS π
This function returns 0 if an error occurs creating the program object.
π₯ ASSOCIATED GETS π₯
glGet()with the argumentGL_CURRENT_PROGRAMglGetActiveAttrib()with a valid program object and the index of an active attribute variableglGetActiveUniform()with a valid program object and the index of an active uniform variableglGetAttachedShaders()with a valid program objectglGetAttribLocation()with a valid program object and the name of an attribute variableglGetProgram()with a valid program object and the parameter to be queriedglGetProgramInfoLog()with a valid program objectglGetUniform()with a valid program object and the location of a uniform variableglGetUniformLocation()with a valid program object and the name of a uniform variableglIsProgram()
π VERSION SUPPORT π
Here's the version vibe check. The original table's columns are a blank corner, Function / Feature Name, and OpenGL Version; the function/feature name is glCreateProgram, and it's got a β in every listed OpenGL version. π
- OpenGL 2.0 β β
- OpenGL 2.1 β β
- OpenGL 3.0 β β
- OpenGL 3.1 β β
- OpenGL 3.2 β β
- OpenGL 3.3 β β
- OpenGL 4.0 β β
- OpenGL 4.1 β β
- OpenGL 4.2 β β
- OpenGL 4.3 β β
- OpenGL 4.4 β β
- OpenGL 4.5 β β
π SEE ALSO π
glAttachShader()glBindAttribLocation()glCreateShader()glDeleteProgram()glDetachShader()glLinkProgram()glUniform()glUseProgram()glValidateProgram()
π COPYRIGHT π
Copyright Β© 2003-2005 3Dlabs Inc. Ltd. Copyright Β© 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. http://opencontent.org/openpub/.
π COPYRIGHT π
Copyright Β© 2003-2005 3Dlabs Inc. Ltd.
Copyright Β© 2010-2014 Khronos Group
Okay that's the whole man page, bestie π Cute sign-off: source/version is[FIXME: source], date is08/09/2021, and the footer title isGLCREATEPROGRAM(3G). Slay. π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms