diff --git a/cores/libretro-ffmpeg/fft/fft.cpp b/cores/libretro-ffmpeg/fft/fft.cpp index 68bae10c92..90803ea835 100644 --- a/cores/libretro-ffmpeg/fft/fft.cpp +++ b/cores/libretro-ffmpeg/fft/fft.cpp @@ -246,13 +246,13 @@ static void fft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned center[1] = 0.0f; center[2] = 1.0f; - vec3_add(¢er[0], &eye[0]); + vec3_add(center, eye); #ifdef GLM_USE_DEBUG printf("center : %.2f, %.2f, %.2f\n", center[0], center[1], center[2]); #endif - matrix_4x4_projection(&mvp_persp, (float)M_HALF_PI, (float)width / height, 1.0f, 500.0f); + matrix_4x4_projection(mvp_persp, (float)M_HALF_PI, (float)width / height, 1.0f, 500.0f); #ifdef GLM_USE_DEBUG printf("mvp_persp: \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n\n", MAT_ELEM_4X4(mvp_persp, 0, 0), @@ -297,7 +297,7 @@ static void fft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned MAT_ELEM_4X4(mvp_lookat, 3, 3) ); #endif - matrix_4x4_multiply(mvp, &mvp_persp, &mvp_lookat); + matrix_4x4_multiply(mvp, mvp_persp, mvp_lookat); #ifdef GLM_USE_DEBUG printf("mvp: \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n\n", MAT_ELEM_4X4(mvp, 0, 0), diff --git a/libretro-common/include/gfx/math/matrix_4x4.h b/libretro-common/include/gfx/math/matrix_4x4.h index 0878df2c0b..33c80a39d0 100644 --- a/libretro-common/include/gfx/math/matrix_4x4.h +++ b/libretro-common/include/gfx/math/matrix_4x4.h @@ -212,12 +212,12 @@ typedef struct math_matrix_4x4 vec3_t zaxis; /* the "forward" vector */ \ vec3_t xaxis; /* the "right" vector */ \ vec3_t yaxis; /* the "up" vector */ \ - vec3_copy(&zaxis[0], center); \ - vec3_subtract(&zaxis[0], eye); \ - vec3_normalize(&zaxis[0]); \ - vec3_cross(&xaxis[0], &zaxis[0], up); \ - vec3_normalize(&xaxis[0]); \ - vec3_cross(&yaxis[0], &xaxis[0], zaxis); \ + vec3_copy(zaxis, center); \ + vec3_subtract(zaxis, eye); \ + vec3_normalize(zaxis); \ + vec3_cross(xaxis, zaxis, up); \ + vec3_normalize(xaxis); \ + vec3_cross(yaxis, xaxis, zaxis); \ MAT_ELEM_4X4(out, 0, 0) = xaxis[0]; \ MAT_ELEM_4X4(out, 0, 1) = yaxis[0]; \ MAT_ELEM_4X4(out, 0, 2) = -zaxis[0]; \