Right, sorry, I've been at work all day so had no chance to post...
ape wrote:
Ah. I just tried
Code:
GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise;
in my draw routine but it still draws backwards if I don't reverse the indices

I know nothing of XNA, but I'll just point out you appear to be applying the proprty to 'RasterizerState', where as the snippet I posted before assigned to 'RasterizerState.CullMode'.
If you really do need to reverse the winding, then I expect it will be quicker to iterate over the array and swap the 2nd and 3rd index of each triangle, rather than reverse the whole index list.
ape wrote:
...the current annoyance is an overflow in the xna batch drawing code when i give it a large number of vertices at once (eg the result of a 64^3 volume surface extraction with holes in it). Hard to believe that generated enough vertices for int32.maxvalue.
Just to be clear, are you saying it's overflowing past int32.maxvalue? I.e. more than four billion vertices? Because that can't be right. Or you just mean it's working with 32 bits but you wanted to use 16 bits?
ape wrote:
Also, for some reason volumedensity8 is giving me a SEH exception when i try to make any cubic volume less than 32 (eg 16x16x16). Any idea as to why?
Internally the volume is stored as a series of blocks, and a volume cannot be smaller than the block size. But default the block size is 32, which is specified as a default parameter in the Volume constructor:
Code:
///Constructor
Volume(uint16_t uWidth, uint16_t uHeight, uint16_t uDepth, uint16_t uBlockSideLength = 32);
You'll need to check how this default parameter is exposed by SWIG, maybe your C# Volume has more than one constructor available or something?
I'll just note that if you are trying to make small volumes so you can tile them together, then that won't work. I can elaborate if that's what you were going to do. If not, carry on

Anyway, it looks like you've been making more great progress

I'll try your demo in a bit.