-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Irrlicht refactoring checklist #15350
Comments
Instead of refactoring and extending matrix code I think it should be replaced by an external library, which can simplify the code, add more complex features such as eigenvalue computation, and add platform-specific performance optimisations. |
I had considered this, however
We wouldn't need to maintain the matrix code, that much is true. However, we'd also need to make all matrix usages use the APIs of whatever external library we decide to use, which would make refactoring this gradually harder.
Frankly I don't think we need such complex features (yet), there are much more basic issues to resolve first. We really only need pretty much just 4x4 matrices and pretty basic operations them, not a whole linear algebra library.
Fair point, however I think there are two reasons why this doesn't matter very much: One, the compiler should largely be able to optimize the simple calculations here to use e.g. appropriate SIMD instructions itself. Two, if we're doing that much matrix math on the CPU that it's becoming a performance problem, then it should probably be done on the GPU (for example skinning should be done on the GPU) to begin with. |
What's bad about the I C S naming conventions? |
I find them annoying and not very useful (I could see keeping And even inside Irrlicht they don't seem to be used consistently. How come vectors, quaternions, matrices etc. don't suffer from them, for example? It doesn't matter much (hence why it's an "eventually maybe"), but it also isn't hard to change since renames are cheap with a capable editor. Though the diff noise might be considered a problem. |
I'm wading through Irrlicht code whenever I need to touch something intimately intertwined with rendering like skeletal animations (which need a lot of touching e.g. to fix issues like #14818, #9218, #13043) and expect to do more of that in the future (e.g. for modernizing our pipeline so we can get to enjoy order-independent transparency) so I want to refactor it. I'm glad for anyone who joins me and the work that has already been done e.g. by sfan5 :)
My rough checklist so far:
ISkinnedMesh
interface, the only implementor of which isCSkinnedMesh
. We should just useCSkinnedMesh
directly. There are quite a few instances of this.core::string
withstd::string
core::array
withstd::vector
std::lower_bound
/std::upper_bound
can be used later on (regrettablystd::binary_search
just returns a bool).matrix4.h
#15216). We just need to "draw the rest of the fucking owl": We want column-major 4x4 matrices with mostly functional-style methods. (Let's minimize unnecessary mutable variants of everything more generally.)SWeight
structure sucks. We should move to a more glTF-like representation.struct EulerAngles
or similar. This should be used consistently. It should document rotation order, direction, and radians vs degrees.I
/C
/S
naming conventions?Feel free to chime in.
The text was updated successfully, but these errors were encountered: