al_set_current_opengl_context
void al_set_current_opengl_context(ALLEGRO_DISPLAY *display)
Introduced in 5.0.0
Make the OpenGL context associated with the given display current for the calling thread. If there is a current target bitmap which belongs to a different OpenGL context, the target bitmap will be changed to NULL.
Normally you do not need to use this function, as the context will be made current when you call al_set_target_bitmap or al_set_target_backbuffer. You might need if it you created an OpenGL "forward compatible" context. Then al_get_backbuffer only returns NULL, so it would not work to pass that to al_set_target_bitmap.
Most helpful discussions:
- Allegro5 and OpenGL. Problem with drawing Allegro primitives
- A segfault for libmpv
- ALLEGRO_OPENGL_MAJOR_VERSION and ALLEGRO_OPENGL_MINOR_VERSION
- Setup OpenGL version
- Learn OpenGL
- Allegro 5 + OpenGL setup
- [Allegro 5.0.8] glGenBuffers not initialized? (Allegro noob)
- Allegro and OpenGL fullscreen problem
- AL5 + OpenGL - al_draw_text not working?
- Allegro + OpenGL
Other recent discussions: