Skip to content

Commit

Permalink
More logging
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Nov 8, 2016
1 parent 5e9a677 commit 18da1fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions cores/libretro-ffmpeg/fft/fft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ static void fft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned
#endif
glm::mat4 mvp_lookat = glm::lookAt(eye, center, up);
#ifdef GLM_USE_DEBUG
printf("eye %.2f %.2f %.2f\n", eye.x, eye.y, eye.z);
printf("center %.2f %.2f %.2f\n", center.x, center.y, center.z);
printf("up %.2f %.2f %.2f\n", up.x, up.y, up.z);
printf("mvp_lookat: \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n %.2f, %.2f, %.2f, %.2f \n\n",
mvp_lookat[0][0],
mvp_lookat[0][1],
Expand Down Expand Up @@ -269,6 +272,9 @@ static void fft_render(glfft_t *fft, GLuint backbuffer, unsigned width, unsigned
MAT_ELEM_4X4(mvp_persp, 3, 2),
MAT_ELEM_4X4(mvp_persp, 3, 3)
);
printf("eye %.2f %.2f %.2f\n", eye[0], eye[1], eye[2]);
printf("center %.2f %.2f %.2f\n", center[0], center[1], center[2]);
printf("up %.2f %.2f %.2f\n", up[0], up[1], up[2]);
#endif
matrix_4x4_lookat(&mvp_lookat, eye, center, up);
#ifdef GLM_USE_DEBUG
Expand Down
6 changes: 3 additions & 3 deletions libretro-common/gfx/math/matrix_4x4.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ void matrix_4x4_projection(math_matrix_4x4 *out,
MAT_ELEM_4X4(*out, 2, 0) = 0.0f;
MAT_ELEM_4X4(*out, 2, 1) = 0.0f;
MAT_ELEM_4X4(*out, 2, 2) = -((zfar + znear) / delta_z);
MAT_ELEM_4X4(*out, 2, 3) = -((2.f * zfar * znear) / delta_z);
MAT_ELEM_4X4(*out, 2, 3) = -1.f;
MAT_ELEM_4X4(*out, 3, 0) = 0.0f;
MAT_ELEM_4X4(*out, 3, 1) = 0.0f;
MAT_ELEM_4X4(*out, 3, 2) = -1.f;
MAT_ELEM_4X4(*out, 3, 3) = 1.0f;
MAT_ELEM_4X4(*out, 3, 2) = -((2.f * zfar * znear) / delta_z);
MAT_ELEM_4X4(*out, 3, 3) = 0.0f;
}

void matrix_4x4_lookat(math_matrix_4x4 *out,
Expand Down

0 comments on commit 18da1fc

Please sign in to comment.