---
name: "al_get_default_shader_source"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_get_default_shader_source"
---

# al\_get\_default\_shader\_source(3)

Allegro 5 API

## NAME

al\_get\_default\_shader\_source - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro.h>
  char const *al_get_default_shader_source(ALLEGRO_SHADER_PLATFORM platform,
     ALLEGRO_SHADER_TYPE type)
  ```

## DESCRIPTION

Returns a string containing the source code to Allegro’s default vertex or pixel shader appropriate for the passed platform. The ALLEGRO\_SHADER\_AUTO value means GLSL is used if OpenGL is being used otherwise HLSL. ALLEGRO\_SHADER\_AUTO requires that there is a current display set on the calling thread. This function can return NULL if Allegro was built without support for shaders of the selected platform.

## SINCE

5\.1.6

## SEE ALSO

[al\_attach\_shader\_source(3)](/al_attach_shader_source/3.md)
