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:
- create FBO, attach texture-1 into the first color channel
- bind fbo, set viewport to contain the source area
- call
glCopyTexSubImage
into the texture-2 to get the contents
精彩评论