glGenBuffers(NUM_BUFFERS, sfm->buffers);
//vertex
glBindBuffer(GL_ARRAY_BUFFER, sfm->buffers[VERTICES]);
glBufferData(GL_ARRAY_BUFFER, sfm->numOfVertexes*sizeof(float)*FLOATS_PER_VERTEX, sfm->verte, GL_STATIC_DRAW);
glVertexPointer(3,GL_FLOAT,0,BUFFER_OFFSET(0));
glEnableClientState(GL_VERTEX_ARRAY);
//normals
glBindBuffer(GL_ARRAY_BUFFER, sfm->buffers[NORMALS]);
glBufferData(GL_ARRAY_BUFFER, sfm->numOfNormals*sizeof(float)*FLOATS_PER_NORMAL, sfm->normals, GL_STATIC_DRAW);
glNormalPointer(GL_FLOAT,0,BUFFER_OFFSET(0));
glEnableClientState(GL_NORMAL_ARRAY);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, sfm->buffers[INDICES]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER,sfm->numOfIndices*sizeof(int) ,sfm->indices, GL_STATIC_DRAW);
but I found a "half-problem", I was searching and found the function "glTexCoordPointer" which I can use to add to my VBO the texture coordinates with some more functions like in the code above, the problem here is that I can't find any functions that change my texture, sometimes I might want to use a different texture in some of parts of my mesh.
I call this a "half-problem" because I think I can create a very big texture for the whole mesh, but I would like to know if there is a way to change my texture when I'm drawing the mesh, is it possible or do I have to use the giant texture idea?