fromValue static method

RlShaderType fromValue(
  1. int value
)

Returns the RlShaderType for the given native value.

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

Implementation

static RlShaderType fromValue(int value) => switch (value) {
  0x8B30 => RL_FRAGMENT_SHADER,
  0x8B31 => RL_VERTEX_SHADER,
  0x91B9 => RL_COMPUTE_SHADER,
  _ => throw ArgumentError('Unknown value for $RlShaderType: $value'),
};