_putpixel(3alleg4)
β¨ NAME β¨
_putpixel, _putpixel15, _putpixel16, _putpixel24, _putpixel32 β okay so basically these are the faster, depth-specific versions of putpixel() π
and they live in the Allegro game programming library π
π SYNOPSIS π
#include <allegro.h>
void _putpixel(BITMAP *bmp, int x, int y, int color);
void _putpixel15(BITMAP *bmp, int x, int y, int color);
void _putpixel16(BITMAP *bmp, int x, int y, int color);
void _putpixel24(BITMAP *bmp, int x, int y, int color);
void _putpixel32(BITMAP *bmp, int x, int y, int color);
π DESCRIPTION π
So they do the same lil thing as the regular putpixel() bestie, but way faster β‘ because each one is implemented as an inline assembler function tuned for one specific color depth. That's the whole glow-up.
Now the receipts, because these are not for the faint of heart π:
- They will not work in mode-X graphics modes β not a vibe, just a fact, periodt.
- They do zero clipping. Like none. Not even a little. They will crash if you try to draw outside the bitmap π so stay in your lane with the coordinates, fr fr.
- They ignore the drawing mode entirely. The drawing mode? Never heard of her. π
No cap: these are fast because they skip all the safety rails. If you need the rails, use the regular putpixel().
π SEE ALSO π
That's the whole page bestie, you ate π«Ά This was the 3alleg4 manual, Allegro version 4.4.3 β mwah, slay, go draw some pixels responsibly β¨ππ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms