learnd3d11
learnd3d11 copied to clipboard
odin translation up to 1-1-3 HelloTriangle Refactored
This is an offer to provide an odin code translation of the project from 1-1-1 up to 1-1-3 Refactored. Essentially, all the content covered in the "Getting Started" Section of the tutorial webpage. I have stopped here because the Debug layer doesn't have bindings yet in odin and the "Models" section of the tutorial doesn't have the articles yet.
I have done my best to follow the overall architecture of the C++ code, but I have made divergences where I thought that odin's idioms conflicted with the C++ version. This mostly means replacing classes with structs, functions, and odin's package system (Which can be used to provide the equivalent of private-ing certain functions and variables.) Replacing the DirectXMath stuff with odin's core:math/linalg/hlsl because odin already has built-in support for vector and matrix math that DirectXMath adds. Also dropping ComPtr for normal pointers since odin doesn't have bindings or an equivalent, this doesn't cause much change, you can see the known place this is necessary in the README I added.
I skipped the "raw" version of 1-1-3 because I wasn't sure it gave much value having it separate from the Refactored version of the code from a "reading the whole code" point of view. And I did the refactored part first copying over some bits from when I was originally following the tutorial before doing this translation and got lazy :^)
I added some initial implementations of 1-3-1 and 1-3-2, though without dds loading and without assimp model loading. I haven't gotten to the Debug layer stuff from 1-2, so there is a slight divergence in that regard.
I'm closing this cause it's gone stale sitting here for so long and it's probably smarter to wait to do translations when the main C++ code and tutorial documentation are more finished and less likely to change.