al_get_opengl_texture

GLuint al_get_opengl_texture(ALLEGRO_BITMAP *bitmap)
Introduced in 5.0.0

Returns the OpenGL texture id internally used by the given bitmap if it uses one, else 0.

Example:

bitmap = al_load_bitmap("my_texture.png");
texture = al_get_opengl_texture(bitmap);
if (texture != 0)
    glBindTexture(GL_TEXTURE_2D, texture);

Examples: ex_gldepth, ex_opengl_pixel_shader


Most helpful discussions:

Other recent discussions: