AL_SET_NEW_BITMAP_SAMPLES(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– 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