I want to change the scaling quality of an SDL2 (OpenGL) texture on the fly. I can’t use SDL_SetHint()
, because that takes effect only when the texture is created, so I’m doing this:
SDL_GL_BindTexture(texture, NULL, NULL);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
This appears to have exactly the effect I want, but I don’t know how legitimate it is. Are there any pitfalls that I need to be aware of?