rendering obj (wavefront) files the fast way!??

Started by
-1 comments, last by orenk2k 21 years, 10 months ago
hi i wonder how can we render obj file format in directX? --------------------------------------------------- for those who don''t so familiar with that format, lets say we have 3 arrays (simple obj): 1. vertex array - regular x,y,z 2. tex coords array - 3 coords x,y,z (not 2 u,v) 3. faces array - depending on the data, in our data it will contain 3 elements (triangles) with 2 indices in each, the first vertex index and the second tex coord index for that vertex. simple example: v 0.0 10.0 0.0 - v says its a vertex vt 1.0 0.0 0.0 - vt says its tex coord f 1/8 3/9 2/10 - f says its a face indices, note that it contain two indices in each element, first for vert & sec for texcoord NOTE: the texcoords array could be bigger then the vertices! and thats where''s the big problem. because i can have 1 vertex with 2 diffrent U,V''s, vertex array doens''t helps so much. so now that i explain the data struct'' HOW DO I RENDER THIS IN DIRECT-X WITHOUT PREPARING EACH FACE IN A SMALL ARRAY AND THEN RENDER IT??? thanks!
orenk2k

This topic is closed to new replies.

Advertisement