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:
- Allegro 5 OpenGL depth test problem (1)
- OpenGL Texture Shader (1)
- projectile physics (1)
- Alpha blending a triangle with a textured triangle in openGL (1)
- [A5] Bitmaps to OpenGL textures (1)
- Allegro and OpenGL Drawing Problem
- Setting up projection and camera matrices correctly for bitmaps in 3D
- Mixing Allegro 5 with OPENGL
- How do I create a 1D Texture using Allegro?
- Problem: Allegro 5 & Opengl text drawing
Other recent discussions:
- [A5] Sending Two Allegro Bitmaps to a GLSL Fragment/Pixel Shader
- How do you render a certain area of a bitmap using OpenGL and Allegro 5?
- Should Allegro on OpenGL in Windows's cpu be fluctuating?
- [glsl]Using pixel shader with backbuffer
- too slow.
- Setting a glsl shader attribute
- al_get_opengl_texture
- Weird behavior with Allegro5 and openGL
- [A5] Getting al_convert_mask_to_alpha to work with OpenGL
- Making 2.5D / 3D elements with Allegro 5?