ENIGMA Forums

General fluff => Announcements => Topic started by: Goombert on October 01, 2018, 12:16:25 am

Title: New Dependency on OpenGL Mathematics (GLM) Library
Post by: Goombert on October 01, 2018, 12:16:25 am
OpenGL1OpenGL3Direct3D9Direct3D11
(https://user-images.githubusercontent.com/3212801/46264661-43e25600-c4ed-11e8-9c88-dd0e5bde580c.png)(https://user-images.githubusercontent.com/3212801/46264680-6a07f600-c4ed-11e8-9399-e2fd8b35e5d4.png)(https://user-images.githubusercontent.com/3212801/46271939-e7972a80-c51c-11e8-88c2-37708762ca2b.png)(https://user-images.githubusercontent.com/3212801/46264698-958ae080-c4ed-11e8-9a8c-0e47cd54c4aa.png)

We've made it to yet another massive cleanup of ENIGMA's graphics. This one is a pretty big deal that I wanted to make sure to let everyone know about. I've rewritten all the old transform and matrix code using a single dependency, GLM, to eliminate all of the old duplication. This is not only less code but also brings improved consistency across the four graphics systems that ENIGMA currently provides. There were several reasons for choosing GLM over various other alternatives that exist, but I'm fairly certain we've made the right decision.

You can see in the above table that the transforms in the Animation Platform Example sent to me by DarkAceZ are consistent in all four graphics systems. Direct3D11 does still have noticeable rendering bugs, but this is unrelated to the transforms and has to do with render states and unfinished D3D11 features we will need to take care of later. But regardless, the game does perform more consistently as a result of these changes.

You will now need to download GLM through your package manager when setting up ENIGMA or pulling the latest master on all platforms.
Code: (bash) [Select]
# Ubuntu
sudo apt-get install libglm-dev

# MSYS2 32-bit
pacboy -S glm:i

# MSYS2 64-bit
pacboy -S glm:x

You can see that the changes have already been merged:
https://github.com/enigma-dev/enigma-dev/commit/4e8ad7c3857794f490610c621ae64ae54b3456b0

The full details of these changes can be found in the original pull request comments:
https://github.com/enigma-dev/enigma-dev/pull/1396