rooxue
10-30-2009, 06:44 PM
OBJ file: download the file (http://mail.qq.com/cgi-bin/ftnExs_download?k=7e386536a228c7ca437485221264041a 0d5903010454000015015d5306490201595a48540050011800 5d570e575107570008525034763652594a02594d08536a5b57 0959464a59575238&t=exs_ftn_download&code=88e64d65)
"0.1 0.2 0.3" after the 1st "v" is the xyz position for the first vertex, and the numbers "0.8 0.8 0.8" after the 1st "vc" is its RGB color. Similarly, three integers after the 1st "f" are vertex indices for the first face.
when I use
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glVertexPointer(3,GL_FLOAT,0,vertex);
glColorPointer(3,GL_FLOAT,0,color);
glDrawElements(GL_TRIANGLES,3*NUMTRIANGLES,GL_UNSI GNED_SHORT,index);
in VC6,it collapsed,
how can I draw this obj file?Thanks
"0.1 0.2 0.3" after the 1st "v" is the xyz position for the first vertex, and the numbers "0.8 0.8 0.8" after the 1st "vc" is its RGB color. Similarly, three integers after the 1st "f" are vertex indices for the first face.
when I use
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
glVertexPointer(3,GL_FLOAT,0,vertex);
glColorPointer(3,GL_FLOAT,0,color);
glDrawElements(GL_TRIANGLES,3*NUMTRIANGLES,GL_UNSI GNED_SHORT,index);
in VC6,it collapsed,
how can I draw this obj file?Thanks