GLGETMAP(3G)

πŸ“¦ version 24.3.3, in opensuse-leap 16.0

πŸ’– NAME πŸ’–

ok so bestie, welcome to the GLGETMAP(3G) page β€” yes that's the manual section, 3G, it's giving OpenGL πŸ’…

glGetMapdv, glGetMapfv, glGetMapiv β€” return evaluator parameters ✨


🌈 C SPECIFICATION 🌈

void glGetMapdv( GLenum target,
                 GLenum query,
                 GLdouble *v )
void glGetMapfv( GLenum target,
                 GLenum query,
                 GLfloat *v )
void glGetMapiv( GLenum target,
                 GLenum query,
                 GLint *v )

πŸŽ€ PARAMETERS πŸŽ€

  • target β€” the symbolic name of a map you're asking about, no cap. The accepted values are GL_MAP1_COLOR_4, GL_MAP1_INDEX, GL_MAP1_NORMAL, GL_MAP1_TEXTURE_COORD_1, GL_MAP1_TEXTURE_COORD_2, GL_MAP1_TEXTURE_COORD_3, GL_MAP1_TEXTURE_COORD_4, GL_MAP1_VERTEX_3, GL_MAP1_VERTEX_4, GL_MAP2_COLOR_4, GL_MAP2_INDEX, GL_MAP2_NORMAL, GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2, GL_MAP2_TEXTURE_COORD_3, GL_MAP2_TEXTURE_COORD_4, GL_MAP2_VERTEX_3, and GL_MAP2_VERTEX_4. that's the whole list, don't @ me 🫢
  • query β€” which parameter you want back. the symbolic names GL_COEFF, GL_ORDER, and GL_DOMAIN are accepted.
  • v β€” the spot where the requested data gets returned. it's giving output buffer πŸ’–

🌸 DESCRIPTION 🌸

so like, glMap1 and glMap2 are the ones that define evaluators, right? glGetMap is the bestie that goes and fetches the evaluator parameters back for you. target picks which map, query picks which specific parameter you want, and v points at the storage where the values come back. slay.

the acceptable values for the target parameter are described in the glMap1 and glMap2 reference pages. go read those, iykyk πŸ“–

query can assume the following values:

  • GL_COEFF β€” v returns the control points for the evaluator function. One-dimensional evaluators return order control points, and two-dimensional evaluators return uorderΓ—vorder control points. Each control point consists of one, two, three, or four integer, single-precision floating-point, or double-precision floating-point values, depending on the type of the evaluator. The GL returns two-dimensional control points in row-major order, incrementing the uorder index quickly and the vorder index after each row. Integer values, when requested, are computed by rounding the internal floating-point values to the nearest integer values. math but make it fashion ✨
  • GL_ORDER β€” v returns the order of the evaluator function. One-dimensional evaluators return a single value, order. The initial value is 1. Two-dimensional evaluators return two values, uorder and vorder. The initial value is 1,1. iconic defaults tbh.
  • GL_DOMAIN β€” v returns the linear u and v mapping parameters. One-dimensional evaluators return two values, u1 and u2, as specified by glMap1. Two-dimensional evaluators return four values (u1, u2, v1, and v2) as specified by glMap2. Integer values, when requested, are computed by rounding the internal floating-point values to the nearest integer values. same rounding energy, different vibe πŸ’…

πŸ¦‹ NOTES πŸ¦‹

if an error is generated, no change is made to the contents of v. your buffer stays untouched, periodt. πŸ›‘οΈ

πŸ”₯ ERRORS πŸ”₯

  • GL_INVALID_ENUM is generated if either target or query is not an accepted value. like, if you made one up? no. 🚫
  • GL_INVALID_OPERATION is generated if glGetMap is executed between the execution of glBegin and the corresponding execution of glEnd. do not try this in the middle of a glBegin/glEnd sandwich, bestie, it will not end well 😭

πŸ‘‘ SEE ALSO πŸ‘‘

  • glEvalCoord(3G)
  • glMap1(3G)
  • glMap2(3G)

and that's the whole page, angel πŸ’œ this was the GLGETMAP(3G) entry, straight out of the 3G manual β€” go forth and query those evaluator parameters, you absolute main character πŸ¦‹βœ¨

πŸ“¦ where this page comes from