title: VBO texturing don't work correctly LWJGL
body: <p>I try to use VBO to render my 3d objects.</p>
  
  <p>I've created this class :</p>
  
  <pre><code>public class Object3DTexturedRendered {
  
  private TextureRendered texture;
  private int vboId = 0;
  private int vboiId = 0;
  private int vbotId = 0;
  private int verticesTexCoords[][];
  private int verticesIndex[];
  private FloatBuffer verticesBuffer;
  private FloatBuffer texturesBuffer;
  private IntBuffer indexBuffer;
  
  public Object3DTexturedRendered() {
  
  }
  
  public Object3DTexturedRendered(TextureRendered _texture) {
      texture = _texture;
  }
  
  public void renderVBO() {
      glEnable(GL_TEXTURE_2D);
  
      if (texture.getTexture() != null) {
          texture.getTexture().bind();
      }
  
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vboId);
      glVertexPointer(3, GL_FLOAT, 0, 0L);
  
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbotId);
      glTexCoordPointer(2, GL_FLOAT, 0, 0L);
  
      glEnableClientState(GL_VERTEX_ARRAY);
      glEnableClientState(GL_TEXTURE_COORD_ARRAY);
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, vboiId);
      glDrawRangeElements(GL_TRIANGLES, 0, (verticesIndex.length - 1), verticesIndex.length,
                                            GL_UNSIGNED_INT, 0L);
      glDisableClientState(GL_TEXTURE_COORD_ARRAY);
      glDisableClientState(GL_VERTEX_ARRAY);
  
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 0);
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
  
      glDisable(GL_TEXTURE_2D);
  }
  
  public void initRenderVBO(FloatPointRendered[] listPointsRendered, int _verticesTexCoords[][], int _verticesIndex[]) {
      verticesTexCoords = _verticesTexCoords;
      verticesIndex = _verticesIndex;
  
      verticesBuffer = BufferUtils.createFloatBuffer(verticesTexCoords.length * 3);
      texturesBuffer = BufferUtils.createFloatBuffer(verticesTexCoords.length * 2);
      for (int[] _ipoint : verticesTexCoords) {
          FloatPointRendered _point = listPointsRendered[_ipoint[0]];
          float[] uv = texture.getXYtoFloat(_ipoint[1], _ipoint[2]);
          verticesBuffer.put(_point.positionToFloatArray());
          texturesBuffer.put(uv);
      }
      verticesBuffer.flip();
      texturesBuffer.flip();
  
      indexBuffer = BufferUtils.createIntBuffer(verticesIndex.length);
      indexBuffer.put(verticesIndex);
      indexBuffer.flip();
  
      if (GLContext.getCapabilities().GL_ARB_vertex_buffer_object) {
          IntBuffer vboID = BufferUtils.createIntBuffer(3);
          ARBVertexBufferObject.glGenBuffersARB(vboID);
          vboId = vboID.get(0);
          ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vboId);
          ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, verticesBuffer, ARBVertexBufferObject.GL_STATIC_DRAW_ARB);
  
          vbotId = vboID.get(1);
          ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vbotId);
          ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, texturesBuffer, ARBVertexBufferObject.GL_STATIC_DRAW_ARB);
  
          vboiId = vboID.get(2);
          ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, vboiId);
          ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ELEMENT_ARRAY_BUFFER_ARB, indexBuffer, ARBVertexBufferObject.GL_STATIC_DRAW_ARB);
      }
  }
  </code></pre>
  
  <p>My object are all rendered correctly, but I've a problem with the texture.
  My texture are strided. Look at this image... why my texture are like that, and how I can fixe this bugs.</p>
  
  <p><a href="http://i.stack.imgur.com/wZbaI.png" rel="nofollow">battleofground.fr_game_render_error_vbo_texture.png</a></p>