geting Polys From Q2 Faces
Hi ive been trying to get my program to load up quake 2 bsp files (the maps) but after i have extracted the face information then obtained the relevant vertex co-ords for the Edges that make up the face i am unsure what to do with them next. here is a example of the first face
Face Lump - First Face
Plane - 682
Plane Side - 1
First Edge - 0
num Edges - 6
testure Info - 2
Lightmap styles[] - 0,255,255,255
Lightmap Offset - 0
Now ive interpreted it as saying - I have a face which has 6 edges contained consecutively in the face edge lump(starting @ 0). Now after ive been through the rigmaral of extracting the vertex inf by then going into the edge lump then into the vertex lump when i try to reconstruct them i get some right blx of results.
here are the co-ords im geting from the vertex lump for the edges that make up the face above.
0,0,0
240,0,-192
240,0,-192
16,0,-192
16,0,-192
16,0-192
16,0,-92
16,0-112
16,0,-112
16,0-112
16,0,-50
16,0-112
now im guessing (well ive tried) the u carnt just put these points stright into a api draw routine like eg
glBegin(GL_POLYGON) and xpect it to draw the corect shape. Now what im wondering which points of the above set of vertecies im expected to use to constuct the face bearing in mind that a 6 edged figure ie hexagon, only requires 6 vertices. SO PLz help me !!!! even if u just have a theory post it as a reply.
Thnx
ZSL
~prevail by daring to fail~
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement