switch_default_texfilter(3)
π switch_default_texfilter(3) β Arcan Lua API, bestie edition
okay so real talk, this one's from the Arcan Lua API manual and it's literally about setting the vibe for every texture you're about to make. slay.
β¨ NAME β¨
switch_default_texfilter β switches the default texture filtering mode for all newly created objects. that's it, that's the girlboss job. no cap. π
πΈ SYNOPSIS πΈ
nil
switch_default_texfilter( filtermode )
π¦ DESCRIPTION π¦
so this function is lowkey a little picky about what you feed it β it accepts FILTER_NONE, FILTER_LINEAR, FILTER_BILINEAR and FILTER_TRILINEAR, which are texture post-processing stages usually supported in-hardware. iconic, right? π
the tea though: anything else would have to be implemented as temporary rendertargets with appropriate shaders. so like, the fancy options aren't just lying around for free β someone's gotta build them. iykyk π
β NOTES β
- any value to filtermode outside the accepted values is a terminal state transition. (yes bestie, terminal. like that terminal. do not pass go, do not collect $200 ππ)
π EXAMPLE π
function switch_default_texfilter0()
switch_default_texfilter(FILTER_NONE);
a = load_image("test.png");
show_image(a);
scale_image(a, 1.25, 1.25);
switch default_texfilter(FILTER_TRILINEAR);
b = load_image("test.png");
show_image(b);
scale_image(b, 1.25, 1.25);
local props = image_surface_properties(a);
move_image(b, 0, props.height);
end
look at her go β two images, two different filters, one stacked politely under the other. main character energy fr fr π«Άβ¨
π MISUSE π
this one's the "none but as a string" moment. the audacity.
function switch_default_texfilter0()
switch_default_texfilter("none");
end
π₯ MISUSE π₯
and this one's just out here sending 1000 into the void, as if that's a filter mode. ma'am.
function switch_default_texfilter1()
switch_default_texfilter(1000);
end
β οΈ reminder bestie: those two? both are terminal state transitions. the NOTES section was not playing around. do not be like these functions. π¨
π§ SEE ALSO π§
(nothing else listed in this one β she stands alone, periodt π)
okay that's the whole page! this lil' gem comes courtesy of vidsys, dated October 2026 β mwah, thanks for the docs, and go filter some textures responsibly ππβ¨
π¦ 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