mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
eglglessink: Rename shader variables to make more sense
This commit is contained in:
parent
d42d5e1139
commit
9e23d0fc87
1 changed files with 7 additions and 6 deletions
|
@ -138,7 +138,7 @@ static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC my_glEGLImageTargetTexture2DOES;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
static const char *vert_prog = {
|
static const char *vert_COPY_prog = {
|
||||||
"attribute vec3 position;"
|
"attribute vec3 position;"
|
||||||
"varying vec2 opos;"
|
"varying vec2 opos;"
|
||||||
"void main(void)"
|
"void main(void)"
|
||||||
|
@ -148,7 +148,7 @@ static const char *vert_prog = {
|
||||||
"}"
|
"}"
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *frag_prog = {
|
static const char *frag_COPY_prog = {
|
||||||
"precision mediump float;"
|
"precision mediump float;"
|
||||||
"varying vec2 opos;"
|
"varying vec2 opos;"
|
||||||
"uniform sampler2D tex;"
|
"uniform sampler2D tex;"
|
||||||
|
@ -177,7 +177,8 @@ static const char *frag_AYUV_prog = {
|
||||||
" g=y-0.39173*u-0.81290*v;"
|
" g=y-0.39173*u-0.81290*v;"
|
||||||
" b=y+2.017*u;"
|
" b=y+2.017*u;"
|
||||||
" gl_FragColor=vec4(r,g,b,1.0);"
|
" gl_FragColor=vec4(r,g,b,1.0);"
|
||||||
"}" };
|
"}"
|
||||||
|
};
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
/* Input capabilities.
|
/* Input capabilities.
|
||||||
|
@ -1253,9 +1254,9 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
}
|
}
|
||||||
|
|
||||||
verthandle = glCreateShader (GL_VERTEX_SHADER);
|
verthandle = glCreateShader (GL_VERTEX_SHADER);
|
||||||
GST_DEBUG_OBJECT (eglglessink, "sending %s to handle %d", vert_prog,
|
GST_DEBUG_OBJECT (eglglessink, "sending %s to handle %d", vert_COPY_prog,
|
||||||
verthandle);
|
verthandle);
|
||||||
glShaderSource (verthandle, 1, &vert_prog, NULL);
|
glShaderSource (verthandle, 1, &vert_COPY_prog, NULL);
|
||||||
if (got_gl_error ("glShaderSource vertex"))
|
if (got_gl_error ("glShaderSource vertex"))
|
||||||
goto HANDLE_ERROR;
|
goto HANDLE_ERROR;
|
||||||
|
|
||||||
|
@ -1280,7 +1281,7 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
if (eglglessink->format == GST_VIDEO_FORMAT_AYUV)
|
if (eglglessink->format == GST_VIDEO_FORMAT_AYUV)
|
||||||
glShaderSource (fraghandle, 1, &frag_AYUV_prog, NULL);
|
glShaderSource (fraghandle, 1, &frag_AYUV_prog, NULL);
|
||||||
else
|
else
|
||||||
glShaderSource (fraghandle, 1, &frag_prog, NULL);
|
glShaderSource (fraghandle, 1, &frag_COPY_prog, NULL);
|
||||||
|
|
||||||
if (got_gl_error ("glShaderSource fragment"))
|
if (got_gl_error ("glShaderSource fragment"))
|
||||||
goto HANDLE_ERROR;
|
goto HANDLE_ERROR;
|
||||||
|
|
Loading…
Reference in a new issue