Annotation Interface GpuStruct
Marks a record as a GPU struct, triggering compile-time generation of a
*_NativeStruct class that provides reflection-free StructLayout
registration for all platforms (desktop, web/TeaVM, mobile).
The annotation processor computes field offsets, sizes, and alignment
for each requested LayoutMode and generates direct-access write
methods — no MethodHandle or reflection at runtime.
Usage:
@GpuStruct
public record CameraParams(Mat4 viewProjection, Vec3 position, float near, float far) {}
At startup, call the generated GeneratedLayouts.init() or let
StructLayout.of(Class) auto-discover the generated class via Class.forName().