fromValue static method

RlUsageHint fromValue(
  1. int value
)

Returns the RlUsageHint for the given native value.

Throws ArgumentError if value does not correspond to a known entry.

Implementation

static RlUsageHint fromValue(int value) => switch (value) {
  0x88E0 => RL_STREAM_DRAW,
  0x88E1 => RL_STREAM_READ,
  0x88E2 => RL_STREAM_COPY,
  0x88E4 => RL_STATIC_DRAW,
  0x88E5 => RL_STATIC_READ,
  0x88E6 => RL_STATIC_COPY,
  0x88E8 => RL_DYNAMIC_DRAW,
  0x88E9 => RL_DYNAMIC_READ,
  0x88EA => RL_DYNAMIC_COPY,
  _ => throw ArgumentError('Unknown value for $RlUsageHint: $value'),
};