Is it posible to define quads in the egg files? Or do they only support 's ?
A with four vertices is a quad. When it gets loaded into Panda, however, it will be subdivided into two triangles.
btw wouldnt it be more efficient to draw higher level faces if possible? Should take about half the time of calculating 2 triangles right?
No, actually, it’s not. Triangles are the most efficient to draw. For one thing, they’re unambiguous to texture, whereas quads can be ambiguous depending on how the UV coords are laid out; so the graphics hardware will automatically subdivide a quad into triangles anyway.
Furthermore, Panda can automatically collect adjacent triangles into triangle strips. Two side-by-side triangles in a triangle strip requires four vertices–exactly the same as one quad. Four side-by-side triangles in a triangle strip requires five vertices–three less than two independent quads, and exactly the same as two quads in a quadstrip. In general, a triangle strip requires sending exactly the same number of vertices as the equivalent quadstrip, and fewer vertices than the equivalent set of independent quads.
So there’s no advantage to sending quads of any kind when you can send triangle strips.
However, on modern PC hardware, even sending triangle strips is passÃ©, since the graphics card will cache recently-seen vertices anyway. So if you send consecutive independent triangles, in triangle-strip order, it generally renders at least as quickly as if you had sent triangle strips, and sometimes it renders faster, especially because it is possible to send many thousands of triangles in one batch.
Panda makes an automatic decision to group triangles into triangle strips when it will be most effective to do so, and to send them as independent triangles when triangle strips are not helpful.
That was a good brush up on my knowledge