不用FBO旋转、翻转、缩放纹理

I need to flip my texture vertically when copying it into another texture.I know about 3 simple ways to do it:
1 . Blit from once FBO into another using full screen quad (and flip in frag shader)
2 . Blit using glBlitFrameBuffer.
3 . Using glCopyImageSubData
I need to perform this copy between 2 textures which aren't attached to any FBO so I am trying to avoid first 2 solutions.I am trying the third one.
Doing it like this:
glCopyImageSubData(srcTex ,GL_TEXTURE_2D,0,0,0,0,targetTex,GL_TEXTURE_2D,0,0,width ,0,height,0,1);

It doesn't work.The copy returns garbage.Is this method supposed to be able to flip when reading?Is there an alternative FBO unrelated method(GPU side only)?
Btw:
glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,0,height ,width,0 );

Doesn't work too.

https://stackoverflow.com/questions/19564657/flipping-texture-when-copying-to-another-texture

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 本篇文章是基于谷歌有关Graphic的一篇概览文章的翻译:http://source.android.com/de...
    lee_3do阅读 7,204评论 2 21
  • 亲爱的日生: 这是八月的第一天,凌晨刚醒酒开车一个小时跑来看我的你真是让人心疼..你长途跋涉赶来,将疲倦藏...
    梁莫盼阅读 100评论 0 1
  • 导语:女人爱不爱你,不光只能听她嘴上怎么说,而是要看她怎么做,如果女人把这几样东西交给你,说明这个女人对你爱的死心...
    史萧楠阅读 20,957评论 1 0
  • 皮囊 沉重得有些透不过气 这是一本自传体杂文,说的都是真实的人和事,是作者亲身经历并刻画于心的烙印,所以才如此真挚...
    万花谷阅读 206评论 0 0
  • 今天不知道怎么了 刚刚洗了澡洗了头洗了衣服 现在有点头晕 嗯 身体又不舒服了 现在想起来 今天坐公交车的时候总...
    打好boss好睡觉阅读 230评论 0 0