Search code examples
c++allegro5

Allegro defining pixel color


How to define if for example a (100 , 100) pixel on the screen which I have created using Allegro function ALLEGRO_DISPLAY *display=al_create_display(660, 660); is red or no . How can I get the pixel's rgb properties with Allegro ?


Solution

  • I think you can get the backbuffer with

    ALLEGRO_BITMAP* bitmap = al_get_backbuffer(display)
    

    Combine that with what you have questioned in: Checking pixel color Allegro 5 C++