OpenGL Math library libglmc

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
D.J.Peters
Posts: 8641
Joined: May 28, 2005 3:28
Contact:

OpenGL Math library libglmc

Post by D.J.Peters »

Today OpenGL C++ coders use the well known OpenGL Mathematics library gml.
C++ glm: https://glm.g-truc.net/0.9.9/index.html

I created the header file for OpenGL Mathematics for C cglm
C cglm: https://github.com/recp/cglm

The lib used fast SIMD CPU instruction to speed up vec4,mat2,mat4 ... math.
This data types: vec2,vec3, mat3 are unaligned.
vec4, mat2, mat4, quart, frustum, sphere, aabb ... are 16 byte aligned data types !

download: fbcglm.zip

download: libcglm-src.zip

For Windows users I build libcglm.dll for 32/64-bit look at the lib folder.
As a Linux user you can build it self with cmake, extract libcglm-src.zip in you home folder
terminal wrote:cd libcglm-src
cd build
cmake ..
make
sudo make install
By the way you get over 450 well tested math function
of course you can use it independent from OpenGL for your own 2D/3D stuff !

Happy math coding :-)

Joshy
fifoul
Posts: 15
Joined: Oct 17, 2005 13:20
Location: France

Re: OpenGL Math library libglmc

Post by fifoul »

Thank you very much for these files !

(in the prog test.bas, angles.y = 45
this angle is in degrees when it should normally be in radians)
Dr_D
Posts: 2453
Joined: May 27, 2005 4:59
Contact:

Re: OpenGL Math library libglmc

Post by Dr_D »

Whoa, this is cool man! I don't know how I missed this the whole time. Thanks for the effort, Joshy!
Mysoft
Posts: 847
Joined: Jul 28, 2005 13:56
Location: Brazil, Santa Catarina, Indaial (ouch!)
Contact:

Re: OpenGL Math library libglmc

Post by Mysoft »

D.J.Peters wrote: Jun 19, 2021 16:44 I created the header file for OpenGL Mathematics for C cglm
where it is?

hum... i assume you added the garbage OOP to the header in a futile attempt to have aligned datatypes... but without shoving a HUGE WARNING about that

anyway yeah it's past time for freebasic to properly fix their "field" to actually work.
Jattenalle
Posts: 66
Joined: Nov 17, 2023 14:41
Contact:

Re: OpenGL Math library libglmc

Post by Jattenalle »

Mysoft wrote: Oct 13, 2024 22:29
D.J.Peters wrote: Jun 19, 2021 16:44 I created the header file for OpenGL Mathematics for C cglm
where it is?

hum... i assume you added the garbage OOP to the header in a futile attempt to have aligned datatypes... but without shoving a HUGE WARNING about that

anyway yeah it's past time for freebasic to properly fix their "field" to actually work.
What on Earth are you rambling about?
Your irrational hate of OOP isn't healthy, you're going around necroing year(s) old topics just to seethe and rage...

Anyhow, this is a great translation D.J.Peters!
demosthenesk
Posts: 293
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: OpenGL Math library libglmc

Post by demosthenesk »

Mysoft wrote: Oct 13, 2024 22:29
D.J.Peters wrote: Jun 19, 2021 16:44 I created the header file for OpenGL Mathematics for C cglm
where it is?

hum... i assume you added the garbage OOP to the header in a futile attempt to have aligned datatypes... but without shoving a HUGE WARNING about that

anyway yeah it's past time for freebasic to properly fix their "field" to actually work.
welcome to OOP, years ago now...
Post Reply