al_get_opengl_fbo(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… al_get_opengl_fbo β€” Allegro 5 API

okay bestie, welcome to al_get_opengl_fbo from the allegro5 manual πŸ’– this one's a lil OpenGL-adjacent cutie and she's actually pretty chill, let's get into it.


✨ SYNOPSIS ✨

#include <allegro5/allegro_opengl.h>

GLuint al_get_opengl_fbo(ALLEGRO_BITMAP *bitmap)

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, this function hands you back the OpenGL FBO id that the given bitmap is using internally β€” if it's using one. If it's not, you just get zero. That's it, that's the whole vibe.

⚠️ real talk though: it will not try to create an FBO for you if the bitmap isn't owned by the current display. No attempt, none, zero effort, she's not doing that πŸ’€

And here's the important part about ownership β€” the FBO this function returns only gets freed when the bitmap itself is destroyed, or if you call al_remove_opengl_fbo(3alleg5) on that bitmap. So like, it's not going anywhere until one of those two things happens, fr fr.

πŸ“ Note: back in Allegro 5.0.0, this function would only return an FBO that had already been created by calling al_set_target_bitmap(3alleg5). It would not attempt to create an FBO itself. That has since been changed, bestie β€” glow up achieved ✨

🌈 SEE ALSO 🌈


and that's the whole page, no cap 🫢 this was pulled straight from the Allegro reference manual β€” al_get_opengl_fbo(3alleg5), periodt πŸ’œ go forth and query your FBOs responsibly, queen πŸ‘‘

πŸ“¦ where this page comes from