GLMAPGRID(3G)
π GLMAPGRID β bestie, it's the mesh-defining era β¨
okay so this is glMapGrid from the 3G manual, and she's literally the one who draws the little grid lines your eval mesh struts along. four whole functions, one iconic job. let's get into it π
π NAME π
glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f β they define a one- or two-dimensional mesh. that's it. that's the whole vibe. π
β¨ C SPECIFICATION β¨
no cap, here's exactly what you call:
void glMapGrid1d( GLint un,
GLdouble u1,
GLdouble u2 )
void glMapGrid1f( GLint un,
GLfloat u1,
GLfloat u2 )
void glMapGrid2d( GLint un,
GLdouble u1,
GLdouble u2,
GLint vn,
GLdouble v1,
GLdouble v2 )
void glMapGrid2f( GLint un,
GLfloat u1,
GLfloat u2,
GLint vn,
GLfloat v1,
GLfloat v2 )
notice the d and f versions, bestie β one takes GLdouble, one takes GLfloat. pick your precision, live your truth π
π¦ PARAMETERS π¦
unβ how many partitions you want in the grid range interval[u1, u2]. must be positive, okay? zero and negatives are NOT it.u1,u2β these specify the mappings for the integer grid domain valuesi=0andi=un.vnβ how many partitions you want in the grid range interval[v1, v2]. (glMapGrid2only, bestie β the 1D girlies don't have av.)v1,v2β these specify the mappings for the integer grid domain valuesj=0andj=vn. (glMapGrid2only.)
π DESCRIPTION π
so the way this works: glMapGrid and glEvalMesh are a duo. like, a duo duo. you use them together to efficiently generate and evaluate a whole series of evenly-spaced map domain values. glEvalMesh steps through the integer domain of a one- or two-dimensional grid, and that grid's range is the domain of the evaluation maps that glMap1 and glMap2 specified. teamwork, slay. π«Ά
glMapGrid1 and glMapGrid2 specify the linear grid mappings between the i (or i and j) integer grid coordinates, and the u (or u and v) floating-point evaluation map coordinates. if you wanna know the details of how u and v coordinates get evaluated, go read glMap1 and glMap2 β that's their lore, not this page's.
π the 1D one
glMapGrid1 specifies a single linear mapping such that integer grid coordinate 0 maps exactly to u1, and integer grid coordinate un maps exactly to u2. every other integer grid coordinate i gets mapped so that
u=i(u2βu1)/un+u1
πΈ the 2D one
glMapGrid2 specifies two such linear mappings. one maps integer grid coordinate i=0 exactly to u1, and integer grid coordinate i=un exactly to u2. the other maps integer grid coordinate j=0 exactly to v1, and integer grid coordinate j=vn exactly to v2. other integer grid coordinates i and j are mapped such that
u=i(u2βu1)/un+u1
v=j(v2βv1)/vn+v1
and bestie, the mappings that glMapGrid specifies? they get used identically by glEvalMesh and glEvalPoint. same grid, same energy. π
π ERRORS π
GL_INVALID_VALUEis generated if eitherunorvnis not positive. (we warned you. positive only. π)GL_INVALID_OPERATIONis generated ifglMapGridis executed between the execution ofglBeginand the corresponding execution ofglEnd. do NOT do this. it is not the moment. π
π₯ ASSOCIATED GETS π₯
here's what you can pull back out with glGet, and yes, you gotta pass the right argument:
glGetwith argumentGL_MAP1_GRID_DOMAINglGetwith argumentGL_MAP2_GRID_DOMAINglGetwith argumentGL_MAP1_GRID_SEGMENTSglGetwith argumentGL_MAP2_GRID_SEGMENTS
β SEE ALSO β
go read these next, iykyk:
glEvalCoord(3G)glEvalMesh(3G)glEvalPoint(3G)glMap1(3G)glMap2(3G)
and that's the page, bestie!! this whole thing lives under the GLMAPGRID(3G) banner β that's the title up top and the footer at the very bottom, so you know exactly which manual she came from. go forth and define your mesh, you absolute main character. ππ¦β¨
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- fedora 43: gl-manpages 1.1-34.20190306.fc43 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- fedora 44: gl-manpages 1.1-35.20190306.fc44 Β· Apache-2.0 AND HPND AND HPND-sell-variant AND MIT AND OpenPBS-2.3 AND SGI-B-2.0 AND W3C-19980720 AND X11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms