AL_SET_NEW_BITMAP_SAMPLES(3)
π NAME: al_set_new_bitmap_samples β Allegro 5 API π
okay bestie, this is the Library Functions Manual page for al_set_new_bitmap_samples, and it's giving βtiny function, important vibe checkβ energy β¨
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
void al_set_new_bitmap_samples(int samples)
π¦ DESCRIPTION π¦
So this one sets the multi-sampling samples used by newly created bitmaps (on the current thread) if they are used with al_set_target_bitmap(3). No cap, that's the whole job π
0β multi-sampling will not be used when drawing into the bitmap, which is the default π«Ά1β multi-sampling will be used but only using a single sample per pixel (so usually there will be no visual difference to not using multi-sampling at all) π
π¨ Note: Some platforms have restrictions on when the multi-sampling buffer for a bitmap is realized, i.e. down-scaled back to the actual bitmap dimensions. This may only happen after a call to al_set_target_bitmap(3). So for example:
al_set_target_bitmap(multisample);
al_clear_to_color(blue);
al_draw_line(0, 0, 100, 100, red, 1);
al_lock_bitmap(multisample, ...)
// ERROR: the contents of the bitmap will be undefined
al_set_target_bitmap(backbuffer);
al_lock_bitmap(multisample, ...)
// CORRECT: at this point, the bitmap contents are updated and
// there will be an anti-aliased line in it.
π SINCE π
5.2.1 β periodt π
[Unstable API]: This is an experimental feature and currently only works for the OpenGL backend. Lowkey important, so don't forget it π§
π that's the whole vibe from the Allegro reference manual β page <pink>al_set_new...map_samples(3)</pink>, filed under Library Functions Manual. No date stamp in sight, so we're keeping it mysterious π«Άβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms