Way to turn off mip-mapping using GLSL?

Just wondering if there’s a way to turn off mip-mapping using a 2D filter. Seems like it should be just a function to set the mip-mapping for all textures (I know that you can do it using Blender’s User Preferences menu, but that won’t hold through to an executable, and I want to do so in an executable without using a batch file).

logically gl_fragColor = textureLod(tex,coord,0) but for me that doesn´t seem to work

EDIT: …on mac

hm, ok. Somehow, on another computer it works. But the console says something is required as version 130


""" Sets a texture """

import GameLogic 

c = GameLogic.getCurrentController()
o = c.owner


VERT = """

void main()
{
    gl_Position = ftransform();
    gl_TexCoord[0] = gl_MultiTexCoord0; // <- vec4()
}

"""



FRAG = """

uniform sampler2D twoDtex;

void main()
{
gl_FragColor = textureLod(twoDtex,gl_TexCoord[0].st,0.0);    
}


"""



def setUniforms(shader):
    shader.setSampler('twoDtex', 0)


def installShader(obj, vert, frag, apply):
    mesh = obj.meshes[0]
    if mesh != None:
        mat = mesh.materials[0]    
        if not hasattr(mat, 'getMaterialIndex'):
            return             
        shader = mat.getShader()
        if shader != None:
            if not shader.isValid():
                shader.setSource(vert, frag, apply)
                
            setUniforms(shader)    


installShader(o, VERT, FRAG, 1)

EDIT: “texture2DLod” works without a problem here.

does that work for you?

Sorry, never got around to checking this out - I’ll try it today.

Tried out the code, but there was an error. TextureLOD isn’t present (or that function the way it is; perhaps you need to change the arguments) on my computer.

And texture2DLod?

Ah, I never got around to checking the answer on this for some reason… I’ll try out texture2DLod.