VBO with multiple textures

It is possible to hold data about “what part of spritesheet i want to render” in floatbuffer? Right now i found only one way to change texture in one VBO:


glBindBuffer(GL_ARRAY_BUFFER, bufferId);
      
      glVertexPointer(3, GL_FLOAT, 5 << 2, 0); 
      glTexCoordPointer(2, GL_FLOAT, 5 << 2, 3 << 2); 
      glBindTexture(GL_TEXTURE_2D, texture.id);      
      glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
      glBindTexture(GL_TEXTURE_2D, texture2.id);
      glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);



With this, i can change texture in one VBO, but i think its wrong solution, because i lose so much fps and i must to do it for each quad. So how i can change texture in one VBO?

You cannot change texture in VBO. It buffers data that is it. You change a texture with via binding. To use say a texture atlas with vbos, you specify your texture coordinates properly.

default range is 0-1
if you want only the upper left part of an image.
glTexCoord2f(0,0)
glTexCoord2f(0,0.5)
glTexCoord2f(0.5,0.5)
glTexCoord2f(0.5,0)
So if you have an atlas you figure out the regions of each image in the atlas and plug them into your vbo as the tex coords.