GLGETFRAGDATAINDEX(3G)
π glGetFragDataIndex β a.k.a. the 3G girlies' guide to frag data indices π
okay bestie, so this is the manual page for glGetFragDataIndex (from the 3G section, iykyk) and it's literally just here to answer one question: which fragment color did my varying out variable get bound to?? no cap, that's the whole vibe.
β¨ NAME β¨
glGetFragDataIndex β the function that queries the bindings of color indices to user-defined varying out variables π
πΈ C SPECIFICATION πΈ
GLint glGetFragDataIndex(GLuint program, const char * name);
like, that's it. two args. go off. π«Ά
π PARAMETERS π
programβ the name of the program containing the varying out variable whose binding you wanna query. this is your main character right here πnameβ the name of the user-defined varying out variable whose index you're asking about. the lil celeb you're tryna look up π
π DESCRIPTION π
so here's what happens: glGetFragDataIndex returns the index of the fragment color that the variable name was bound to when the program object program was last linked. past tense. the linking already happened, we're just reading the receipts π§Ύβ¨
and if name is not a varying out variable of program, or if an error occurs? it returns -1. yeah. -1. that's the "girl, nothing here" answer π
π NOTES π
glGetFragDataIndex is only available if the GL version is 3.3 or greater. no 3.3, no entry. gatekept and honestly valid π
π₯ ERRORS π₯
GL_INVALID_OPERATIONgets generated ifprogramis not the name of a program object. so like... give it a real program name or it WILL be mad at you π
β VERSION SUPPORT β
the chart, bestie. the chart. which OpenGL versions support glGetFragDataIndex? let's break it down π
OpenGL Version β supported or not, for the row Function / Feature Name:
2.0β-(nope π )2.1β-(still nope)3.0β-(nope)3.1β-(nope)3.2ββ(wait... yes?? yes. iconic)3.3βββ¨4.0βββ¨4.1βββ¨4.2βββ¨4.3βββ¨4.4βββ¨4.5βββ¨
and the function name in that table is literally glGetFragDataIndex, in case anyone was wondering who ate π
β¨
π¦ SEE ALSO π¦
glCreateProgram()glBindFragDataLocation()glBindFragDataLocationIndexed()glGetFragDataLocation()
go read those too, they're all in the same friend group fr fr π«Ά
π COPYRIGHT π
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 Β© 2010-2014 Khronos Group
ok that's the whole page, no crumbs left, every single detail accounted for π―
and that's a wrap, bestie!! this came from [FIXME: source] and is dated 08/09/2021 β so like, it's giving vintage but make it cute πΈπ mwah, study up and slay your shaders β¨
π¦ 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