I know it is very basic question but I have array of vertices and texture coordinates and corresponding buffers:
glBindBuffer(GL_ARRAY_BUFFER,vertexbuffer);
glBufferData(GL_ARRAY_BUFFER,sizeof(float)*Loader.verticesFixed.size(),&Loader.verticesFixed[0],GL_STATIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER,texturebuffer);
glBufferData(GL_ARRAY_BUFFER,sizeof(float)*Loader.texturesFixed.size(),&Loader.texturesFixed[0],GL_STATIC_DRAW);
and I wonder how to send data for rendering.
I know that I can merge array of vertices and textures so that I have one array that has x1,y1,z1,u1,v1,x2,y2,z2,u2,v2... then create buffer for this array, bind it and use glVertexAttribPointer with particular stride and offset and attributes 0 and 1 for vertices and texture coordinates and glDrawArrays. However I wonder if it is possible to send data from multiple buffers without merging arrays.
I am asking this because I want to add textures to 3d model and if I understood everything correctly to do it efficiently I need to send data to shader using glVertexAttribPointer with different indices (locations) together with uniform texture.
glBufferDataor byglMapBuffer'ing the GL buffer.