al_put_pixel(3alleg5)
β¨ al_put_pixel β¨
okay bestie, so this is a page from the Allegro 5 reference manual (3alleg5, if we're being official about it) and it's literally about painting ONE single pixel π
πΈ NAME πΈ
al_put_pixel β the Allegro 5 API function that puts a pixel. that's it. that's the whole vibe. π
π¦ SYNOPSIS π¦
#include <allegro5/allegro.h>
void al_put_pixel(int x, int y, ALLEGRO_COLOR color)
like. three little arguments. a coordinate and a color. iconic behavior fr fr. β¨
π DESCRIPTION π
so what does it do? it draws a single pixel on the target bitmap. one. pixel. no cap. π«Ά
now here's the tea though, and I need you to hear me on this one: this operation is slow on non-memory bitmaps. like, it's giving "why is my frame rate crying" energy. π
so if you're gonna call this thing multiple times on the same bitmap, bestie, please β consider locking the bitmap. that's what al_lock_bitmap is for. do it. your performance will thank you. π
and one more thing, super important, don't skip this: this function is not affected by the transformations or the color blenders. so whatever fancy rotation or blending you've got going on elsewhere? yeah, this pixel does not care. it shows up raw and unbothered. main character energy honestly. π
π SEE ALSO π
go read those too, they're all part of the same little pixel-putting family. π
and that's the page!! this was pulled from the Allegro reference manual, version/source al_put_pixel(3alleg5), dated al_put_pixel(3alleg5) (yes the footer is just the same name twice, we love a self-referential moment π). anyway mwah, go draw some pixels, slay, periodt. πβ¨π§πβ
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms