I have a texture I read in which I do not want filtered. The reason is that it represents very discrete data about a real-world scenario, and I need the edge between colors to be abrupt. When reading in the texture, my code includes:
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
However, when I look at my image it is still very roughly filtered. The filter is only in one axis direction; the other is not filtered. The difference is very stark between using GL_LINEAR and GL_NEAREST, but GL_NEAREST still applies some filter which I can’t seem to turn off.
I am very new at opengl coding, so excuse my lack of useful terminology.