Menu

#48 Split TriMesh into simple and complex cases

open
nobody
None
5
2004-03-01
2004-03-01
No

From an older bug:

-----------------------
To correctly render complex meshes, the IR TriMesh code should
handle TriMeshes with per-texture triangles (rather than only
supporting per-TriMesh textures).

It won't be possible to submit them as a vertex array, so the best
solution is probably to detect a "this is too complex to render as a
TriMesh" which breaks the TriMesh up into individual triangles.

The "this is too complex" tests should be modelled on the fast-path
tests, so we can add more tests in the future - for now, checking
for kQ3AttributeTypeSurfaceShader in the triangle attribute list
would sufice to detect this case.
-----------------------

As well as handling the above case, splitting the TriMesh code into
"simple case, passed directly to GL/D3D" and "complex case,
broken up and pushed into triangle buffer" will also help reduce the
amount of data the CPU needs to touch for the fast case.

This bug was originally intended to track per-texture triangles, but
the performance benefits from separating out the two cases would
make it worthwhile regardless.

Discussion


Log in to post a comment.