digitalmars.D.learn - C++ GLM(OpenGL Mathematics) D Equivalent.
- SrMordred (12/12) Sep 04 2018 Most C++ game related projects uses GLM as they default
- JN (9/21) Sep 04 2018 I use dlib.math for my 3D engine. It's working fairly well, can't
- WhatMeWorry (7/34) Sep 07 2018 I've used gl3n exclusively for years, but just call opengl
- drug (3/20) Sep 04 2018 I use gfm.math. It works great. I used gl3n before but left it for
- Guillaume Piolat (2/14) Sep 06 2018 It appears mine is the only one that is @nogc.
Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n - https://github.com/Dav1dde/gl3n But i'm not sure which to pick. Can someone point me out some reasons to use one over the other? (or show some differences) I´m expecting something of equivalent functions and performance as c++ glm. Thank you!
Sep 04 2018
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n - https://github.com/Dav1dde/gl3n But i'm not sure which to pick. Can someone point me out some reasons to use one over the other? (or show some differences) I´m expecting something of equivalent functions and performance as c++ glm. Thank you!I use dlib.math for my 3D engine. It's working fairly well, can't complain. No clue about gfm. Gl3n is nice, but it has a design flaw - it's using row-major matrix ordering. It may or may not be a big deal for you, but in general, it means that all matrices being sent to OpenGL need to be transposed, and the matrix multiplication order is reversed. Another advantage of dlib.math is that it has some extended features, such as support for calculating tangents for a mesh.
Sep 04 2018
On Tuesday, 4 September 2018 at 19:40:10 UTC, JN wrote:On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:I've used gl3n exclusively for years, but just call opengl functions with the "transpose" argument set to true. Or for readability, I define: alias ROW_MAJOR = GL_TRUE; glUniformMatrix4fv(glGetUniformLocation(this.ID, name), 1, ROW_MAJOR, &matrix[0][0]); However, in hindsight, I think gfm.math might be the way to go.Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n - https://github.com/Dav1dde/gl3n But i'm not sure which to pick. Can someone point me out some reasons to use one over the other? (or show some differences) I´m expecting something of equivalent functions and performance as c++ glm. Thank you!I use dlib.math for my 3D engine. It's working fairly well, can't complain. No clue about gfm. Gl3n is nice, but it has a design flaw - it's using row-major matrix ordering. It may or may not be a big deal for you, but in general, it means that all matrices being sent to OpenGL need to be transposed, and the matrix multiplication order is reversed. Another advantage of dlib.math is that it has some extended features, such as support for calculating tangents for a mesh.
Sep 07 2018
On 04.09.2018 22:23, SrMordred wrote:Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n - https://github.com/Dav1dde/gl3n But i'm not sure which to pick. Can someone point me out some reasons to use one over the other? (or show some differences) I´m expecting something of equivalent functions and performance as c++ glm. Thank you!I use gfm.math. It works great. I used gl3n before but left it for gfm.math. dlib seems pretending to be a framework. I don't like frameworks.
Sep 04 2018
On Tuesday, 4 September 2018 at 19:23:16 UTC, SrMordred wrote:Most C++ game related projects uses GLM as they default math/vector lib (even if not using opengl). In D we have (that I found): gfm.math - https://github.com/d-gamedev-team/gfm dlib.math - https://github.com/gecko0307/dlib Gl3n - https://github.com/Dav1dde/gl3n But i'm not sure which to pick. Can someone point me out some reasons to use one over the other? (or show some differences) I´m expecting something of equivalent functions and performance as c++ glm. Thank you!It appears mine is the only one that is nogc.
Sep 06 2018