i want to render a yuv data by opengles on mobile phone
It seems that i have to convert yuv to rgb in my shader.
according to the link: https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_YUV_target.txt
I add below code to my fragment shader:
uniform __samplerExternal2DY2YEXT u_sTexture;But how can i send the yuv raw data to a txture and bind to the sampler u_sTexture?ThanksGuDuJian
Do you want to read the data as YUV, or do you want to load it as color-converted to RGB?If you use GL_OES_EGL_image_external you can directly read a YUV surface from e.g. the Android media stack and samples will be automatically converted into RGB.
Thanks for your response
Actually i have a file (saving yuv raw data in it, format is I420(420P) ).
I want to read the yuv data from this file than render to an rgb surface
View all questions in Graphics and Gaming forum