[fpc-pascal] GLM library alternative?
Anthony Walter
sysrpl at gmail.com
Mon May 29 03:24:26 CEST 2017
You might want to try using this geometry library I've written to go along
with OpenGL, fixed function or otherwise:
https://github.com/sysrpl/Bare.Game/blob/master/source/bare.geometry.pas#L317
Basic usage might be like this:
var
M: TMatrix;
V: TVertex;
begin
M.Identity;
M.Translate(10, 0, 0);
V := M * Vec(10, 10, 10);
M.Rotate(0, 10, 0);
V := M * V;
WriteLn('X: ', V.X, ' Y: ', V.Y, 'Z: ', V.Z)
M.Scale(0.5, 0.5, 0.5);
V := M * V;
WriteLn('X: ', V.X, ' Y: ', V.Y, 'Z: ', V.Z)
end;
And these matrices are compatible with OpenGL functions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170528/4aa7e9c5/attachment.html>
More information about the fpc-pascal
mailing list