OpenGL ES how display off screen

荒凉一梦 提交于 2019-12-12 03:18:56

问题


I would like to apply some effects on the camera preview. In fact, I want to extend the upper half portion. Actually, I do it with the fragment shader but it's still in the off screen. So how can I translate the off screen in the screen after the process of my shader (translate y=1.5 to y=1.0)? I tried with a matrix but it displays a green square.

explanation

Thank you

edit: Here is a simple example to describe my problem. To simplify, I want to make something in the off screen (during the shader operation) and after I want to translate the off screen in the screen... So I have a preview, then with a shader I "translate" the picture to the bottom to have an half of the picture off screen. To finish, I apply a matrix (not in the shader) to translate it, and so reverse the first translation but it doesn't work ! The half that was in the screen after the first translation is well translated in the top of the screen, but the half that was off screen after the first translation is not translated (we can see only green pixels instead of it).

example 2

Do you know why ?

Thank you

来源:https://stackoverflow.com/questions/37410154/opengl-es-how-display-off-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!