V3 render primitive

This is is opened for review and suggestions.
Please do not merge it now.
now it can work on ios, mac and android
work to finish
1. add linux and windows support
2. add test cases
I copied the copyrights from other files.
If it is confirmed, I will change it.