开发者

Move texture data from one texture part into another part

Is it possible to move part of the texture into another texture part without performance hits?

I l开发者_Go百科ooked into opengl SDK, but haven't found anything that could do something like this.


glCopyPixels lets you to copy from one framebuffer area into another (I never used it).

glBlitFramebuffer lets you to copy pixels between framebuffers

glCopyTexImage lets you to copy pixels from framebuffer into a texture

Using these function you can accomplish the task by, for example, the following actions:

  1. create FBO, attach texture-1 into the first color channel
  2. bind fbo, set viewport to contain the source area
  3. call glCopyTexSubImage into the texture-2 to get the contents
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜