switch_default_blendmode(3)
π 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 π
- Specifying an invalid value for
modeis 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
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms