gamnit :: Texture :: pixelated=
# Should this texture be drawn pixelated when magnified? otherwise it is interpolated
#
# This setting affects all the textures based on the same pixel data, or `root`.
#
# Must be set after a successful call to `load`.
fun pixelated=(pixelated: Bool)
do
if root.gl_texture == -1 then return
# TODO do not modify `root` by using *sampler objects* in glesv3
glBindTexture(gl_TEXTURE_2D, root.gl_texture)
var param = if pixelated then gl_NEAREST else gl_LINEAR
glTexParameteri(gl_TEXTURE_2D, gl_TEXTURE_MAG_FILTER, param)
end
lib/gamnit/textures.nit:98,2--112,4