开发者

Is glCopyTexture2d slower than using framebuffer object

I am using glCopyTexture2d to create a texture from screen content in a iphone game. Its simple, I wonder if using frame buffer (render to texture) for the same is has any performance gain. However (render to texture) is not straight forward for me. Theoretically glCopyTexture2d is a VRAM to VRAM copy. Have any body experienced performance gain using 'render to texture' in compare to glCopyT开发者_运维技巧exture2d.


render to texture using FBOs should be faster than glCopyTexImage2D, as directly rendering to the texture completely prevents any copy (be it only VRAM to VRAM, which is still a copy of pretty much data). But you should try out yourself if it gives a real benefit for your application. This site has a nice introduction to FBOs together with a simple render to texture tutorial. If you have FBO support, you should really give it a try, it might be worth it.

And by the way, using glCopyTexSubImage2D should even be faster than glCopyTexImage2D (assuming an already existing texture of correct size), as this way the texture memory doesn't get allocated completely new.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜