Disable bilinear filtering [solved]

Hey there,

how can I disable bilinear filtering (blurring) when drawing an image or texture bigger as is is?

I read that I should use

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);

but it has no effect.

Thanks,
Deborah

Hi,

You should be able to use ofTexture::setTextureMinMagFilter(GLint minFilter, GLint magFilter) with GL_NEAREST to do that, it’ll bind the texture, set the parameters and unbind it for you.

awesome, thank you!