[fpc-pascal] GLM library alternative?

Benjamin Rosseaux benjamin at rosseaux.com
Sun May 28 08:54:42 CEST 2017


I've put some units of my still work-in-progress UE4-style SupraEngine on
my root server, after I've read this mailing list thread =>

http://rootserver.rosseaux.net/stuff/supraengineunits/

where the SupraEngine.Math.pas + SupraEngine.Math.*.inc +
SupraEngine.Types.Standard.pas will be maybe interesting for you.

It's a complete 3D Math unit based on overloaded operators, advanced
records, etc. and even with GLSL-style swizzle support, where you can type
something like My3DVector.xzy := MyOther3DVector.yyx; My4DVector.zyx :=
TVector3.Create(3.0, 2.0, 1.0); or even My2DVector.yx := My3DVector.yz; etc.

Furthermore many routines are SSE optimized for the x86-32 and x86-64
targets.

This is the result of many years of evolution-based work, starting from the
original math routines of my old PAPPE physics engine, which I've always
further developed over the years (incl. many refactorings and rewrites).

And if you will do using it, then you add the following line to your start
of your code (where the Math unit must be in the uses clause):

SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow,
exUnderflow, exPrecision]);

for disable some floating point exceptions, which could occur at 3D stuff,
especially divide-by-zero exceptions at speed-SIMD-optimized normalization
operations.

And credits would be nice :)

Regards,
Benjamin 'BeRo' Rosseaux


On Sat, May 27, 2017 at 12:37 PM, Ryan Joseph <ryan at thealchemistguild.com>
wrote:

>
> > On May 27, 2017, at 5:16 PM, Mark Morgan Lloyd <
> markMLl.fpc-pascal at telemetry.co.uk> wrote:
> >
> > But working from a hazy recollection of such things, it's possible to
> merge the translation/rotation matrices so that the final transformation
> can be reduced to a single operation.
>
> Oh I’m sorry, I’m using 3.x core and the fixed pipeline has been removed
> which glRotate etc… were part of. I’m using this now but I wanted to learn
> the “new” stuff some.
>
> Regards,
>         Ryan Joseph
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170528/bd578100/attachment.html>


More information about the fpc-pascal mailing list