Skip to content

Conversation

@bobtista
Copy link

@bobtista bobtista commented Nov 13, 2025

Summary

Replaces all C-style casts between Matrix4x4/Matrix3D and D3DXMATRIX/D3DMATRIX with explicit conversions.

  • Added Build_D3DXMATRIX() helper function
  • Updated DX8Wrapper to use explicit conversions
  • Updated all call sites

@bobtista bobtista force-pushed the bobtista/fix-matrix4-d3d-transpose branch from 518ebd4 to fa2fff2 Compare November 13, 2025 17:13
curView[0][0], curView[0][1], curView[0][2], curView[0][3],
curView[1][0], curView[1][1], curView[1][2], curView[1][3],
curView[2][0], curView[2][1], curView[2][2], curView[2][3],
curView[3][0], curView[3][1], curView[3][2], curView[3][3]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not good. Too complicated user code repeated again. Please see reference code in the linked report.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I made a helper instead of using BUILD_WITH_D3D8. This way we can later use Vulkan or something without touching Matrix4x4. I can do it either way, whichever you prefer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Properly implement transpose between Matrix4 and D3DMatrix

2 participants