GLLOADMATRIX(3G)
π GLLOADMATRIX π
okay bestie, welcome to the GLLOADMATRIX(3G) page β yes that's the manual section, we're in the 3G girlies (OpenGL girlies, obviously) π
β¨ NAME β¨
glLoadMatrixd, glLoadMatrixf β swap out the current matrix for the one you hand over, no cap π
πΈ C SPECIFICATION πΈ
void glLoadMatrixd( const GLdouble *m )
void glLoadMatrixf( const GLfloat *m )
π PARAMETERS π
mβ a pointer to 16 consecutive values, periodt. Those 16 lil guys get used as the elements of a 4Γ4 column-major matrix. sixteen. not 15, not 17. sixteen π«Ά
π« DESCRIPTION π«
glLoadMatrix replaces the current matrix with the one whose elements are specified by m. and which matrix is "the current matrix" bestie?? it's the projection matrix, the modelview matrix, or the texture matrix β depends on your current matrix mode (go check glMatrixMode, she knows) π
The current matrix, M, defines a transformation of coordinates. For instance β assume M refers to the modelview matrix. If v=(v[0],v[1],v[2],v[3]) is the set of object coordinates of a vertex, and m points to an array of 16 single- or double-precision floating-point values m[0],m[1],...,m[15], then the modelview transformation M(v) does the following:
m[0] m[4] m[8] m[12] v[0]
M(v)=βm[1] m[5] m[9] m[13]β Γβv[1]β
m[2] m[6] m[10] m[14] v[2]
m[3] m[7] m[11] m[15] v[3]
Where Γ denotes matrix multiplication. (yes the math girlies ate with this one π)
Projection and texture transformations are similarly defined. same energy, different matrix β¨
π¦ NOTES π¦
so like β even though you can specify the elements of the matrix with single or double precision, the GL implementation may store or operate on these values in less than single precision. it's giving "we heard you, we just didn't fully listen" π
π ERRORS π
GL_INVALID_OPERATIONis generated ifglLoadMatrixis executed between the execution ofglBeginand the corresponding execution ofglEnd.
π¨ bestie NO. do not do this. do not callglLoadMatrixinside aglBegin/glEndblock. the GL will literally yell at you. wait for yourglEndlike a civilized icon π
π ASSOCIATED GETS π
glGetwith argumentGL_MATRIX_MODEglGetwith argumentGL_COLOR_MATRIXglGetwith argumentGL_MODELVIEW_MATRIXglGetwith argumentGL_PROJECTION_MATRIXglGetwith argumentGL_TEXTURE_MATRIX
π SEE ALSO π
glLoadIdentity(3G)glMatrixMode(3G)glMultMatrix(3G)glPushMatrix(3G)
and that's the whole page, bestie!! π go forth and load those matrices, you absolute main character π«Ά
this has been GLLOADMATRIX(3G) β the 3G manual page β signing off πβ¨
π¦ 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