Hi all,
I just wan to know is there any problem in my programming on OS 10.5 Mac
I have loaded a 3ds file with 3dsloader
I put all the vertices, texcoord, and indices in 3 separate array which is big enough.
As I know, the 3ds file have 33 object.
Each object, having it vertices, texcoord, & indices list.
After all of that, I bind the 3 separate array into VBO.
and now i need to draw the VBO with 33 different texture. (means 1 texture per object)
How should I do it…?
The immediate mode is working… but slow
now i using glArrayElement, but i think thats not VBO.
for(int o_index = 0; o_index<33; o_index++){
glBindTexture(GL_TEXTURE_2D, object.objects_type[o_index].id_texture);
glBegin(GL_TRIANGLES);
for(GLint i = p_count[o_index]*3; i< p_count[o_index+1]*3; i++)
//if(indices_VBO[i] >= v_count[0] && indices_VBO[i] <= v_count[33])
glArrayElement(indices_VBO[i]);
glEnd();
}
… If you look closely, the code is actually “glDrawRangeElements”