gpu_get_tex_max_mip


描述

With this function you can get the currently set maximum mipmap level which is to be used, where a value of 0 is the highest resolution, 1 is to use the first mipmap, 2 is the second etc... Note that this can be quite useful for avoiding bleeding artifacts when rendering textures, for example, setting the texture page border to 8px and then setting the max mipmap level to 3 will ensure you don't get any bleeding problems at greater render distances.


语法:

gpu_get_tex_max_mip();


返回:

Real (default: 16)


例如:

if gpu_get_tex_max_mip() != 4
    {
    gpu_set_tex_max_mip(4);
    }

The above code will check the current maximum mipmap level and if it is not 4 it is set to 4.