mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +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
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
static const char *vert_prog = {
|
||||
static const char *vert_COPY_prog = {
|
||||
"attribute vec3 position;"
|
||||
"varying vec2 opos;"
|
||||
"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;"
|
||||
"varying vec2 opos;"
|
||||
"uniform sampler2D tex;"
|
||||
|
@ -177,7 +177,8 @@ static const char *frag_AYUV_prog = {
|
|||
" g=y-0.39173*u-0.81290*v;"
|
||||
" b=y+2.017*u;"
|
||||
" gl_FragColor=vec4(r,g,b,1.0);"
|
||||
"}" };
|
||||
"}"
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* Input capabilities.
|
||||
|
@ -1253,9 +1254,9 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||
}
|
||||
|
||||
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);
|
||||
glShaderSource (verthandle, 1, &vert_prog, NULL);
|
||||
glShaderSource (verthandle, 1, &vert_COPY_prog, NULL);
|
||||
if (got_gl_error ("glShaderSource vertex"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
|
@ -1280,7 +1281,7 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||
if (eglglessink->format == GST_VIDEO_FORMAT_AYUV)
|
||||
glShaderSource (fraghandle, 1, &frag_AYUV_prog, NULL);
|
||||
else
|
||||
glShaderSource (fraghandle, 1, &frag_prog, NULL);
|
||||
glShaderSource (fraghandle, 1, &frag_COPY_prog, NULL);
|
||||
|
||||
if (got_gl_error ("glShaderSource fragment"))
|
||||
goto HANDLE_ERROR;
|
||||
|
|
Loading…
Reference in a new issue