GLDELETEPROGRAM(3G)
β¨ GLDELETEPROGRAM β¨
Okay so bestie, welcome to the GLDELETEPROGRAM(3G) glow-up π
β this is literally your cheat sheet for yeeting a program object into the void. No cap, it's easier than it sounds. Let's get into it π«Ά
π C SPECIFICATION π
The actual function signature, periodt:
void glDeleteProgram(GLuint program);
πΈ PARAMETERS πΈ
programβ the program object you wanna delete. Like, which one are we removing, bestie? π
π DESCRIPTION π
Okay so here's the tea β: glDeleteProgram frees the memory and invalidates the name that's associated with the program object you passed in as program. It's giving undo. The way that this command effectively reverses all the effects of calling glCreateProgram()? Iconic πβ¨
Now, if a program object is in use as part of the current rendering state, it gets flagged for deletion β but it will not actually be deleted until it's no longer part of the current state for any rendering context. Main character energy: it doesn't leave the group chat until it's fully done π«‘π
Also, if a program object you're deleting has shader objects attached to it, those shader objects will be automatically detached (slay) but not deleted β unless they've already been flagged for deletion by a previous call to glDeleteShader(). So like, don't assume detached = gone, bestie π
And heads up: a value of 0 for program will be silently ignored. Not me, not the drama, just quietly no-op vibes π
Wanna know if a program object has been flagged for deletion? Just call glGetProgram() with arguments program and GL_DELETE_STATUS. That's your vibe check β
π₯ ERRORS π₯
Ngl, things can go wrong, so read this fam:
GL_INVALID_VALUEis generated ifprogramis not a value generated by OpenGL. Fr fr, don't be making up numbers π
π ASSOCIATED GETS π
These are the functions you can use to peek at the related state, iykyk:
glGet()with argumentGL_CURRENT_PROGRAMπ¦glGetProgram()with argumentsprogramandGL_DELETE_STATUSπglIsProgram()π
π§ VERSION SUPPORT π§
The way this function is supported everywhere? Obsessed. Here's the run-down of which OpenGL versions have it β and bestie, it's all of them:
- 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 β β
Function / Feature Name: glDeleteProgram π
β¨
π SEE ALSO π
Go check out these other icons when you're done here:
glCreateShader()glDetachShader()glUseProgram()
π 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 Β© 2003-2005 3Dlabs Inc. Ltd. Copyright Β© 2010-2014 Khronos Group
And that's the whole page, bestie!! π This gem came from [FIXME: manual] (literally the source is a FIXME, we love a mystery π), versioned 08/09/2021, and yeah β we are so done here. Bye babes πππ
π¦ 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