natiny_backend_get_name

C
const char* natiny_backend_get_name(int backend);

Returns the display name for a backend constant, such as "Direct3D 12".

Parameters

Name Type Description
backend int One of the NATINY_BACKEND_* constants

Returns

A static string owned by the engine. Nothing to free, and it outlives natiny_backend_shutdown.

Example

C
printf("%s\n", natiny_backend_get_name(NATINY_BACKEND_D3D12));  // Direct3D 12

// AUTO names the one it would resolve to on this platform
printf("%s\n", natiny_backend_get_name(NATINY_BACKEND_AUTO));

Notes

  • Needs no initialization - it names a constant, not a running engine.
  • A backend this platform does not carry still has a name.