diff options
| author | realtradam <[email protected]> | 2023-06-15 19:19:07 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2023-06-15 19:19:07 -0400 |
| commit | acc9db32d765728b63162d6fc74a278d0da10b83 (patch) | |
| tree | 8cd4d58817c2774ce00b15a6d43405d6b4e92f4e | |
| parent | 6a8ba4c650f538195869ad42cdd3688b3b90692e (diff) | |
| download | RodeoKit-acc9db32d765728b63162d6fc74a278d0da10b83.tar.gz RodeoKit-acc9db32d765728b63162d6fc74a278d0da10b83.zip | |
.
| -rw-r--r-- | src/gfx/rodeo_gfx.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/gfx/rodeo_gfx.c b/src/gfx/rodeo_gfx.c index e34713b..1e6f1bb 100644 --- a/src/gfx/rodeo_gfx.c +++ b/src/gfx/rodeo_gfx.c @@ -363,32 +363,33 @@ rodeo_gfx_frame_begin(void) }; // apply translation * orthographic - glm_mat4_mul(old_proj_matrix, old_ortho, old_proj_matrix); glm_translate(old_proj_matrix, old_offset); - rodeo_log( - rodeo_logLevel_warning, - "old translation apply to identity" - ); - irodeo_print_matrix(irodeo_math_cglmMat4_to_rodeoMat4(old_proj_matrix)); + rodeo_log( + rodeo_logLevel_warning, + "old translation apply to identity" + ); + irodeo_print_matrix(irodeo_math_cglmMat4_to_rodeoMat4(old_proj_matrix)); irodeo_gfx_state.proj_matrix = rodeo_math_mat4_translate(irodeo_gfx_state.proj_matrix, offset); - rodeo_log( - rodeo_logLevel_warning, - "new translation apply to identity" - ); - irodeo_print_matrix(irodeo_gfx_state.proj_matrix); - irodeo_gfx_state.proj_matrix = rodeo_math_mat4_multiply(irodeo_gfx_state.proj_matrix, ortho); + rodeo_log( + rodeo_logLevel_warning, + "new translation apply to identity" + ); + irodeo_print_matrix(irodeo_gfx_state.proj_matrix); + //irodeo_gfx_state.proj_matrix = rodeo_math_mat4_multiply(irodeo_gfx_state.proj_matrix, ortho); + irodeo_gfx_state.proj_matrix = rodeo_math_mat4_multiply(irodeo_gfx_state.proj_matrix, irodeo_math_cglmMat4_to_rodeoMat4(old_ortho)); - rodeo_log( - rodeo_logLevel_warning, - "old ortho apply to identity" - ); - irodeo_print_matrix(irodeo_math_cglmMat4_to_rodeoMat4(old_proj_matrix)); - rodeo_log( - rodeo_logLevel_warning, - "new ortho apply to identity" - ); - irodeo_print_matrix(irodeo_gfx_state.proj_matrix); + rodeo_log( + rodeo_logLevel_warning, + "old ortho apply to identity" + ); + glm_mat4_mul(old_proj_matrix, old_ortho, old_proj_matrix); + irodeo_print_matrix(irodeo_math_cglmMat4_to_rodeoMat4(old_proj_matrix)); + rodeo_log( + rodeo_logLevel_warning, + "new ortho apply to identity" + ); + irodeo_print_matrix(irodeo_gfx_state.proj_matrix); // push the result to bgfx bgfx_set_view_transform(0, irodeo_gfx_state.view_matrix.raw, irodeo_gfx_state.proj_matrix.raw); |
