<<< OpenGL Mathematics (GLM) | Index | Matrix transformation >>> |
From GLSL specification 5.4.2:
If there is a single scalar parameter to a vector constructor, it is used to initialize all components of the constructed vector to that scalar's value:
glm::vec4 Position = glm::vec4( glm::vec3( 0.0 ), 1.0 );
If there is a single scalar parameter to a matrix constructor, it is used to initialize all the components on the matrix's diagonal, with the remaining components initialized to 0.0f
glm::mat4 Model = glm::mat4( 1.0 );
<<< OpenGL Mathematics (GLM) | Index | Matrix transformation >>> |