CzAN Read more...

Warp3D V4 will have a concept borrowed from OpenGL (and D3D, to some extend) called
vertex arrays. You can have your vertex data in memory and just pass the pointers to
that memory to Warp3D. The layout is not fixed here, e.g. you are not tied to
the W3D_Vertex structures anymore. You can have separate arrays for geometrical
coordinates (x, y, z), texture coordinate (u, v, w), and color. To keep it more
flexible, you can give a "stride" for each array, meaning the distance between two
adjacent array elements. The data is drawn with a call to either W3D_DrawArray
(which draws a range of array elements), and W3D_DrawElements (which draws array
elements selected by a separate index array). If you know OpenGL, this is something
like glDrawArrays or glDrawElements, although it's of course not the same (Warp3D
still doesn't have a pipeline).

The essence of these functions is the low overhead for painting a lot of triangles.
Some time ago, somebody asked if such a functionality wouldn't be a good idea,
and at that time, I thought that the function call itself would be negligible.
It turned out it's not if you are doing it more than 3000 times per frame. Plus,
the vertex arrays do not need copying of vertex data from internal (application)
data structures to W3D_Triangle structures. All in all, it's about a speedup
of 70 up to 80 % (I measured that in Shogo).

The second new feature is backface culling. There's a new state W3D_CULLFACE that
will enable or disable backface culling, and you can use the new function
W3D_SetFrontFace to determine the direction of front-facing polygons. Some chips
(including Voodoo 3 and Permedia 2) support this in hardware.

We are also thinking about implementing multitexturing in V4, but I guess this will
postponed until 4.1 or 4.2, as the Voodoo is right now the only chip capable
of doing this.