ogl_mat4f_identity.c (570B)
1 /* 2 2018 David DiPaola 3 licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/) 4 */ 5 6 #include <GL/glew.h> 7 8 #include "ogl.h" 9 10 void 11 ogl_mat4f_identity( 12 struct ogl_mat4f * out_matrix 13 ) { 14 GLfloat * values = (*out_matrix).values; 15 values[ 0] = 1.0f; values[ 1] = 0.0f; values[ 2] = 0.0f; values[ 3] = 0.0f; 16 values[ 4] = 0.0f; values[ 5] = 1.0f; values[ 6] = 0.0f; values[ 7] = 0.0f; 17 values[ 8] = 0.0f; values[ 9] = 0.0f; values[10] = 1.0f; values[11] = 0.0f; 18 values[12] = 0.0f; values[13] = 0.0f; values[14] = 0.0f; values[15] = 1.0f; 19 } 20