toNative method

  1. @override
Pointer<NativeDirect3DSurfaceDescription> toNative({
  1. Allocator allocator = malloc,
})

Copy the T to unmanaged memory and return a pointer to the memory location.

It is the caller's responsibility to free the memory at the pointer location, for example by calling calloc's free method.

Implementation

@override
Pointer<NativeDirect3DSurfaceDescription> toNative(
    {Allocator allocator = malloc}) {
  final nativeStructPtr = allocator<NativeDirect3DSurfaceDescription>();
  nativeStructPtr.ref
    ..width = width
    ..height = height
    ..format = format.value
    ..multisampleDescription =
        multisampleDescription.toNative(allocator: allocator).ref;
  return nativeStructPtr;
}