A bit late, as usual ;-)
Because the world transformation introduced the W coordinate which cannot be passed to drawing functions. But well, this coordinate should be always be 1 after the world transformation so we can ommit it.
Well, you can pass the W coordinates using the 1/W trick, no ? If you use the XYZRHW format and give it X, Y, Z, 1/W after your computation it should work, no ? Slow but working from what I can see...
I was talking about the XYZ format. In your old code, you did only the world transformation manually, so the format is still XYZ. If the world transformation ever introduced a W value different from 1 (which should not happened because only the projection matrix must do this), we're stuck because we cannot pass this value to DrawPrimitive (because we use XYZ coordinates). What I've done is to transform and light all vertices and use the XYZRHW format.
Oh! Well I forgot this hack... [;-)]
I think to support this using GL, we should use the feedback buffer. Will surely be slow, but well, better than to write our own lighting :-)
I don't know much about feedback buffer... But maybe replacing (or improving?) our current hackish code of ProcessVertices with feedback buffer should do the trick. Once done, we could simply make execute buffers use this function.
Lionel