Recently We have some questions from Stage 3D game developers:
1. Is there any solution of render a non-power-of-two texture to a Render Target?
2. Is there any API or possible ways of Hardware Copy between Render Target and Back Buffer?
3. If above two questions are enhancement request, is there any possible they can be added in future Flash Player release?
1、能否支持创建非2的n次幂大小的render target?
2、能否开放一个这样的接口:在Render Target之间,以及Render Target和Back Buffer之间硬件拷贝接口?
Answers:
1) You have to pad to the next power of two. You can use scissoring to restrict rendering to the non-power of two area. Note that you still have to clear the entire texture though.
2) No, you have to manually do that copy with a simple shader.
3) Yes, the next version of molehill will have enhanced render to texture support.
1) 目前不支持创建非2的n次幂大小的render target, 你可以使用一些裁剪算法来确保纹理为2的n次幂大小。
2) 目前没有这样的接口,必须手动创建着色器来进行拷贝。
3) Stage3D的下一个版本将增强对纹理的支持,到时候第一个问题应该会得到解决。
The expertise shines through. Thanks for taking the time to aneswr.