opengl

Sample code from LearnOpenGL.com
Log | Files | Refs

commit 910b37813c7f1eab29098588e4b1dbcdfb992dfd
parent 16625bd18dee43051f5f2fa1b87e8f21b1428d69
Author: Matsuda Kenji <info@mtkn.jp>
Date:   Wed, 28 Jun 2023 10:11:36 +0900

suppress warning about null byte in a string

Diffstat:
Mglm.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/glm.c b/glm.c @@ -114,7 +114,7 @@ matStr(char *s, mat *m) cur += sprintf(&s[cur], "\n"); } } - sprintf(&s[cur], "\n\0"); + sprintf(&s[cur], "\n%c", '\0'); return s; } @@ -149,6 +149,13 @@ matFree(mat *m) free(m); } +mat * +matCopy(const mat *m) +{ + mat *n = matMake(m->data, m->size); + return n; +} + float *matDataPtr(mat *m) {