Following on from our discussion earlier, I have now upgraded the LTrees code to XNA 4.0. The patch file is attached. Here are some notes:
- The biggest change was around XNA 4.0's use of state blocks. It's very possible I missed something, but the demo looks good to me. Having never used LTrees before, and not having XNA 3.0 or 3.1 installed, I can't be sure.
- In XNA 4.0, we can no longer use AlphaTestEnable, so I've replaced this functionality with some pixel shader code.
- I have added comments where I felt my changes needed explanation, but I didn't add comments for the more straightforward changes.
Hope this helps - let me know if you'd like me to provide binaries so the download can be updated, if you don't have VS2010 installed. Also if you're not happy with the coding style, spacing, etc., let me know and I'll do my best to fit in with what you suggest.