title: Why isn't this texture repeating in iOS OpenGL ES 2.0?
body: <p>I have a class which renders a textured 2D shape onto the screen in iOS. If I use texture coordinates less than 1.0, the texture scales appropriately to match the coordinates. However, if I use texture coordinates of more than 1.0, the texture scales correctly, but doesn't repeat itself as I expected. Instead, it just draws the texture once and repeats the edge pixels across the rest of the shape (I do hope that makes sense :/ )</p>
  
  <p>Is there a way to turn on Repeating Textures in OpenGL ES 2.0 with GLKit?</p>
  
  <p>The rendering function is:</p>
  
  <pre><code>-(void)render
  {
      // If we have a texture set, setup the Texture Environment Mode
      if (texture != nil) {
          self.effect.texture2d0.envMode = GLKTextureEnvModeReplace;
          self.effect.texture2d0.target = GLKTextureTarget2D;
          self.effect.texture2d0.name = texture.name;
      }
  
      // Perform any Transformations on the Sprite
      GLKMatrix4 modelViewMatrix = GLKMatrix4Multiply(
          GLKMatrix4MakeTranslation(self.position.x, self.position.y, 0.0f),
          GLKMatrix4MakeRotation(GLKMathDegreesToRadians(self.rotation), 0, 0, 1)
      );
  
      self.effect.transform.modelviewMatrix = modelViewMatrix;
  
      // Prepare to Draw
      [self.effect prepareToDraw];
  
      // Setup the Vertices
      glEnableVertexAttribArray(GLKVertexAttribPosition);
      glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, 0, self.vertices);
  
      // Setup the Texture Coordinates
      if (texture != nil) {
          glEnableVertexAttribArray(GLKVertexAttribTexCoord0);
          glVertexAttribPointer(GLKVertexAttribTexCoord0, 2, GL_FLOAT, GL_FALSE, 0, self.texCoords);
      }
  
      // Enable Alpha Blending for Transparent PNGs
      glEnable(GL_BLEND);
      glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
  
      // Draw the Triangle Strip from the Vertex Array
      glDrawArrays(GL_TRIANGLE_STRIP, 0, self.numVertices);
  
      // Disable Alpha Blending
      glDisable(GL_BLEND);
  
      // Disable Texture Environment
      if (texture != nil) {
          glDisableVertexAttribArray(GLKVertexAttribTexCoord0);
      }
  
      glDisableVertexAttribArray(GLKVertexAttribPosition);
  }
  </code></pre>