---
name: "al_get_opengl_fbo"
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_opengl_fbo"
---

# al\_get\_opengl\_fbo(3)

Allegro 5 API

## NAME

al\_get\_opengl\_fbo - Allegro 5 API

## SYNOPSIS

-

  ```
  #include <allegro5/allegro_opengl.h>
  GLuint al_get_opengl_fbo(ALLEGRO_BITMAP *bitmap)
  ```

## DESCRIPTION

Returns the OpenGL FBO id internally used by the given bitmap if it uses one, otherwise returns zero. No attempt will be made to create an FBO if the bitmap is not owned by the current display.

The FBO returned by this function will only be freed when the bitmap is destroyed, or if you call [al\_remove\_opengl\_fbo(3)](/al_remove_opengl_fbo/3.md) on the bitmap.

*Note:* In Allegro 5.0.0 this function only returned an FBO which had previously been created by calling [al\_set\_target\_bitmap(3)](/al_set_target_bitmap/3.md). It would not attempt to create an FBO itself. This has since been changed.

## SEE ALSO

[al\_remove\_opengl\_fbo(3)](/al_remove_opengl_fbo/3.md), [al\_set\_target\_bitmap(3)](/al_set_target_bitmap/3.md)
