_putpixel(3)
β¨ _putpixel π (Allegro manual, bestie)
okay so we're in the Allegro game programming library, and this is the speedrun version of putpixel(). πβοΈπ¨
π NAME π
_putpixel, _putpixel15, _putpixel16, _putpixel24, _putpixel32 β the faster, depth-specific versions of putpixel(). Allegro game programming library, periodt. π
πΈ 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 like, it's putpixel() but much faster β¨ and the reason is genuinely iconic: these are implemented as inline assembler functions written for specific color depths. that's the whole glow-up. π
but bestie, listen, there are three things you need to know before you go feral with these:
- they won't work in mode-X graphics modes π
- they don't perform any clipping β and no cap, they will crash if you try to draw outside the bitmap! π so vibe check your coordinates, fr fr
- they ignore the drawing mode π
use these when you already know exactly what you're doing and you need that speed. otherwise the regular putpixel() is right there. π«Ά
π¦ SEE ALSO π¦
that's the whole page, bestie! π this one's from the Allegro manual, version 4.4.3 β _putpixel(3), slay, mwah ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms