From e91d0fc499c1ff68c9050680ed73da61bcec8365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 19 May 2019 21:46:34 +0200 Subject: [PATCH] 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. --- examples/triangle-opengl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/triangle-opengl.c b/examples/triangle-opengl.c index cc2ee16f..fef7f8fd 100644 --- a/examples/triangle-opengl.c +++ b/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);