Pascal simply is a strongly typed language. Vector intrinsics are no
reason to weaken this. Thus you need to declare operator overloads that
hide the nitty, gritty details of assigning a TVector4 to a __m128, e.g.:
type
TVector4 = packed record
X, Y, Z, W: Single;
class operator := (const aArg: TVector4): __m128;
class operator := (const aArg: __m128): TVector4;
end;
Regards,
Sven
That's true - I'm still learning when an implicit typecast is valid and
when it isn't. In the above example, __m128(some_TVector4_type), is
usually valid because the alignments and memory are the same.
Internally though, the __m128 types are broken in a few places.
Gareth aka. Kit
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel