Is it wrong to set glTexParameteri () during rendering?

I ran into problems with texture packaging. which causes artifacts. As my code base has become huge, the only way I can imagine is to perform certain checks to determine if certain textures fall into the category causing artifacts and change the settings before drawing to renderbuffer.

So is that normal at all? to set options such as

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 the render cycle? or will it affect FPS as it will increase operations during each rendering frame?

+5
source share
2 answers

, , , .

OpenGL "Sampler Objects". , , , .

+8

: , .

, , . , .

, , , . , , , .

:

-. , , - , , . , .

+3

All Articles