mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
Every texture object started from the shared defaults, which are the 2D ones: TEXTURE_MIN_FILTER of NEAREST_MIPMAP_LINEAR and TEXTURE_WRAP_S/T of REPEAT. A rectangle texture has no mip chain at all, so GL gives it a different initial state - LINEAR and CLAMP_TO_EDGE (GL 4.6 core table 23.15) - and a mipmapped minification filter is not even a legal value to set on one. With the 2D default in place a rectangle texture was mipmap-incomplete the moment it was created, and an application that (correctly) never touches the filters read (0, 0, 0, 1) out of every lookup. That is what the eleven KHR-GL40.texture_gather.*-2drect cases saw: they set only the wrap modes, because the filters are already what a rectangle texture needs.