Here is the code I think I’m goofing up.
for(int z=0; z<bsp_numverts; ++z)
{
vertexArray[z*3+0] = bsp_verts[z].v_point.x;
vertexArray[z*3+1] = bsp_verts[z].v_point.y;
vertexArray[z*3+2] = bsp_verts[z].v_point.z;
glClientActiveTextureARB(GL_TEXTURE0_ARB);
texArray[z*2+0] = bsp_verts[z].tex_st.u;
texArray[z*2+1] = bsp_verts[z].tex_st.v;
glClientActiveTextureARB(GL_TEXTURE1_ARB);
texArray2[z*2+0] = bsp_verts[z].lm_st.u;
texArray2[z*2+1] = bsp_verts[z].lm_st.v;
}
glVertexPointer(3, GL_FLOAT, 0, vertexArray);
glTexCoordPointer(2, GL_FLOAT, 0, texArray);
glTexCoordPointer(2, GL_FLOAT, 0, texArray2);
What that code does is:
While(we still have vertexes)
{
put the vertexes into an array
change to texture0
put the texture coords into array1
change to texture1
put the texture coords into array2
}
glVertexPointer(3, GL_FLOAT, 0,array);
glTexCoordPointer(2, GL_FLOAT, 0, array1);
glTexCoordPointer(2, GL_FLOAT, 0,Array2);
All I want to do is to beable to be using multi texturing in vertex arrays. The thing that goofed this thing up is when I started assigning these two sets of texture coords. Anyone know what I’m doing wrong?