GLGETSHADERPRECISION(3G)
💅 GLGETSHADERPRECISION(3G)
okay so welcome to the 3G manual page for glGetShaderPrecisionFormat — the header’s center slot says [FIXME: manual], which is giving placeholder-chic, and we’re gonna get through every detail together 🫶✨
🌸 NAME
glGetShaderPrecisionFormat — retrieve the range and precision for numeric formats supported by the shader compiler 💖
🧾 C SPECIFICATION
void glGetShaderPrecisionFormat(GLenum shaderType, GLenum precisionType,
GLint *range, GLint *precision);
🎀 PARAMETERS
shaderType— tells you which kind of shader’s precision we’re querying. It must beGL_VERTEX_SHADERorGL_FRAGMENT_SHADER.precisionType— the numeric format whose precision and range you wanna query.range— the address of an array of two integers where the implementation’s numeric range encodings get returned.precision— the address of an integer where the implementation’s numeric precision gets written.
✨ DESCRIPTION
glGetShaderPrecisionFormat retrieves the numeric range and precision for the implementation’s representation of quantities in different numeric formats in the specified shader type. shaderType says which shader type we’re getting the numeric precision and range for, and it must be one of GL_VERTEX_SHADER or GL_FRAGMENT_SHADER. precisionType says which numeric format to query, and it must be one of GL_LOW_FLOAT, GL_MEDIUM_FLOAT GL_HIGH_FLOAT, GL_LOW_INT, GL_MEDIUM_INT, or GL_HIGH_INT.
range points to an array of two integers where the format’s numeric range gets returned. If min and max are the smallest values representable in the format, then the values returned are defined like this, no cap:
range[0] = floor(log2(|min|))
range[1] = floor(log2(|max|))
precision is the address of an integer where the log2 value of the number of bits of precision of the format gets written. If the smallest representable value greater than 1 is 1 + eps, then the integer addressed by precision will contain floor(-log2(eps)) 💅
💀 ERRORS
⚠️GL_INVALID_ENUMis generated ifshaderTypeorprecisionTypeis not an accepted value. so yeah, keep those enums valid, bestie 😭
👑 VERSION SUPPORT
The original table has Function / Feature Name down the side and OpenGL Version across the top, and its one row is glGetShaderPrecisionFormat. Here’s the cell-by-cell vibe check:
glGetShaderPrecisionFormat- 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:✔
- OpenGL
👀 SEE ALSO
No SEE ALSO entries are listed on this page — the section is literally just empty space, bestie 🫶
📜 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
Copyright © 2010-2014 Khronos Group
okay that’s the whole page — source/version vibe is [FIXME: source], date is 08/09/2021, and it’s the GLGETSHADERPRECISION(3G) page, mwah 💋✨
📦 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