switch_default_blendmode(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… switch_default_blendmode(3) πŸ’…

hey bestie πŸ’– welcome to the switch_default_blendmode(3) page from the Arcan Lua API. this one is short, but it’s giving very specific default-blending energy, so let’s get into it.


✨ NAME ✨

  • switch_default_blendmode β€” changes the blend operation that’s set as the default on all new objects. no cap.

🩷 SYNOPSIS 🩷

it returns nil, and it takes an int:mode:

nil
switch_default_blendmode( int:mode )

🌸 DESCRIPTION 🌸

okay so here’s the lore 😭: because of legacy stuff and scripts that depend on behaviour that’s now known to be buggy, the default blending mode is set to BLEND_FORCE. that means regardless of object opacity, everything will be drawn with blending enabled. it’s giving β€œblend first, ask questions later.”

this might be less performant on some GPUs when compared to the option of disabling blending for objects that are fully opaque and have no alpha channel. that option is referred to as BLEND_NORMAL. iconic distinction, honestly.

this function can be used to indicate that the script knows about the distinction, or that it has other blending needs where a lot of force_image_blend calls can be avoided by changing the default to some other mode. slay ✨


πŸ’€ NOTES πŸ’€

  1. Specifying an invalid value for mode is a terminal state transition. like, not a vibe check you fail and move on β€” terminal state transition. πŸ’€

πŸŽ€ EXAMPLE πŸŽ€

example time, bestie 🫢:

function switch_default_blendmode0()
      switch_default_blendmode(BLEND_NORMAL)
end

that’s it. that’s the example. short and sweet πŸ“


πŸ‘€ SEE ALSO: πŸ‘€

  • vidsys β€” the only see-also bestie on this page.

mwah πŸ’‹ β€” page sourced from vidsys, dated October 2026, and it’s switch_default_blendmode(3). periodt. πŸ‘‘

πŸ“¦ where this page comes from