I am facing issues with texture wrapping. which is causing artifacts. Since my codebase has grown huge the only way that I can think of is to perform certain checks to see if certain textures fall under the category which are causing artifacts and change the parameters before drawing onto the renderbuffer.
So is it generally ok? to set parameters like
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
after glBindTexture during render loop? or would it effect FPS as it would increase operations during each render frame?
Changing texture parameters usually doesn’t have a too serious impact on performance, as it leaves caches intact and only changes the access pattern.
However in later versions of OpenGL for this very specific usage scenario “Sampler Objects” have been introduced. I think you might want to have a look at them.