Selaa lähdekoodia

Clarify triangle-opengl uniform uniform update

The previous way worked as mat4 is an array typedef but this way may be
clearer to people new to the linmath header.
Camilla Löwy 6 vuotta sitten
vanhempi
commit
e91d0fc499
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      examples/triangle-opengl.c

+ 1 - 1
examples/triangle-opengl.c

@@ -152,7 +152,7 @@ int main(void)
         mat4x4_mul(mvp, p, m);
 
         glUseProgram(program);
-        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) mvp);
+        glUniformMatrix4fv(mvp_location, 1, GL_FALSE, (const GLfloat*) &mvp);
         glBindVertexArray(vertex_array);
         glDrawArrays(GL_TRIANGLES, 0, 3);