How to use GL_REPEAT to repeat only a selection of a texture atlas? (OpenGL)
问题 How can I repeat a selection of a texture atlas? For example, my sprite (selection) is within the texture coordinates: GLfloat textureCoords[]= { .1f, .1f, .3f, .1f, .1f, .3f, .3f, .3f }; Then I want to repeat that sprite N times to a triangle strip (or quad) defined by: GLfloat vertices[]= { -100.f, -100.f, 100.f, -100.f, -100.f, 100.f, 100.f, 100.f }; I know it has something to do with GL_REPEAT and textureCoords going passed the range [0,1] . This however, doesn't work: (trying to repeat N